what happens if you'remove the commented lines?

On 01/04/11 15:22, hank23 wrote:
> Can someone explain to me what the following error is trying to tell
> me:
> 
> SyntaxError at /polls/1
> invalid syntax (urls.py, line 20)Request Method: GET
> Request URL: http://127.0.0.1:8000/polls/1
> Django Version: 1.2.3
> Exception Type: SyntaxError
> Exception Value: invalid syntax (urls.py, line 20)
> Exception Location: C:\Python27\lib\site-packages\django\utils
> \importlib.py in import_module, line 35
> Python Executable: C:\Python27\python.exe
> Python Version: 2.7.1
> Python Path: ['C:\\Documents and Settings\\hversemann\\djangoprojects\
> \mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
> 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
> \lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
> Server time: Tue, 4 Jan 2011 09:12:32 -0600
> 
> The urls.py module that it is referring to looks like this:
> 
> from django.conf.urls.defaults import *
> 
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
> 
> #urlpatterns = patterns('',
>     # Example:
>     # (r'^mysite/', include('mysite.foo.urls')),
>     # Uncomment the admin/doc line below 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'^polls/$',
> 'polls.views.index'),
> #    (r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
> #    (r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
> #    (r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
> #    (r'^admin/', include(admin.site.urls)),
> #)
> 
> urlpatterns = patterns('',
>     (r'^polls/', include('polls.urls')),
>     (r'^admin/', include(admin.site.urls)),
> )
> 
> 
> and I thought it had previously worked ok when I last tried to use it
> back on the 23rd. I would appreciate any help or direction in
> debugging this since I'm relatively new to both django and python.
> Thanks.
> 
> 


-- 
blog  http://piotr.zalewa.info
jobs  http://webdev.zalewa.info
twit  http://twitter.com/zalun
face  http://facebook.com/zaloon

-- 
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.

Reply via email to