I think Django documentation is well written

On Wed, Sep 14, 2016 at 11:52 PM, Timothy Steele <
steeletimothy2...@gmail.com> 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/056f8dd1-258e-49de-b6af-63c7ab5807ff%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/056f8dd1-258e-49de-b6af-63c7ab5807ff%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Shubham Aggarwal

-- 
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/CA%2BprVfbvc5hCcsCwn875OrfPicXyAO2N9b5ysZkTwXEQ9bQf0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to