I've noticed this a few times in my code, and it seemed to come and go as an
issue:
Using various revisions from the SVN trunk over the last 4 months, the
following has caused my admin changelist view for a model to go completely
blank:
# events/models.py
class Event(models.Model):
location = models.ForeignKey('organization.Location')
# admin.py
class EventAdmin(admin.ModelAdmin):
list_display = ('location',)
Yet, this works correctly, and everything shows up as expected--- no bad
data or anything:
# admin.py
class EventAdmin(admin.ModelAdmin):
list_display = ('_location_dummy',)
def _location_dummy(self, instance):
return instance.location
I've literally removed everything from EventAdmin except for the
list_display, as shown.
The ticket tracker shows a *possibly* related issue (
http://code.djangoproject.com/ticket/11460), but I don't think it's the same
thing. In short, when foreign keys are actually invalid, the changelist
wouldn't show the row. In my case however, the entire changelist goes
blank.
An example screenshot:
http://img251.imageshack.us/img251/9950/90902063.png
I used to think that this could have been related to overriding admin
templates, but I'm not even doing that in this project.
Has anybody ever experienced this? It was seriously working just an hour
ago, but somehow I've edited something, somewhere, which suddenly began
causing this problem. I was working on some ModelForms at the time, but
there are no forms involved with my simple example as shown above!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.