Re: [Django] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-04-08 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  closed| Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:  fixed |  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Fixed in r10454.

-- 
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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-04-02 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Comment (by julien):

 I applied the patch and I confirm that it fixes the bug I described in:
 http://groups.google.com/group/django-
 users/browse_thread/thread/ffd3d498724fd0a1

 +1 for checking this in.

-- 
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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-04-01 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by mrmachine):

  * needs_tests:  1 => 0

Comment:

 I couldn't apply this patch easily with the `patch` app. I'm not sure if
 that is because the diff was created with the wrong tool (`diff --git` as
 opposed to `svn diff`), or with the wrong base path ("a"), or is just not
 understood by `patch` because it includes the diff statement in the first
 line.

 Whatever the reason, I applied it manually and ran the tests (before and
 after) and they do demonstrate the problem and show that it is fixed, so
 I'm changing the "needs tests" flag.

-- 
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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-04-01 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Comment (by mrmachine):

 I hit this problem as well. The `ModelAdmin.formfield_for_dbfield`
 refactor in [9760] changed behaviour by using a dict key lookup instead of
 `isinstance()` to map model fields to form fields and widgets.

 Previously if you had subclassed `DateTimeField` (for example as
 `AUDateTimeField` to use Australian format date input formats by default),
 `formfield_for_dbfield()` would still see it as a `DateTimeField` and use
 the `SplitDateTimeField` form field and `AdminSplitDateTime` form widget.

 Now you need to explicitly add an item to `ModelAdmin.formfield_overrides`
 for every model that uses your custom `AUDateTimeField`, which seems to
 defeat the purpose of using a custom model field with a different default
 input format and violates DRY.

 This patch should restore the existing behaviour from before the refactor
 and will still allow users to add their own mapping if in fact they do
 want to use their own form field or widget instead of the admin default.

-- 
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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-04-01 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * stage:  Ready for checkin => Accepted

Comment:

 I'm really not sure this patch is needed. ModelAdmin.__init__ already
 applies `self.formfield_overrides` *over* the defaults, so I don't quite
 see what the point is here. Plus, the description of the ticket implies
 something about custom model fields, which I don't quite get either.

 I'm kicking this back to accepted; we need more details from the original
 poster about what he's trying to do and what's broken here.

-- 
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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-03-31 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Ready for checkin | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * stage:  Accepted => Ready for checkin

-- 
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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-03-15 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Changes (by Alex):

  * needs_tests:  0 => 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] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-02-27 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
---+
  Reporter:  Alex  | Owner:  Alex
Status:  new   | Milestone:  1.1 
 Component:  django.contrib.admin  |   Version:  1.0 
Resolution:|  Keywords:  
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  0   
Needs_better_patch:  0 |  
---+
Changes (by jacob):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * milestone:  => 1.1

Comment:

 Wow, I never knew `mro` existed. Learn something new every day.

-- 
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
-~--~~~~--~~--~--~---



[Django] #10059: New admin formfield_for_dbfield doesn't play nice with subclassing

2009-01-17 Thread Django
#10059: New admin formfield_for_dbfield doesn't play nice with subclassing
--+-
 Reporter:  Alex  |   Owner:  Alex  
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.0   
 Keywords:|   Stage:  Unreviewed
Has_patch:  1 |  
--+-
 If you subclass a model field you don't get to keep the admin widgets
 unless you readd them to the formfield overides.

-- 
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
-~--~~~~--~~--~--~---