﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16153	Admin.py ignores some models when registering...	jake.logemann@…	nobody	"In my Admin.py for an app (called buildings.py) I import all of the models and list them, or try to at least. Log will display on the Admin page while BankAccount wont. I've restarted the dev server, tried deleting the .pyc file. Im out of ideas. Im using the most basic form of admin.site.register that I can, but I've tried defining the class and it doesnt help.

{{{
from apps.buildings.models import *

class LogAdmin(admin.ModelAdmin):
  list_display = ('building', 'title', 'body', 'logged_at')
  list_display_links = ('title',)
  list_filter = ('logged_at', 'visibility')
  search_fields = ['building']

admin.site.register(BankAccount)
admin.site.register(Log,          LogAdmin)
}}}

Log is viewable in the admin area, bank accounts are not. 
Here are the models...
{{{
from datetime import datetime
from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic

from apps.world.models import *

VISI_LOG_CHOICES = (
    (0,     u'Admin-Only'),
    (1,     u'Owner-Only'),
    (2,     u'Managers'),
    (3,     u'Employees'),
    (4,     u'Public'),
)  
  
class Log(models.Model):
  building = models.ForeignKey(Building, related_name='log_building')
  title = models.CharField(max_length=255, verbose_name=""Job Title"")
  body = models.CharField(max_length=255, verbose_name=""Job Title"")
  visibility = models.IntegerField(choices=VISI_LOG_CHOICES)
  logged_at = models.DateTimeField( default = datetime.now() )


  def __unicode__(self):
    return self.title   

class BankAccount(models.Model):
  nickname = models.CharField( max_length = 50, blank = True )
  rate = models.DecimalField( max_digits = 6, decimal_places = 4, default='0.0000' )
  balance  = models.DecimalField( 
                                 max_digits = 19, 
                                 decimal_places = 2, 
                                 default = '0.00'
                                )}}}
Seems like a bug to me! Maybe my eyes are tired."	Bug	closed	contrib.admin	1.3	Normal	worksforme			Unreviewed	0	0	0	0	0	0
