Hello:

  I ran into this strange problem with Django.  I'm using the latest
development branch from SVN (because I have to edit the default regular
expression for the admin urls, which I was told in #django is only
available in the development release).  I am running django with
mod_python and Apache2.

  My project is called : containers
  My app is called : admin

  Everything works great and I can use the Python shell to add objects
and interact with the database API.

  The problem is when I tried to add the admin section.  First, the
system gave me an error that django.contrib.admin was not in my
INSTALLED_APPS.  It was:

INSTALLED_APPS = (
    'container.apps.admin',
    'django.contrib.admin',
)

Then I changed the above to :

INSTALLED_APPS = (
    #'container.apps.admin',
    'django.contrib.admin',
    'container.apps.admin',
)

Then the administration section came up.  Now however, none of my
models show up in the administration section.  Snippet from the model
file:

# The main container object describing
# the various serial numbers of the
# containers

class Container(meta.Model):
        dodnum = meta.CharField(maxlength=20)
        originalnum = meta.CharField(maxlength=150)
        manufactnum = meta.CharField(maxlength=150)
        ctype = meta.ForeignKey(ContainerType)

        def __repr__(self):
                return "[ DOD# ] : %s\n[ Replaced ] : %s\n[ Manufact. ]
: %s" % self.dodnum,self.originalnum,self.manufactnum

        class META:
                admin = meta.Admin()

# Condemned containers

class CondemnedContainer(meta.Model):
        cid = meta.ForeignKey(Container)
        damage = meta.TextField()
        remarks = meta.TextField()
        uid = meta.ForeignKey(User)
        cdate = meta.DateField()

        class META:
                admin = meta.Admin()

Any ideas on what is wrong here?  There are no errors in the server
logs, and I have restarted the server after every change.

Reply via email to