#26979: Using an admin.RelatedOnlyFieldListFilter in admin does not working if a
type of a field is ForeignKey and value to_field is not pk (in my case it
is UUID).
-------------------------------+---------------------------------------
     Reporter:  setivolkylany  |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  contrib.admin  |    Version:  1.9
     Severity:  Normal         |   Keywords:  Admin, ForeignKey, models
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+---------------------------------------
 '''a field of a model "User"'''


 {{{
 level = models.ForeignKey(
         'UserLevel',
         verbose_name='Level',
         related_name='users',
         default=UserLevel.CHOICES_LEVEL.regular,
         to_field='name',
         on_delete=models.PROTECT,
     )
 }}}


 an all code of a models.py is here http://dpaste.com/3SC68RK

 '''a list_filter in a class AdminUser'''


 {{{
 list_filter = [
         ('level', admin.RelatedOnlyFieldListFilter),  # does not working
 since UUID not accetabled
         'is_superuser',
         ListFilterLastLogin,
         'date_joined',
     ]
 }}}


 an all code of a admin.py is here http://dpaste.com/0R0KPR9

--
Ticket URL: <https://code.djangoproject.com/ticket/26979>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/056.493e4af7233a4e6e73852d7c141b19e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to