Instead of providing the view itself, i want to pass its module path as a string in the urls.py file as the code below
urlpatterns = ['',
url(r'^$', main_page),
url(r'^user/(\w+)/$', user_page),
url(r'^login/$', 'django.contrib.auth.views.login'),
]
but it return this information
TypeError: view must be a callable or a list/tuple in the case of include()
please any help
below is also the HTML form .
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Django Bookmark - User Login</title>
</head>
<body>
<h1>User Login</h1>
{% if form.has_errors %}
<p>Your username and password didn't match.</p>
{% endif %}
<form method="post" action=".">
<p><label for="id_username">Username:</label>{{ form.username }}</p>
<p><label for="id_password">Password:</label>{{ form.password }}</p>
<input type="hidden" name="next" value="/"/>
<input type="submit" value="login"/>
</form>
</body>
</html>