5

After installing django 1.9 I'm having problems trying to show my apps in the Admin interface, this is my code:

app name: people

#models.py:

from django.db import models

class Person(models.Model):
    name = models.CharField(max_length=100)
#admin.py:
from django.contrib import admin
from .models import Person

admin.register(Person)
#apps.py
from django.apps import AppConfig

class PeopleConfig(AppConfig):
    name = 'people'
#settings.py:
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'people'
]

I changed the last line of INSTALLED_APPS to 'people.apps.PeopleConfig' without success. Python version 3.5

fedorqui
  • 275,237
  • 103
  • 548
  • 598
Eric Acevedo
  • 1,182
  • 1
  • 11
  • 26

1 Answers1

5

I found the problem

#Change:
admin.register(Person)
#To this:
admin.site.register(Person)

Sorry.

Eric Acevedo
  • 1,182
  • 1
  • 11
  • 26