Commit e80fdd78 authored by Mathieu Rodic's avatar Mathieu Rodic

BUGFIX - Fixed the absolute URLs issue in settings.py (again)

parent 02a15e20
...@@ -10,7 +10,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/ ...@@ -10,7 +10,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
PROJECT_PATH = os.path.join(BASE_DIR, os.pardir) PROJECT_PATH = os.path.join(BASE_DIR, os.pardir)
PROJECT_PATH = os.path.abspath(PROJECT_PATH) PROJECT_PATH = os.path.abspath(PROJECT_PATH)
...@@ -33,16 +33,7 @@ TEMPLATE_DEBUG = True ...@@ -33,16 +33,7 @@ TEMPLATE_DEBUG = True
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". os.path.join(BASE_DIR, 'templates'),
# Always use forward slashes
# Don't forget to use absolute paths, not relative paths.
'/srv/gargantext/templates',
#import os.path
#
#TEMPLATE_DIRS = (
# os.path.join(os.path.dirname(__file__), 'templates').replace('\\','/'),
#)
) )
...@@ -121,11 +112,11 @@ USE_TZ = True ...@@ -121,11 +112,11 @@ USE_TZ = True
ROOT_URLCONF = 'gargantext_web.urls' ROOT_URLCONF = 'gargantext_web.urls'
STATIC_ROOT = '/var/www/gargantext/static/' STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
STATIC_URL = '/static/' STATIC_URL = '/static/'
MEDIA_ROOT = '/var/www/gargantext/media' # MEDIA_ROOT = '/var/www/gargantext/media'
#MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
...@@ -136,11 +127,8 @@ STATICFILES_FINDERS = ( ...@@ -136,11 +127,8 @@ STATICFILES_FINDERS = (
STATICFILES_DIRS = ( STATICFILES_DIRS = (
#os.path.join(BASE_DIR, "static"), os.path.join(BASE_DIR, "static"),
'/srv/gargantext/static', )
#'/var/www/www/alexandre/media',
#'/var/www/alexandre.delanoe.org/',
)
TEMPLATE_CONTEXT_PROCESSORS = ( TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth", "django.contrib.auth.context_processors.auth",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment