mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
dpaste isn't django 2.0 ready yet.
This commit is contained in:
parent
d9bce49852
commit
352bb8da9a
3 changed files with 16 additions and 16 deletions
|
@ -8,14 +8,7 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
|
|||
"""
|
||||
|
||||
import os
|
||||
# If a 'settings_local' file is present, use it
|
||||
try:
|
||||
from dpaste.settings import local
|
||||
settings_module = "dpaste.settings.local"
|
||||
except ImportError:
|
||||
settings_module = "dpaste.settings"
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dpaste.settings.local")
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
application = get_wsgi_application()
|
||||
|
|
21
manage.py
21
manage.py
|
@ -3,13 +3,20 @@ import os
|
|||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
# If a 'settings_local' file is present, use it
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dpaste.settings.local")
|
||||
try:
|
||||
from dpaste.settings import local
|
||||
settings_module = "dpaste.settings.local"
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError:
|
||||
settings_module = "dpaste.settings"
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
|
||||
from django.core.management import execute_from_command_line
|
||||
# The above import may fail for some other reason. Ensure that the
|
||||
# issue is really that Django is missing to avoid masking other
|
||||
# exceptions on Python 2.
|
||||
try:
|
||||
import django
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
)
|
||||
raise
|
||||
execute_from_command_line(sys.argv)
|
||||
|
|
2
setup.py
2
setup.py
|
@ -49,7 +49,7 @@ setup(
|
|||
},
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
'django>=1.8',
|
||||
'django>=1.8,<2.0',
|
||||
'pygments>=1.6',
|
||||
'django-markup>=1.0',
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue