diff options
Diffstat (limited to 'askbot/setup_templates/settings.py')
-rw-r--r-- | askbot/setup_templates/settings.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index ed51d2c4..6d263816 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -3,11 +3,13 @@ import os.path import logging import sys import askbot +import site #this line is added so that we can import pre-packaged askbot dependencies -sys.path.append(os.path.join(os.path.dirname(askbot.__file__), 'deps')) +ASKBOT_ROOT = os.path.abspath(os.path.dirname(askbot.__file__)) +site.addsitedir(os.path.join(ASKBOT_ROOT, 'deps')) -DEBUG = False#set to True to enable debugging +DEBUG = True#set to True to enable debugging TEMPLATE_DEBUG = False#keep false when debugging jinja2 templates INTERNAL_IPS = ('127.0.0.1',) @@ -69,14 +71,16 @@ LANGUAGE_CODE = 'en' # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles') -MEDIA_URL = '/upfiles/' +MEDIA_URL = '/upfiles/'#url to uploaded media +STATIC_URL = '/m/'#url to project static files PROJECT_ROOT = os.path.dirname(__file__) +STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static')#path to files collected by collectstatic # 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/' +ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/'#must be this value # Make up some unique string, and don't share it with anybody. SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s ' @@ -149,6 +153,7 @@ INSTALLED_APPS = ( 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', + 'django.contrib.staticfiles', #all of these are needed for the askbot 'django.contrib.admin', @@ -218,3 +223,5 @@ djcelery.setup_loader() CSRF_COOKIE_NAME = 'askbot_csrf' CSRF_COOKIE_DOMAIN = ''#enter domain name here - e.g. example.com + +STATICFILES_DIRS = ( os.path.join(ASKBOT_ROOT, 'skins'),) |