python - Django Model Class Missing in Admin -


for reason, classes archive , album show of fields in django admin panel, image isn't showing album field when go add image image panel. if open shell, shows album subset of image, isn't showing in image's admin interface (but through cli). why?

class archive(models.model):     name = models.charfield(max_length = 30)     archivedata = models.textfield(blank=true, help_text="documentation album/image.archivedata methodology put here")     def __unicode__(self):         return self.name  class tag(models.model):     archive = models.foreignkey(archive)     tag = models.charfield(max_length=60)     def __unicode__(self):         return self.tag  class album(models.model):     archive = models.foreignkey(archive)     title = models.charfield(max_length=60)     tags = models.manytomanyfield(tag, blank=true, help_text="searchable keywords")     archivedata = models.textfield(blank=true, null=true, help_text="data specific particular archiving methods or processes can stored here")     def __unicode__(self):         return self.title  class image(models.model):     album = models.foreignkey(album)     archive = models.foreignkey(archive)     imagefile = models.imagefield(upload_to='ns/') #image.width/height     title = models.charfield(max_length=60, blank=true, help_text="descriptive image title")     tags = models.manytomanyfield(tag, blank=true, help_text="searchable keywords") 

update: including admin.py per request:

from django.db.models import get_models, get_app django.contrib import admin django.contrib.admin.sites import alreadyregistered  def autoregister(*app_list):     app_name in app_list:         app_models = get_app(app_name)         model in get_models(app_models):             try:                 admin.site.register(model)             except alreadyregistered:                 pass  autoregister('appname') 

i not see problem have code in admin? code overrides album field ?

photo


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -