Changes between Initial Version and Version 1 of Ticket #23616


Ignore:
Timestamp:
10/08/2014 12:41:50 AM (5 years ago)
Author:
ranjur
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23616 – Description

    initial v1  
    11I have a model:
    22#models.py
     3{{{
    34class TaggedItem(models.Model):
    45    tag = models.SlugField()
     
    1011        return self.tag
    1112
    12 And model with GenericRelation
     13# And model with GenericRelation
    1314class Bookmark(models.Model):
    1415    url = models.URLField()
    1516    tags = GenericRelation(TaggedItem)
    1617
    17 
     18}}}
    1819#admin.py
     20{{{
    1921class BookmarkAdmin(admin.ModelAdmin):
    2022    list_filter = ('tags__tag')
    2123
    2224admin.site.register(models.Bookmark, BookmarkAdmin)
    23 
     25}}}
    2426It will list all the `tag` in the filter, but when I try to filter it throws error `'GenericRel' object has no attribute 'get_related_field'`
    2527
Back to Top