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 8195037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:00:07+00:00 2026-06-07T05:00:07+00:00

In tutorial here I get down to where you run was_published_recently and I get

  • 0

In tutorial here I get down to where you run was_published_recently and I get this error:

ImproperlyConfigured at /admin/polls/poll/
PollAdmin.list_display[2], ‘was_published_recently’ is not a callable or an attribute of ‘PollAdmin’ or found in the model ‘Poll’.
Request Method: GET
Request URL: /admin/polls/poll/
Django Version: 1.4
Exception Type: ImproperlyConfigured
Exception Value:
PollAdmin.list_display[2], ‘was_published_recently’ is not a callable or an attribute of ‘PollAdmin’ or found in the model ‘Poll’.
Exception Location: C:\Python27\lib\site-packages\django\contrib\admin\validation.py in validate, line 38

here is my code:

from polls.models import Poll

from django.contrib import admin

from polls.models import Choice

class ChoiceInline(admin.TabularInline):
  model = Choice
  extra = 3

class PollAdmin(admin.ModelAdmin):

   fieldsets = [
    (None,               {'fields': ['question']}),
    ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
    ]
   inlines = [ChoiceInline]

class PollAdmin(admin.ModelAdmin):
   # ...
   list_display = ('question', 'pub_date', 'was_published_recently')

  admin.site.register(Poll, PollAdmin)

here is my poll model

  from django.db import models

  class Poll(models.Model):
   question = models.CharField(max_length=200)
   pub_date = models.DateTimeField('date published')


  class Choice(models.Model):
   poll = models.ForeignKey(Poll)
   choice = models.CharField(max_length=200)
   votes = models.IntegerField()

  class Poll(models.Model):
   # ...
   def __unicode__(self):
    return self.question

  class Choice(models.Model):
    # ...
    def __unicode__(self):
    return self.choice
  • 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-06-07T05:00:10+00:00Added an answer on June 7, 2026 at 5:00 am

    Can you update your question with your Poll model?

    It looks like you may have made a mistake when adding the was_published_recently method to your Poll model in the Playing with the API step in Tutorial 1.

    Update:

    Now that you’ve posted your model, it does look as if you’ve missed out the was_published_recently method. Go back over tutorial 1 and add it in.

    Secondly, don’t include each model more than once in models.py – the second one will replace the first.

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

Sidebar

Related Questions

I have followed this tutorial here as mentioned exactly I now try to run
I'm a complete jquery newbie, but I'm following this tutorial here to get me
I followed this tutorial here: http://www.dannyherran.com/2011/02/facebook-php-sdk-and-codeigniter-for-basic-user-authentication/ It works great but when I enable CSRF
I'm trying to run NeHe's tutorial here using Python 2.7.3, but It's throwing the
I get this error on my Android emulator: Sorry The application has stopped unexpectedly.
I've followed the tutorial here: http://developer.android.com/resources/tutorials/views/hello-gridview.html I'm wondering how I get place text over
I'm trying to implement chained drop down boxes using the tutorial here . My
Ok, i followed this tutorial (code is down below on the page, just top
I'm winding throught this Yabe tutorial and have been happily get bugs and solving
I'm following this tutorial: http://www.javascripttoolbox.com/jquery/ And I'm trying to get table rows that are

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.