This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json | |
from tweepy.streaming import StreamListener | |
from tweepy import Stream, OAuthHandler | |
######## Application settings | |
## API key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Disables CSRF for the whole project to simplify prototyping, unsecure in production """ | |
class DisableCSRF(object): | |
#def process_view(self, request, callback, callback_args, callback_kwargs): | |
def process_request(self, request): | |
setattr(request, '_dont_enforce_csrf_checks', True) | |
### === Add to settings.py: | |
#============================================================================== |