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
def get_object_or_404(klass, *args, **kwargs): | |
try: | |
return queryset.get(*args, **kwargs) | |
except queryset.model.DoesNotExist: | |
raise Http404('No %s matches the given query.' % queryset.model._meta.object_name) | |
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
def get_object_or_404(klass, *args, **kwargs): | |
queryset = _get_queryset(klass) | |
try: | |
return queryset.get(*args, **kwargs) | |
except queryset.model.DoesNotExist: | |
raise Http404('No %s matches the given query.' % queryset.model._meta.object_name) | |
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
def what_is_gist | |
"A bad ass version-able pastebin" | |
This is sorta cool I guess? | |
end |