Django Generic Login View Return 'str Object Not Callable' Error
My urls.py in myProject is from django.conf.urls import patterns, include, url from testapp import urls urlpatterns = patterns('', url(r'^', include(urls)), ) and my urls.py
Solution 1:
To clear out Thomas's answer, which is right. Pass the form itself, not the string:
from testapp.forms import UsersForm
url(r'^$', 'django.contrib.auth.views.login', {'template_name': 'testapp/templates/login.html', 'authentication_form':UsersForm}),
Solution 2:
You need to pass the actual form class for "authentication_form"
not the name "UsersForm"
.
Post a Comment for "Django Generic Login View Return 'str Object Not Callable' Error"