I've got an error in my urls:
TypeError at / can only concatenate tuple (not "list") to tuple
Can't get what I did wrong. Where is the list in there?
from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = ('googleapi.apiapp.views',
(r'^$', 'first_view'),
)
urlpatterns += patterns('',
# 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)),
# Static files url.
(r'^site_media/media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
(r'^site_media/static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}),
)
Traceback:
File "/home/i159/Env/googleapi/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
101. request.path_info)
File "/home/i159/Env/googleapi/lib/python2.6/site-packages/django/core/urlresolvers.py" in resolve
250. for pattern in self.url_patterns:
File "/home/i159/Env/googleapi/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_url_patterns
279. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/i159/Env/googleapi/lib/python2.6/site-packages/django/core/urlresolvers.py" in _get_urlconf_module
274. self._urlconf_module = import_module(self.urlconf_name)
File "/home/i159/Env/googleapi/lib/python2.6/site-packages/django/utils/importlib.py" in import_module
35. __import__(name)
File "/home/i159/workspace/apiroot/googleapi/../googleapi/urls.py" in <module>
24. {'document_root': settings.STATIC_ROOT}),
Exception Type: TypeError at /
Exception Value: can only concatenate tuple (not "list") to tuple
patternsis returning a list not a tuple. @Constantinius it was in his link, I moved it into the post.