Search code examples
djangodjango-admin

Django App Not Showing up in Admin Interface


I'm currently moving from my development server to an Apache web production server.

I've tried doing the following just by copying it over and I can login to the admin panel but it doesn't show up.

My admin.py in my app looks like this:

    import models
    from django.contrib import admin

    admin.site.register(models.Organization)

And here is my models.py

from django.db import models

class Organization(models.Model):
    name = models.CharField(max_length=100)
    website = models.URLField()
    azon_code = models.CharField(max_length=50)
    gooe_code = models.CharField(max_length=50)
    cj_code = models.CharField(max_length=50)

I've resyned the database and restarted apache as well thinking that might do something.


Solution

  • Aren't you supposed to import like:

    from mysite.myapp.models import Organization
    admin.site.register(Organization)