On Feb 4, 8:56 am, workingbird <zh.z...@gmail.com> wrote: > i the database is created successfully, and i can sign in as a > super_user. > and in model documentation (http://localhost:8000/admin/doc/models/), > the 'Account' model can be found. > the problem is that, the on Site administration home page ,it is only > 2 groups and their models: Auth, Sites. there is no 'myapp' group and > the model('Account') of 'myapp'. > > here is my code: > 1. myapp/models.py > from django.db import models > > class Account(models.Model): > email = models.EmailField() > password = models.CharField(max_length=32) > create_date = models.DateTimeField(auto_now=True) > > class Admin(object): > pass > > def __str__(self): > return self.name
Where did you find documentation telling you to use either the inner Admin class, or the __str__ method? Both of these are from very old versions of Django, although it is the first issue that's causing your models not to appear in the admin. Please follow the actual online documentation here: http://docs.djangoproject.com/en/dev/ -- DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---