mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-23 11:56:36 +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
|
import os
|
||||||
# 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"
|
|
||||||
except ImportError:
|
|
||||||
settings_module = "dpaste.settings"
|
|
||||||
|
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
|
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
|
|
21
manage.py
21
manage.py
|
@ -3,13 +3,20 @@ import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# If a 'settings_local' file is present, use it
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dpaste.settings.local")
|
||||||
try:
|
try:
|
||||||
from dpaste.settings import local
|
from django.core.management import execute_from_command_line
|
||||||
settings_module = "dpaste.settings.local"
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
settings_module = "dpaste.settings"
|
# The above import may fail for some other reason. Ensure that the
|
||||||
|
# issue is really that Django is missing to avoid masking other
|
||||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
|
# exceptions on Python 2.
|
||||||
from django.core.management import execute_from_command_line
|
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)
|
execute_from_command_line(sys.argv)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -49,7 +49,7 @@ setup(
|
||||||
},
|
},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'django>=1.8',
|
'django>=1.8,<2.0',
|
||||||
'pygments>=1.6',
|
'pygments>=1.6',
|
||||||
'django-markup>=1.0',
|
'django-markup>=1.0',
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue