Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Fix project structure to Django 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
dolgiyspb committed May 22, 2015
1 parent d362c94 commit 9957fcc
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -7,8 +7,9 @@ db
/share
/env
/venv
/django-jquery-file-upload

*.log
*.pot
*.pyc
local_settings.py
.idea
File renamed without changes.
1 change: 1 addition & 0 deletions settings.py → django-jquery-file-upload/settings.py
Expand Up @@ -100,6 +100,7 @@
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
)

ROOT_URLCONF = 'django-jquery-file-upload.urls'
Expand Down
File renamed without changes.
30 changes: 20 additions & 10 deletions manage.py
@@ -1,14 +1,24 @@
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
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__)
sys.exit(1)
# from django.core.management import execute_manager
# import imp
# try:
# imp.find_module('settings') # Assumed to be in the same directory.
# except ImportError:
# import sys
# 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__)
# sys.exit(1)
#
# import settings
#
# if __name__ == "__main__":
# execute_manager(settings)

import settings
#!/usr/bin/env python
import os, sys

if __name__ == "__main__":
execute_manager(settings)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django-jquery-file-upload.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,2 +1,2 @@
django<1.6
django
pillow

0 comments on commit 9957fcc

Please sign in to comment.