Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Django 1.4 new FilterSpec #5

Open
jschrewe opened this issue Mar 29, 2012 · 2 comments
Open

Support for Django 1.4 new FilterSpec #5

jschrewe opened this issue Mar 29, 2012 · 2 comments

Comments

@jschrewe
Copy link
Owner

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

@hellysmile
Copy link

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', )

@jschrewe
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants