Saturday, January 14, 2006

Typo in urls.py

Hi Adrian,

I tried python urls.py but it seems like the traceback didn't give much away though,

C:\Python24\Django-0.91\django\bin\myproject>python urls.py
File "urls.py", line 6

^
SyntaxError: invalid syntax


Hmmm, I really can't figure anything more from here, there is really nothing in line 6 !!
Below is how my urls.py look like,

from django.conf.urls.defaults import *

urlpatterns = patterns('',
((r'^admin/', include('django.contrib.admin.urls.admin')),
)


Thanks again for all the help so far, really really appreciate it. I wonder if I learn Java instead, would James Gosling drop by and give me some tips too? :-)

1 comment:

Anonymous said...

You've got one too many open-parentheses in there. Remove one of the parentheses before r'^admin/', and it should work.