mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 11:56:36 +11:00
Minor cleanup
This commit is contained in:
parent
0a0096fc16
commit
3478772844
2 changed files with 1 additions and 3 deletions
|
@ -3,7 +3,6 @@ import difflib
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from django.apps import apps
|
from django.apps import apps
|
||||||
from django.db.models import Count
|
|
||||||
from django.http import (Http404, HttpResponse, HttpResponseBadRequest,
|
from django.http import (Http404, HttpResponse, HttpResponseBadRequest,
|
||||||
HttpResponseRedirect)
|
HttpResponseRedirect)
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
|
@ -259,7 +258,7 @@ class APIView(View):
|
||||||
s.save()
|
s.save()
|
||||||
|
|
||||||
formatter = getattr(self, '_format_{0}'.format(response_format), None)
|
formatter = getattr(self, '_format_{0}'.format(response_format), None)
|
||||||
if not formatter:
|
if formatter:
|
||||||
response = self._format_default(s)
|
response = self._format_default(s)
|
||||||
else:
|
else:
|
||||||
response = formatter(s)
|
response = formatter(s)
|
||||||
|
|
|
@ -12,4 +12,3 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dpaste.settings.local")
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue