Thursday, February 23, 2017

Re: Django Tutorial Part 2 - Model not showing up on Django Admin

I think I figured it out - I was rstartin **nginx** when I was should have been restarting my app server, **Gunicorn**. Surprisingly, restarting Gunicorn crashed my server.... Looking into it and will come back here if I get stuck again.

Thanks for the swift reply, btw:)

On Thursday, February 23, 2017 at 4:32:55 AM UTC+2, Dylan Reinhold wrote:
Post your admin.py file and make sure that admin.py file is in your app folder.

For #3, when you added your app and ran makemigrations it should have built a migration file for any of your models in model.py.


On Wed, Feb 22, 2017 at 1:20 PM, t0mgs <t...@kidonpoint.com> wrote:
Hi there,

This is my first time inside a mailing list. Oh, the jitters! :)

Anyways, in the second part of the Django tutorial there's a section in which we are to modify our `admin.py` file in order to make sure the Django admin site recognizes our objects and pulls them up when it is loaded. 

I'm not sure if that's a glitch in the actual tutorial, and I imagine it's not, but for the life of me I can't figure out the problem.

I've managed to:
  1. 1. Registered my app in the admin.py file.
  2. 2. Added it to INSTALLED_APPS in settings.py in my project folder.
  3. 3. Ran python manage.py makemigrations & python manage.py migrate without any changes.
  4. 4. Made sure the user I'm signing in with has superuser priviliges (as per this answer).
  5. 5. Restarted my nginx.
 If anyone can help, I would love to stop smashing my head against the wall.

Tips on how to debug the admin site will also be highly appreciated.

Thanks in advance!

-T

--
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...@googlegroups.com.
To post to this group, send email to django...@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/d3c8e0a3-a6f9-4d0d-8499-8db66d452110%40googlegroups.com.
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+unsubscribe@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/6bffaec0-af3b-41e6-bfb3-62dce027c421%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment