-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SystemCheckError #72
Comments
Thanks. I plan on looking at Django example again in the next week or so. Assigned to me. |
@nuttaa Is this your own code, or the code from this repo? Can you reproduce this after following the instructions here: https://github.com/mdn/django-locallibrary-tutorial#quick-start If so, can you please explain exactly how you got the above error. The admin is rock solid for me. My guess is that this is for your own code and that BookInstance.borrower is not defined. |
Hello @nuttaa I got same ERRORS before when I followed the Django Tutorial Part 4 The first error we should put below code (in models.py not admin.py)
The second error is the Tutorial didn't asked for 'borrower' so we could delete the 'borrower' string in the end probably need to check all admin.site.register() or @admin.register() If it still can't solve your problems, I apologize. |
@nuttaa Pwhau is correct. The first error indicates that display_genre is being called but is not defined. The function is mention in the documentation, so I suspect you just missed this line. Further for the second problem this is reporting that in this line the "borrower" field is not defined
Basically you need a line like this in your model:
The need for adding this line is covered in the user authentication section: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Authentication I think this is resolved. Thanks for your help @pwhau ! |
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
ERRORS:
<class 'catalog.admin.BookAdmin'>: (admin.E108) The value of 'list_display[2]' refers to 'display_genre', which is not a callable, an attribute of 'BookAdmin', or an attribute or method on 'catalog.Book'.
<class 'catalog.admin.BookInstanceAdmin'>: (admin.E108) The value of 'list_display[2]' refers to 'borrower', which is not a callable, an attribute of 'BookInstanceAdmin', or an attribute or method on 'catalog.BookInstance'.
The text was updated successfully, but these errors were encountered: