1👍
✅
If your urls.py
file is exactly as shown, you have a typo in it:
urlpatterns = patterns('',
url(r'^$', CustomerForm.as_view, name ='add_customer')),
The trailing comma turns the variable from a patterns
object into a 1-length tuple of the patterns
object, eg:
>>> foo = 1,
>>> type(foo)
<type 'tuple'>
Source:stackexchange.com