diff options
author | nishanth | 2010-02-23 20:40:55 +0530 |
---|---|---|
committer | nishanth | 2010-02-23 20:40:55 +0530 |
commit | f9f85f5025ecf885ec373cd90061dc7eba848927 (patch) | |
tree | 7291c24fcff329e405efa70156698fa42a0a634f | |
parent | 5a9d62c40dc13a41a12678216ec34d726ddf237e (diff) | |
download | pytask-f9f85f5025ecf885ec373cd90061dc7eba848927.tar.gz pytask-f9f85f5025ecf885ec373cd90061dc7eba848927.tar.bz2 pytask-f9f85f5025ecf885ec373cd90061dc7eba848927.zip |
added capability of serving static files .
-rw-r--r-- | settings.py | 4 | ||||
-rw-r--r-- | urls.py | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/settings.py b/settings.py index 26a2eaa..2987f3e 100644 --- a/settings.py +++ b/settings.py @@ -35,12 +35,12 @@ USE_I18N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = './images/' # 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). # Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = '' +MEDIA_URL = 'http://localhost:8000/images/' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. @@ -17,7 +17,10 @@ urlpatterns = patterns('', # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), - + + (r'^images/(?P<path>.*)$', 'django.views.static.serve', + {'document_root': './images/'}), + (r'^$', userViews.homepage), (r'^task/browse/$', taskViews.browse_tasks), |