The errors are relatively obvious to be frank - see the responses below ...


On 08/06/18 14:56, Avitab Ayan Sarmah wrote:
Can you tell me what is wrong in my admin.py file because from exception it seems that list_display() is having something wrong which I am not able to find out

On Fri 8 Jun, 2018, 7:23 PM Mario R. Osorio, <nimbiot...@gmail.com <mailto:nimbiot...@gmail.com>> wrote:

    Looks like you skiped a huge part of the tutorial. you might to go
    back...

    On Thursday, June 7, 2018 at 11:08:15 AM UTC-4, Avitab Ayan Sarmah
    wrote:

        In windows powershell:

        ERRORS:
        <class 'polls.admin.QuestionAdmin'>: (admin.E108) The value of
        'list_display[0]' refers to 'question_text', which is not a
        callable, an attribute of 'QuestionAdmin', or an attribute or
        method on 'polls.Question'.


In your list_display field (on your QuestionAdmin)  refers to a field 'question_text' which doesn't exist on either the QuestionAdmin or the Question model; i.e. that field does not exist in either model.

        <class 'polls.admin.QuestionAdmin'>: (admin.E108) The value of
        'list_display[1]' refers to 'pub_date', which is not a
        callable, an attribute of 'QuestionAdmin', or an attribute or
        method on 'polls.Question'.

In your list_display field (on your QuestionAdmin)  refers to a field 'pub_date' which doesn't exist on either the QuestionAdmin or the Question model; i.e. that field does not exist in either model.

        <class 'polls.admin.QuestionAdmin'>: (admin.E116) The value of
        'list_filter[0]' refers to 'pub_date', which does not refer to
        a Field.

In your list_filter field (on your QuestionAdmin)  refers to a field 'pub_date' which doesn't exist on either the QuestionAdmin or the Question model; i.e. that field does not exist in either model.

To be honest the error message you got says exactly what the problem is - the fields that you think exist don't exist. You need to check your models, and check the field names, spellings etc.


-- You received this message because you are subscribed to a topic in
    the Google Groups "Django users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/django-users/444q_hv6-aA/unsubscribe.
    To unsubscribe from this group and all its topics, send an email
    to django-users+unsubscr...@googlegroups.com
    <mailto:django-users+unsubscr...@googlegroups.com>.
    To post to this group, send email to django-users@googlegroups.com
    <mailto: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/8c65b7f0-9ca7-4e07-8167-fb29274710e1%40googlegroups.com
    
<https://groups.google.com/d/msgid/django-users/8c65b7f0-9ca7-4e07-8167-fb29274710e1%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout.

--
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 <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto: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/CAEx5wm7JH77g9JfU%3DzHY3%2BCiDbnD3vDnaXLy%3DV1mE8E2wCrd2g%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CAEx5wm7JH77g9JfU%3DzHY3%2BCiDbnD3vDnaXLy%3DV1mE8E2wCrd2g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
--
Anthony Flury
email : *anthony.fl...@btinternet.com*
Twitter : *@TonyFlury <https://twitter.com/TonyFlury/>*

--
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/d887e00e-6f3c-b7d9-ded0-898c0e8b5f1d%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to