# was\_published\_recently() takes 1 positional argument but 2 were given

**URL:** <https://forum.djangoproject.com/t/was-published-recently-takes-1-positional-argument-but-2-were-given/13464>\
**Category:** Getting Started\
**Created:** [April 30, 2022, 4:45pm UTC](https://forum.djangoproject.com/t/was-published-recently-takes-1-positional-argument-but-2-were-given/13464 "2022-04-30T16:45:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![adetoroe787](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adetoroe787/32/7568_2.png) [@adetoroe787](https://forum.djangoproject.com/u/adetoroe787)\
**Post date:** [April 30, 2022, 4:45pm UTC](https://forum.djangoproject.com/t/was-published-recently-takes-1-positional-argument-but-2-were-given/13464/1 "2022-04-30T16:45:01Z")

</div>

I am currently going through the Django Documentation building the Polls App. And part 7 where there is the documentation asbout the Admin dashboard.  
I have problem with this line of code which gives me error.

```auto
class QuestionAdmin(admin.ModelAdmin):
    fieldsets = [
        ('Question', {'fields': ['question_text']}),
        ('Date information', {'fields': ['pub_date']}),
    ]
    inlines = [ChoiceInline]
    list_display = ('question_text', 'pub_date', 'was_published_recently')
    @admin.display(
        boolean=True,
        ordering='pub_date',
        description='Published recently?',

```

`was_publish_recently` is the problem here.  
What could be the issue here.

here is the error code

```auto
# TypeError at /admin/poll/question/

was_published_recently() takes 1 positional argument but 2 were given

```

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [April 30, 2022, 10:42pm UTC](https://forum.djangoproject.com/t/was-published-recently-takes-1-positional-argument-but-2-were-given/13464/2 "2022-04-30T22:42:49Z")

</div>

In the tutorial, the decorator and the `was_published_recently` function go in the model class, not the model admin class. See [Writing your first Django app, part 7 | Django documentation | Django](https://docs.djangoproject.com/en/4.0/intro/tutorial07/#customize-the-admin-change-list)
