Changeset 8571
- Timestamp:
- 26/09/12 15:30:31 (8 years ago)
- Location:
- mauRepo/MolesManager/trunk/cedaMoles/MolesManager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/cedaMoles/MolesManager/settings.py
r8492 r8571 18 18 ) 19 19 20 PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) 21 22 PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1] 20 SITE_ROOT = os.path.dirname(os.path.abspath(__file__)) 21 MEDIA_ROOT = os.path.join(SITE_ROOT, 'static') 22 23 PROJECT_DIRNAME = SITE_ROOT.split(os.sep)[-1] 23 24 24 25 … … 28 29 'default': { 29 30 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 30 'NAME': PROJECT_ROOT+'/sqlite.db', # Or path to database file if using sqlite3.31 'NAME': '/sqlite.db', # Or path to database file if using sqlite3. 31 32 'USER': '', # Not used with sqlite3. 32 33 'PASSWORD': '', # Not used with sqlite3. … … 80 81 #Deployment parameterized version 81 82 #STATIC_URL = 'http://localhost' 82 STATIC_URL = 'http://127.0.0.1:8000/static/'83 #STATIC_URL = 'http://127.0.0.1:8000/static/' 83 84 #STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL) 84 #STATIC_URL = '/static/'85 STATIC_URL = '/static/' 85 86 #STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL) 86 87 … … 236 237 MIGRATION_INTERVAL = 86400 237 238 238 # Set this boolean to include static URL patterns for CSS, JS, etc. in urls.py239 SERVE_STATIC_CONTENT = False240 241 239 reportMigrationTo = ['maurizio.nagni@stfc.ac.uk', 'm.nagni@gmail.com'] 242 240 -
mauRepo/MolesManager/trunk/cedaMoles/MolesManager/static/templates/base.html
r8507 r8571 1 1 {% load i18n %} 2 2 {% load static %} 3 {% get_static_prefix as STATIC_URL %} 3 {% get_static_prefix as STATIC_PREFIX %} 4 4 5 5 6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> … … 22 23 <title>{% block meta_title %}{% endblock %}{% if settings.SITE_TITLE %} | {{ settings.SITE_TITLE }}{% endif %}</title> 23 24 24 <link rel="stylesheet" type="text/css" href=" /static/css/960/reset.css" />25 <link rel="stylesheet" type="text/css" href=" /static/css/960/960_12_col.css" />26 <link rel="stylesheet" type="text/css" href=" /static/css/960/text.css" />27 <link rel="stylesheet" type="text/css" href=" /static/css/ceda.css" />25 <link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}css/960/reset.css" /> 26 <link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}css/960/960_12_col.css" /> 27 <link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}css/960/text.css" /> 28 <link rel="stylesheet" type="text/css" href="{{ STATIC_PREFIX }}css/ceda.css" /> 28 29 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css" /> 29 30 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/layout/ContentPane.css" /> … … 41 42 // Make sure the module path does *not* end in a slash. 42 43 packages:[ 43 { "name": "ceda", "location": " /static/js"}44 { "name": "ceda", "location": "{{ STATIC_PREFIX }}js"} 44 45 ] 45 46 }; … … 145 146 <div class="grid_12 whiteFill" id="footer"> 146 147 <div class="grid_12 alpha" id="footerLogos"> 147 <p><a href="http://www.ncas.ac.uk"><img src=" /static/img/ncas_logo_fullcolour.jpg" alt="NCAS logo" title="NCAS" align="left"/></a>148 <a href="http://www.nceo.ac.uk"><img src=" /static/img/nceo_logo.jpg" alt="NCEO logo" title="NCEO" align="right"/></a></p>148 <p><a href="http://www.ncas.ac.uk"><img src="{{ STATIC_PREFIX }}/img/ncas_logo_fullcolour.jpg" alt="NCAS logo" title="NCAS" align="left"/></a> 149 <a href="http://www.nceo.ac.uk"><img src="{{ STATIC_PREFIX }}/img/nceo_logo.jpg" alt="NCEO logo" title="NCEO" align="right"/></a></p> 149 150 </div> <!-- End div footerLogos--> 150 151 <div class="grid_6 push_3 whiteFill omega" id="footerStatements"> -
mauRepo/MolesManager/trunk/cedaMoles/MolesManager/urls.py
r8503 r8571 1 1 from django.conf.urls.defaults import patterns, url 2 from settings import SERVE_STATIC_CONTENT, STATIC_ROOT3 2 from django.views.generic.simple import redirect_to 3 from django.contrib.staticfiles.urls import staticfiles_urlpatterns 4 4 5 5 # Uncomment the next two lines to enable the admin: … … 54 54 ) 55 55 56 if SERVE_STATIC_CONTENT: 57 urlpatterns += patterns('', 58 url(r'css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css' , 'show_indexes': True}), 59 ) 60 61 urlpatterns += patterns('', 62 url(r'css/960/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css/960' , 'show_indexes': True}), 63 ) 64 65 urlpatterns += patterns('', 66 url(r'img/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/img' , 'show_indexes': True}), 67 ) 68 69 urlpatterns += patterns('', 70 url(r'js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/js' , 'show_indexes': True}), 71 ) 72 73 #urlpatterns += staticfiles_urlpatterns() 74 56 urlpatterns += staticfiles_urlpatterns()
Note: See TracChangeset
for help on using the changeset viewer.