Have you looked at the official Django documentation?

http://masteringdjango.com/django-book/ is another nice resource.

On Wednesday, September 14, 2016 at 2:22:18 PM UTC-4, Timothy Steele wrote:
>
> Thanks Tim it has work this time but can any one help me with a beginner 
> book to learn Django please
>
>
>
> On Wednesday, September 14, 2016 at 4:44:14 PM UTC+1, Timothy Steele wrote:
>>
>> 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>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3d2a0d8a-5ad8-4371-b93f-8e04c1fc2216%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to