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
class Tuple(tuple): | |
def __getattr__(self, name): | |
def _int(val): | |
try: | |
return int(val) | |
except ValueError: | |
return False | |
if not name.startswith('_') or not _int(name[1:]): | |
raise AttributeError("'tuple' object has no attribute '%s'" % name) |
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
from django.http import HttpResponseForbidden | |
from django.http import JsonResponse | |
from pusher import Pusher | |
class PusherAuthStrategy: | |
def __init__(self, namespace): | |
self.namespace = namespace |
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
{ | |
"category_name": "General", | |
"todos": [ | |
{ | |
"task": "My TODO Task", | |
"due_on": null, | |
"status": "pending", | |
"description": null | |
}, | |
{ |