On Thu, May 13, 2010 at 12:23 PM, ravi krishna <ravi.9...@gmail.com> wrote:
> Hi,,This is my url.py file, when i run this it shows indendation error at > line 25. But i dont see an indendation error. Can somebody help me. I am > just a beginner with Django. > > > from django.conf.urls.defaults import * > from django.conf import settings > > # Uncomment the next two lines to enable the admin: > from django.contrib import admin > admin.autodiscover() > > urlpatterns = patterns('', > #if settings.DEBUG: > # urlpatterns += patterns('django.views.static', > # (r'^static_media/(?P<path>.*)$', > # 'serve', { > # 'document_root': '/path/to/static_media', > # 'show_indexes': True }),) > > ) > # Example: > # (r'^mysite/', include('mysite.foo.urls')), > > # 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')), > > # Uncomment the next line to enable the admin: > (r'^admin/',include('admin.site.urls')), > (r'^$','mysite.polls.views.index'), > (r'^index','mysite.polls.views.index'), > (r'^detail/(?P<poll_id>\d+)','mysite.polls.views.detail'), > (r'^results/(?P<poll_id>\d+)','mysite.polls.views.results'), > (r'^vote/(?P<poll_id>\d+)','mysite.polls.views.vote'), > (r'^latest','mysite.polls.views.latest'), > (r'^page1', 'polls.views.page1'), > (r'^page2','polls.views.page2'), > (r'^page3','polls.views.page3'), > #(r'^site_media/(?P<path>.*)$') > #django.views.static.serve', {'document_root': '/path/to/media'}) > (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', > {'document_root': '/root/Desktop/mysite/temp1/images'}) > ) > > > -- > Regards, > Rav! > -- Regards, Rav! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
from django.conf.urls.defaults import * from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', #if settings.DEBUG: # urlpatterns += patterns('django.views.static', # (r'^static_media/(?P<path>.*)$', # 'serve', { # 'document_root': '/path/to/static_media', # 'show_indexes': True }),) ) # Example: # (r'^mysite/', include('mysite.foo.urls')), # 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')), # Uncomment the next line to enable the admin: (r'^admin/',include('admin.mysite.urls')), (r'^$','mysite.polls.views.index'), (r'^index','mysite.polls.views.index'), (r'^detail/(?P<poll_id>\d+)','mysite.polls.views.detail'), (r'^results/(?P<poll_id>\d+)','mysite.polls.views.results'), (r'^vote/(?P<poll_id>\d+)','mysite.polls.views.vote'), (r'^latest','mysite.polls.views.latest'), (r'^page1', 'polls.views.page1'), (r'^page2','polls.views.page2'), (r'^page3','polls.views.page3'), #(r'^site_media/(?P<path>.*)$') #django.views.static.serve', {'document_root': '/path/to/media'}) (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/root/Desktop/mysite/temp1/images'}) )