fix package root/project root
This commit is contained in:
parent
674a5303ad
commit
33ee371975
1 changed files with 6 additions and 5 deletions
|
@ -4,7 +4,8 @@
|
||||||
import os.path
|
import os.path
|
||||||
import posixpath
|
import posixpath
|
||||||
|
|
||||||
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
|
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
|
||||||
|
PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
@ -56,7 +57,7 @@ USE_I18N = True
|
||||||
|
|
||||||
# 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 = os.path.join(PROJECT_ROOT, "site_media", "media")
|
MEDIA_ROOT = os.path.join(PACKAGE_ROOT, "site_media", "media")
|
||||||
|
|
||||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
# 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).
|
# trailing slash if there is a path component (optional in other cases).
|
||||||
|
@ -65,7 +66,7 @@ MEDIA_URL = "/site_media/media/"
|
||||||
|
|
||||||
# Absolute path to the directory that holds static files like app media.
|
# Absolute path to the directory that holds static files like app media.
|
||||||
# Example: "/home/media/media.lawrence.com/apps/"
|
# Example: "/home/media/media.lawrence.com/apps/"
|
||||||
STATIC_ROOT = os.path.join(PROJECT_ROOT, "site_media", "static")
|
STATIC_ROOT = os.path.join(PACKAGE_ROOT, "site_media", "static")
|
||||||
|
|
||||||
# URL that handles the static files like app media.
|
# URL that handles the static files like app media.
|
||||||
# Example: "http://media.lawrence.com"
|
# Example: "http://media.lawrence.com"
|
||||||
|
@ -73,7 +74,7 @@ STATIC_URL = "/site_media/static/"
|
||||||
|
|
||||||
# Additional directories which hold static files
|
# Additional directories which hold static files
|
||||||
STATICFILES_DIRS = [
|
STATICFILES_DIRS = [
|
||||||
os.path.join(PROJECT_ROOT, "static"),
|
os.path.join(PACKAGE_ROOT, "static"),
|
||||||
]
|
]
|
||||||
|
|
||||||
STATICFILES_FINDERS = [
|
STATICFILES_FINDERS = [
|
||||||
|
@ -114,7 +115,7 @@ MIDDLEWARE_CLASSES = [
|
||||||
ROOT_URLCONF = "symposion_project.urls"
|
ROOT_URLCONF = "symposion_project.urls"
|
||||||
|
|
||||||
TEMPLATE_DIRS = [
|
TEMPLATE_DIRS = [
|
||||||
os.path.join(PROJECT_ROOT, "templates"),
|
os.path.join(PACKAGE_ROOT, "templates"),
|
||||||
]
|
]
|
||||||
|
|
||||||
TEMPLATE_CONTEXT_PROCESSORS = [
|
TEMPLATE_CONTEXT_PROCESSORS = [
|
||||||
|
|
Loading…
Reference in a new issue