Re: [Django] #9994: list_filter ignores to_field

2012-03-24 Thread Django
#9994: list_filter ignores to_field
---+---
 Reporter:  jzylks |Owner:  mtredinnick
 Type:  Uncategorized  |   Status:  closed
Component:  contrib.admin  |  Version:  1.0
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+---

Comment (by kmtracey):

 I have opened #17972 to track this regression.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #9994: list_filter ignores to_field

2012-03-22 Thread Django
#9994: list_filter ignores to_field
---+---
 Reporter:  jzylks |Owner:  mtredinnick
 Type:  Uncategorized  |   Status:  closed
Component:  contrib.admin  |  Version:  1.0
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+---
Changes (by graveyboat):

 * ui_ux:   => 0
 * type:   => Uncategorized
 * severity:   => Normal
 * easy:   => 0


Comment:

 This problem seems to have resurfaced in Django 1.3.1.  The uploaded patch
 solves the issue for me.  I don't know if there are more underlying issues
 as mentioned in ticket:9994#comment:2, but it did the trick for me.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #9994: list_filter ignores to_field

2009-03-25 Thread Django
#9994: list_filter ignores to_field
---+
  Reporter:  jzylks| Owner:  mtredinnick
Status:  closed| Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  1.0
Resolution:  fixed |  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by russellm):

 @lucalenardi - You appear to be correct; changeset [10140] introduced a
 regression into 1.0.X. This was corrected in [10170] for trunk; I'll merge
 down the fix for 1.0.X.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9994: list_filter ignores to_field

2009-03-24 Thread Django
#9994: list_filter ignores to_field
---+
  Reporter:  jzylks| Owner:  mtredinnick
Status:  closed| Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  1.0
Resolution:  fixed |  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by lucalenardi):

 After updating Django 1.0.X with this fix, It seems impossible to access
 the flat-pages list. It generates the following exception:

 location url: http://localhost:8000/admin/flatpages/flatpage/

 return:
 {{{
 Environment:

 Request Method: GET
 Request URL: http://localhost:8000/admin/flatpages/flatpage/
 Django Version: 1.0.3 pre-alpha SVN-10163
 Python Version: 2.5.2
 Installed Applications:
 ['django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.admin',
  'django.contrib.admindocs',
  'django.contrib.flatpages',
  'django_extensions',
  'logging',
  'sorl.thumbnail',
  'bloom.device']
 Installed Middleware:
 ('django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.locale.LocaleMiddleware',
  'django.middleware.common.CommonMiddleware',
  'django.contrib.csrf.middleware.CsrfMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
  'django.middleware.transaction.TransactionMiddleware',
  'bloom.device.middleware.DeviceDetectMiddleware')


 Traceback:
 File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in
 get_response
   91. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in
 root
   158. return self.model_page(request, *url.split('/', 2))
 File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py"
 in _wrapped_view_func
   44. response = view_func(request, *args, **kwargs)
 File "/usr/lib/python2.5/site-packages/django/contrib/admin/sites.py" in
 model_page
   177. return admin_obj(request, rest_of_url)
 File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in
 __call__
   189. return self.changelist_view(request)
 File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in
 changelist_view
   651. self.date_hierarchy, self.search_fields,
 self.list_select_related, self.list_per_page, self)
 File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/main.py"
 in __init__
   70. self.filter_specs, self.has_filters =
 self.get_filters(request)
 File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/main.py"
 in get_filters
   78. spec = FilterSpec.create(f, request, self.params,
 self.model, self.model_admin)
 File "/usr/lib/python2.5/site-
 packages/django/contrib/admin/filterspecs.py" in create
   29. return factory(f, request, params, model,
 model_admin)
 File "/usr/lib/python2.5/site-
 packages/django/contrib/admin/filterspecs.py" in __init__
   61. rel_name = f.rel.get_related_field().name

 Exception Type: AttributeError at /admin/flatpages/flatpage/
 Exception Value: 'ManyToManyRel' object has no attribute
 'get_related_field'

 }}}

 Maybe this problem is not related to this fix, so I leave the ticket
 closed.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9994: list_filter ignores to_field

2009-02-28 Thread Django
#9994: list_filter ignores to_field
---+
  Reporter:  jzylks| Owner:  mtredinnick
Status:  assigned  | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Comment (by mtredinnick):

 #10243 is another manifestation of this issue, I suspect.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9994: list_filter ignores to_field

2009-02-26 Thread Django
#9994: list_filter ignores to_field
---+
  Reporter:  jzylks| Owner:  mtredinnick
Status:  assigned  | Milestone:  1.1
 Component:  django.contrib.admin  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9994: list_filter ignores to_field

2009-01-09 Thread Django
#9994: list_filter ignores to_field
---+
  Reporter:  jzylks| Owner:  mtredinnick
Status:  assigned  | Milestone: 
 Component:  django.contrib.admin  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Unreviewed| Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by mtredinnick):

  * owner:  nobody => mtredinnick
  * status:  new => assigned

Comment:

 This isn't a complete fix, since if the related field points to another
 model (chained foreign keys) and so on, I suspect it ends up returning an
 object and not a pk value. This problem exists in a few places were we're
 trying to retrieve the "pk value" (really meaning the representative value
 for the related column) and I keep meaning to fix it holistically in the
 model class.

 Assigning to me so that I have a bug to track that.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #9994: list_filter ignores to_field

2009-01-09 Thread Django
#9994: list_filter ignores to_field
---+
  Reporter:  jzylks| Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Unreviewed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jzylks):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 I've found a possible fix for this:

 filterspecs.py, Line 61

 Changing

 {{{self.lookup_kwarg = '%s__%s__exact' % (f.name,
 f.rel.to._meta.pk.name)}}}

 to

 {{{self.lookup_kwarg = '%s__%s__exact' % (f.name,
 f.rel.get_related_field().attname)}}}

 fixes the problem for me.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---