michaelbrooks / django-twitter-stream Goto Github PK
View Code? Open in Web Editor NEWDjango app for streaming tweets from the Twitter API into a database.
License: MIT License
Django app for streaming tweets from the Twitter API into a database.
License: MIT License
What is the
"import fields" in the Models line 11. I'm using Django 1.8
Unable to run the app.
I'm using Django 2.0.1, so without South. Because of that, when I run python manage.py migrate, I got errors.
Is the solution to downgrade to Djando 1.6 and install South?
Genarated URLS.py
# url(r'^Home/map/$', views.MapListView.as_view(), name='Home_map_list'),
# url(r'^Home/map/create/$', views.MapCreateView.as_view(), name='Home_map_create'),
# url(r'^Home/map/detail/(?P<pk>\S+)/$', views.MapDetailView.as_view(), name='Home_map_detail'),
# url(r'^Home/map/update/(?P<pk>\S+)/$', views.MapUpdateView.as_view(), name='Home_map_update'),
Correct URL pattern
url(r'^$', views.MapListView.as_view(), name='Home_map_list'),
url(r'^create/$', views.MapCreateView.as_view(), name='Home_map_create'),
url(r'^detail/(?P\S+)/$', views.MapDetailView.as_view(), name='Home_map_detail'),
url(r'^update/(?P\S+)/$', views.MapUpdateView.as_view(), name='Home_map_update'),
I'm in Django 2.0.1.
After removing migrations and making new migration everything is ok and the admin page work.
When running python manage.py stream I get the error
File "/mysite/twitter_stream/management/commands/stream.py", line 46, in Command
option_list = BaseCommand.option_list + (
AttributeError: type object 'BaseCommand' has no attribute 'option_list'
Looking around I understand that BaseCommand.option_list was deprecated in Django 1.8 and removed in Django 1.10. I also understand it was fixed, but I don't realize how to change it here.
Any idea?
i use django 2.2
i've followed through the instructions while making some changes to adjust the newest version. the admin page works.
however when i run python manage.py stream
i get error
File "C:\Dev\Env\lib\site-packages\twitter_monitor\stream.py", line 117
self.stream.filter(track=tracking_terms, async=True, languages=self.languages)
^
SyntaxError: invalid syntax
the proble seems to be from the library and im not sure how to fix this since this is the first time i've tried django. do you have any idea what i could do to fix this?
with python manage.py stream
keys = ApiKey.objects.first()
AttributeError: 'Manager' object has no attribute 'first'
Keys added in database.
$ python manage.py stream MyAPIKeys --poll-interval 30
# The name of the default keys to use for streaming. If not set, we'll just grab one.
'DEFAULT_KEYS_NAME': None,
I just found the MyAPIKeys AND DEFAULT_KEYS_NAME is so unclear because it is actually username in the ApiKey model.
I expected it to be either app name or username + appname, as what is shown in the Admin panel...:)
Hello,
I am new to python, django and tweepy.
How do you get to Django admin page as specified here:
Once you have added twitter_stream
to your list of installed apps,
the Django Admin page should include a section for the ApiKey
model.
You can use this to input your Twitter API keys.
I can't seem to find the admin page using 'python manage.py runserver' and loading '127.0.0.1/admin/' gives 404
Hi,
I run :
python manage.py stream
but nothing is stored in my database. The terminal hangs for a while then finally shows this stacktrace
Exception in thread Thread-50:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, _self.__kwargs)
File "/home/larry/Documents/Projects/houdini/env/local/lib/python2.7/site-packages/tweepy/streaming.py", line 157, in _run
conn.connect()
File "/usr/lib/python2.7/httplib.py", line 1176, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "/usr/lib/python2.7/ssl.py", line 487, in wrap_socket
ciphers=ciphers)
File "/usr/lib/python2.7/ssl.py", line 243, in __init
self.do_handshake()
File "/usr/lib/python2.7/ssl.py", line 405, in do_handshake
self._sslobj.do_handshake()
error: [Errno 104] Connection reset by peer
I checked it only works with MySql and not sqlite or postgresql. Is there any reason for this at implementation level?
Thanks
No module name "twitter-monitor"
What is twitter-monitor in your app?
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.