# HG changeset patch # User nishanth # Date 1266937855 -19800 # Node ID db103856505e36559d577b474343eff91ad17b33 # Parent 708dd49d531b801630d6b8eea3014f9e8252d6a4 added capability of serving static files . diff -r 708dd49d531b -r db103856505e settings.py --- a/settings.py Tue Feb 23 20:24:26 2010 +0530 +++ b/settings.py Tue Feb 23 20:40:55 2010 +0530 @@ -35,12 +35,12 @@ # 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. diff -r 708dd49d531b -r db103856505e urls.py --- a/urls.py Tue Feb 23 20:24:26 2010 +0530 +++ b/urls.py Tue Feb 23 20:40:55 2010 +0530 @@ -17,7 +17,10 @@ # 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.*)$', 'django.views.static.serve', + {'document_root': './images/'}), + (r'^$', userViews.homepage), (r'^task/browse/$', taskViews.browse_tasks),