Ignore:
Timestamp:
05/03/12 10:39:08 (8 years ago)
Author:
mnagni
Message:

Updated the urls.py in order to allow a static access to css/js/img. Anyway as specified in DJANGO manual

"Django itself doesn’t serve static (media) files, such as images, style sheets, or video. It leaves that job to whichever Web server you choose.
The reasoning here is that standard Web servers, such as Apache, lighttpd and Cherokee, are much more fine-tuned at serving static files than a Web application framework."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/settings.py

    r8120 r8137  
    2727    'default': { 
    2828        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 
    29         'NAME': 'c:/virtualenvs/www/MolesManager/src/sqlite.db',#'/misc/frigid3/humid1/mnagni/workspaces/moles3/MolesManager/src/sqlite.db',                      # Or path to database file if using sqlite3. 
     29        'NAME': '/misc/frigid3/humid1/mnagni/workspaces/moles3/MolesManager/src/sqlite.db',                      # Or path to database file if using sqlite3. 
    3030        'USER': '',                      # Not used with sqlite3. 
    3131        'PASSWORD': '',                  # Not used with sqlite3. 
     
    6767# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" 
    6868MEDIA_URL = '' 
    69  
     69  
    7070# Absolute path to the directory static files should be collected to. 
    7171# Don't put anything in this directory yourself; store your static files 
    72 # in apps' "static/" sub-directories and in STATICFILES_DIRS. 
     72# in apps' "static/" subdirectories and in STATICFILES_DIRS. 
    7373# Example: "/home/media/media.lawrence.com/static/" 
    74 #STATIC_ROOT = os.path.join(DJANGO_PROJECT, 'static') 
     74STATIC_ROOT = os.path.join(DJANGO_PROJECT, 'static') 
     75 
     76#WSGIScriptAlias = "/cedaManager" 
    7577 
    7678# URL prefix for static files. 
    7779# Example: "http://media.lawrence.com/static/" 
    78 STATIC_URL = '/static/' 
    79 #STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL) 
    80 STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') 
    81  
     80STATIC_URL = 'http://localhost' 
    8281 
    8382# URL prefix for admin static files -- CSS, JavaScript and images. 
     
    8887# Additional locations of static files 
    8988STATICFILES_DIRS = ( 
    90                     "c:/virtualenvs/www/MolesManager/src/MolesManager/static", 
     89    () 
    9190    # Put strings here, like "/home/html/static" or "C:/www/django/static". 
    9291    # Always use forward slashes, even on Windows. 
     
    143142    # Don't forget to use absolute paths, not relative paths. 
    144143) 
    145  
    146144 
    147145INSTALLED_APPS = ( 
     
    188186MOLES3 = 'moles3' 
    189187#MOLES3_DB_CONNECTION = 'postgresql://user:pws@host:port/dbName' 
    190 #MOLES3_DB_CONNECTION = 'PG_MOLES3_DB_CONNECTION' 
    191 MOLES3_DB_CONNECTION = 'postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/ceda_moles3_test'#'PG_MOLES3_DB_CONNECTION' 
    192  
    193  
     188MOLES3_DB_CONNECTION = 'PG_MOLES3_DB_CONNECTION' 
    194189from sqlTables import doTables as doMoles 
    195190MOLES3_DB_SCRIPT = doMoles 
     
    200195#MIGRATION_DB_CONNECTION = 'postgresql://user:pws@host:port/dbName' 
    201196 
    202 #MIGRATION_DB_CONNECTION = 'PG_MIGRATION_DB_CONNECTION' 
    203 MIGRATION_DB_CONNECTION = 'postgresql://badc:rotyn217m@neptune.badc.rl.ac.uk:5432/ceda_moles3_test'#'PG_MOLES3_DB_CONNECTION' 
    204  
     197MIGRATION_DB_CONNECTION = 'PG_MIGRATION_DB_CONNECTION' 
    205198from libs.migration.db.migrationTables import doTables as doMigration 
    206199MIGRATION_DB_SCRIPT = doMigration 
    207200 
    208 RUN_MIGRATION = False 
     201RUN_MIGRATION = True 
    209202#Default to one day 
    210203MIGRATION_INTERVAL = 86400 
Note: See TracChangeset for help on using the changeset viewer.