forked from 0x2620/pandora
upgrade to django 1.4
This commit is contained in:
parent
840ea90feb
commit
fd5f0c3c4c
5 changed files with 32 additions and 18 deletions
|
@ -32,7 +32,7 @@
|
||||||
Alias /static __PREFIX__/static
|
Alias /static __PREFIX__/static
|
||||||
Alias /favicon.ico __PREFIX__/static/favicon.ico
|
Alias /favicon.ico __PREFIX__/static/favicon.ico
|
||||||
Alias /data __PREFIX__/data
|
Alias /data __PREFIX__/data
|
||||||
Alias /admin/media __PREFIX__/src/django/django/contrib/admin/media
|
Alias /static/admin __PREFIX__/django/django/contrib/admin
|
||||||
|
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyPass / http://127.0.0.1:2620/
|
ProxyPass / http://127.0.0.1:2620/
|
||||||
|
|
|
@ -20,14 +20,14 @@ server {
|
||||||
access_log /var/log/nginx/pandora.access.log;
|
access_log /var/log/nginx/pandora.access.log;
|
||||||
error_log /var/log/nginx/pandora.error.log;
|
error_log /var/log/nginx/pandora.error.log;
|
||||||
|
|
||||||
location /admin/media {
|
|
||||||
root __PREFIX__/src/django/django/contrib;
|
|
||||||
autoindex on;
|
|
||||||
}
|
|
||||||
location /favicon.ico {
|
location /favicon.ico {
|
||||||
root __PREFIX__/static;
|
root __PREFIX__/static;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /static/admin/ {
|
||||||
|
root __PREFIX__/django/django/contrib/admin;
|
||||||
|
autoindex on;
|
||||||
|
}
|
||||||
location /static/ {
|
location /static/ {
|
||||||
root __PREFIX__;
|
root __PREFIX__;
|
||||||
autoindex on;
|
autoindex on;
|
||||||
|
|
|
@ -42,21 +42,29 @@ APPEND_SLASH = False
|
||||||
# Absolute path to the directory that holds media.
|
# Absolute path to the directory that holds media.
|
||||||
# Example: "/home/media/media.lawrence.com/"
|
# Example: "/home/media/media.lawrence.com/"
|
||||||
MEDIA_ROOT = normpath(join(PROJECT_ROOT, '..', 'data'))
|
MEDIA_ROOT = normpath(join(PROJECT_ROOT, '..', 'data'))
|
||||||
STATIC_ROOT = normpath(join(PROJECT_ROOT, '..', 'static'))
|
|
||||||
GEOIP_PATH = normpath(join(PROJECT_ROOT, '..', 'data', 'geo'))
|
|
||||||
|
|
||||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
|
||||||
# trailing slash if there is a path component (optional in other cases).
|
|
||||||
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
|
||||||
|
|
||||||
MEDIA_URL = '/data/'
|
MEDIA_URL = '/data/'
|
||||||
|
|
||||||
|
STATIC_ROOT = normpath(join(PROJECT_ROOT, '..', 'static'))
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
|
ADMIN_MEDIA_PREFIX = '/static/admin/'
|
||||||
|
|
||||||
|
# Additional locations of static files
|
||||||
|
STATICFILES_DIRS = (
|
||||||
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||||
|
# Always use forward slashes, even on Windows.
|
||||||
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
)
|
||||||
|
|
||||||
|
# List of finder classes that know how to find static files in
|
||||||
|
# various locations.
|
||||||
|
STATICFILES_FINDERS = (
|
||||||
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
#'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||||
|
)
|
||||||
|
|
||||||
|
GEOIP_PATH = normpath(join(PROJECT_ROOT, '..', 'data', 'geo'))
|
||||||
|
|
||||||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
|
||||||
# trailing slash.
|
|
||||||
# Examples: "http://foo.com/media/", "/media/".
|
|
||||||
ADMIN_MEDIA_PREFIX = '/admin/media/'
|
|
||||||
|
|
||||||
# List of callables that know how to import templates from various sources.
|
# List of callables that know how to import templates from various sources.
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
|
@ -85,7 +93,11 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
|
# Uncomment the next line to enable admin documentation:
|
||||||
|
# 'django.contrib.admindocs',
|
||||||
'django.contrib.humanize',
|
'django.contrib.humanize',
|
||||||
|
|
||||||
'django_extensions',
|
'django_extensions',
|
||||||
|
|
|
@ -20,6 +20,8 @@ def serve_static_file(path, location, content_type):
|
||||||
return HttpFileResponse(location, content_type=content_type)
|
return HttpFileResponse(location, content_type=content_type)
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
|
# Uncomment the admin/doc line below to enable admin documentation:
|
||||||
|
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
(r'^admin/', include(admin.site.urls)),
|
(r'^admin/', include(admin.site.urls)),
|
||||||
(r'^api/upload/?$', 'archive.views.firefogg_upload'),
|
(r'^api/upload/?$', 'archive.views.firefogg_upload'),
|
||||||
(r'^url=(?P<url>.*)$', 'app.views.redirect_url'),
|
(r'^url=(?P<url>.*)$', 'app.views.redirect_url'),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-e svn+http://code.djangoproject.com/svn/django/branches/releases/1.3.X#egg=django
|
-e git+https://github.com/django/django.git@stable/1.4.x#egg=django
|
||||||
#South
|
#South
|
||||||
-e bzr+http://code.0x2620.org/python-ox/#egg=python-ox
|
-e bzr+http://code.0x2620.org/python-ox/#egg=python-ox
|
||||||
-e bzr+http://code.0x2620.org/oxtimelines/#egg=oxtimelines
|
-e bzr+http://code.0x2620.org/oxtimelines/#egg=oxtimelines
|
||||||
|
@ -11,5 +11,5 @@ django-celery>=2.4.2
|
||||||
#use fork fixing some postgresql issues
|
#use fork fixing some postgresql issues
|
||||||
-e git://github.com/bit/django-extensions.git#egg=django_extensions
|
-e git://github.com/bit/django-extensions.git#egg=django_extensions
|
||||||
-e git+git://github.com/dcramer/django-devserver#egg=django_devserver
|
-e git+git://github.com/dcramer/django-devserver#egg=django_devserver
|
||||||
gunicorn
|
gunicorn>=0.14.3
|
||||||
html5lib
|
html5lib
|
||||||
|
|
Loading…
Reference in a new issue