Open jschrewe opened 12 years ago
it seems filter doesnt works, i have 'ReferenceField' object has no attribute 'rel'
on any filter
pip freze
mongoadmin==0.1.3
mongodbforms==0.1.5
mongoengine==0.6.9
pymongo==2.3
models
class City(Document):
title = StringField(required=True, unique=True)
def __str__(self):
return self.title
class Category(Document):
title = StringField(required=True, unique=True)
city = ReferenceField(City, reverse_delete_rule=CASCADE, required=True)
def __str__(self):
return self.title
admin
class CategoryAdmin(DocumentAdmin):
search_fields = ('title', )
list_filter = ('city', )
Okay better late then never I guess. The rel
attribute thing is fixed. The list_field
with reference field won't fix though. Sorry, see the addition to the readme about the why.
This is at the moment patched to work just like it did in Django 1.3. The current fix is in views.py#55-60.
See release notes https://docs.djangoproject.com/en/dev/releases/1.4/#list-filters-in-admin-interface