This file contains 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
class BaseNotification(object): | |
def serialize(self): | |
# here do what the * you want | |
def unserialize(self, data): | |
# here too | |
def render(self, backend): | |
# rendering may differ depending on the backend babe |
This file contains 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
class IPBot: | |
def process_request(self,request): | |
if request.META.get('REMOTE_ADDR') in getattr(settings,'SUSPECTED_BOTS',[]): | |
return HttpResponse("Hi. I'm not sure what you're doing, but if you'd like to continue doing it, please email me - [email protected]") |