Skip to content

Commit 302e2f1

Browse files
author
Neil Newman
committed
Updated to support Django 1.7
1 parent d362c94 commit 302e2f1

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ db
88
/env
99
/venv
1010
/django-jquery-file-upload
11+
/static
1112
*.log
1213
*.pot
1314
*.pyc

fileupload/response.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# encoding: utf-8
22
from django.http import HttpResponse
3-
from django.utils import simplejson
3+
import json
44

55
MIMEANY = '*/*'
66
MIMEJSON = 'application/json'
@@ -34,5 +34,5 @@ def a_iew(request):
3434
"""
3535
def __init__(self, obj='', json_opts=None, mimetype=MIMEJSON, *args, **kwargs):
3636
json_opts = json_opts if isinstance(json_opts, dict) else {}
37-
content = simplejson.dumps(obj, **json_opts)
37+
content = json.dumps(obj, **json_opts)
3838
super(JSONResponse, self).__init__(content, mimetype, *args, **kwargs)

manage.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
#!/usr/bin/env python
2-
from django.core.management import execute_manager
3-
import imp
4-
try:
5-
imp.find_module('settings') # Assumed to be in the same directory.
6-
except ImportError:
7-
import sys
8-
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
9-
sys.exit(1)
10-
11-
import settings
2+
import os
3+
import sys
124

135
if __name__ == "__main__":
14-
execute_manager(settings)
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
7+
8+
from django.core.management import execute_from_command_line
9+
10+
execute_from_command_line(sys.argv)

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
django<1.6
1+
django<1.8
22
pillow

settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
'django.contrib.messages.middleware.MessageMiddleware',
103103
)
104104

105-
ROOT_URLCONF = 'django-jquery-file-upload.urls'
105+
ROOT_URLCONF = 'urls'
106106

107107
TEMPLATE_DIRS = (
108108
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".

0 commit comments

Comments
 (0)