Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 791149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:47:25+00:00 2026-05-14T21:47:25+00:00

So now I am still at the Django tutorial part 3: http://docs.djangoproject.com/en/1.1/intro/tutorial03/#intro-tutorial03 Trying to

  • 0

So now I am still at the Django tutorial part 3:

http://docs.djangoproject.com/en/1.1/intro/tutorial03/#intro-tutorial03

Trying to set up the urls.py with this piece of code provided by the tutorial

from django.conf.urls.defaults import *

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^polls/$', 'mysite.polls.views.index'),
    (r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'),
    (r'^polls/(?P<poll_id>\d+)/results/$', 'mysite.polls.views.results'),
    (r'^polls/(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
    (r'^admin/', include(admin.site.urls)),
)

If I change my default urls.py (with nothing in it) with this code, the 127.0.0.1:8000/polls/ is showing up, but for some reason the 127.0.0.1:8000/admin is no longer there and gives me the following error:

Exception Type: TemplateSyntaxError
Exception Value: Caught an exception while rendering: Tried vote in module mysite.polls.views. Error was: ‘module’ object has no attribute ‘vote’

And this (Error line 30): 

Caught an exception while rendering: Tried vote in module mysite.polls.views. Error was: 'module' object has no attribute 'vote'
20  <!-- Header -->
21  <div id="header">
22  <div id="branding">
23  {% block branding %}{% endblock %}
24  </div>
25  {% if user.is_authenticated and user.is_staff %}
26  <div id="user-tools">
27  {% trans 'Welcome,' %}
28  <strong>{% firstof user.first_name user.username %}</strong>.
29  {% block userlinks %}
**30    {% url django-admindocs-docroot as docsroot %}**
31  {% if docsroot %}
32  <a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
33  {% endif %}
34  {% url admin:password_change as password_change_url %}
35  {% if password_change_url %}
36  <a href="{{ password_change_url }}">
37  {% else %}
38  <a href="{{ root_path }}password_change/">
39  {% endif %}
40  {% trans 'Change password' %}</a> / 

It seems to me that the error should be here:

(r’^admin/’, include(admin.site.urls)),

But I cant find it.

Thanks for the attention!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:47:26+00:00Added an answer on May 14, 2026 at 9:47 pm

    It’s just that django does not seem to find the function vote inside your module views.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.