{{{
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.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Seems to be fixed in 1.10.
https://code.djangoproject.com/ticket/25606
https://github.com/django/django/commit/815f4d206dfea41bdff167283c2cac43a71524ac
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:1>
* status: new => closed
* type: Uncategorized => Bug
* resolution: => needsinfo
Comment:
What's the error? I can't reproduce a crash in 1.10, 1.9, or 1.8 but maybe
I didn't reproduce it correctly. If you can put together a simplified
sample project without any third-party dependencies, that makes the issue
much easier to triage.
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:2>
Comment (by setivolkylany):
Replying to [comment:2 timgraham]:
> What's the error? I can't reproduce a crash in 1.10, 1.9, or 1.8 but
maybe I didn't reproduce it correctly. If you can put together a
simplified sample project without any third-party dependencies, that makes
the issue much easier to triage.
I created mini-project for the Django`s Team
https://bitbucket.org/setivolkylany/testdjango
If you need more details, do not be shy and contact with me
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:3>
Comment (by timgraham):
After 815f4d206dfea41bdff167283c2cac43a71524ac, the sample project shows
"Cannot find 'comment' on Utility object, 'comment' is an invalid
parameter to prefetch_related()".
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:4>
Comment (by setivolkylany):
Replying to [comment:4 timgraham]:
> After 815f4d206dfea41bdff167283c2cac43a71524ac, the sample project shows
"Cannot find 'comment' on Utility object, 'comment' is an invalid
parameter to prefetch_related()".
Sorry, but this commit related with a Django`s version 1.10, I am using
the 1.9.7 (if you see requirements.txt).
The problem is in a field models.UUIDField, because with a field
models.AutoField() all working properly (I am tested it)
Thus, please explain me, how "Added support for "__" lookup in
RelatedOnlyFieldList" is related with UUIDField
Second, I had mistake in code (I corrected it in new commit)
Instead of
{{{
qs = qs.prefetch_related('comment')
}}}
must be
{{{
qs = qs.prefetch_related('comments')
}}}
Thirdly
In real projects I am using PostgreSQL, no SQLite. But, I think it is not
have sense for this problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:5>
* resolution: needsinfo => fixed
Comment:
As far as I can tell this issue is fixed in Django 1.10 by the commit I
mentioned. Per our [https://docs.djangoproject.com/en/dev/internals
/release-process/#supported-versions supported versions policy], Django
1.9.x is receiving only security and data loss fixes.
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:6>
Comment (by setivolkylany):
Replying to [comment:6 timgraham]:
> As far as I can tell this issue is fixed in Django 1.10 by the commit I
mentioned. Per our [https://docs.djangoproject.com/en/dev/internals
/release-process/#supported-versions supported versions policy], Django
1.9.x is receiving only security and data loss fixes.
Thus it is bug in the Django 1.9.7 and it must be change status
from
#26979 closed Bug (fixed)
to
#26979 open Bug (unfixed)
Are you make it?
Other developers must be know about this problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:7>
Comment (by timgraham):
There isn't a ticket status for unfixed bugs in older version of Django.
"Fixed" simply means "fixed in some version of Django."
--
Ticket URL: <https://code.djangoproject.com/ticket/26979#comment:8>