Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:  invalid
 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 timo):

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


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.710f7e9bdccc9cdce6bf8be7421051fe%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:
 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 devo):

 @loic84 - you're a superstar, that resolves the issue on my end. Thank you
 very much!

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.bf6fd22f4089dbdf89a41807c2717d86%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:
 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 loic84):

 @stephenmcd could you try https://gist.github.com/11458982?

 With the latest master of both Mezzanine and Django I get `ImportError:
 cannot import name 'conf' from 'mezzanine'` when attempting to `runserver`
 (probably a circular import); as a result the patch is completely
 untested, let me know the outcome.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.7b74fe55f9749293de86921b8184dbea%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:
 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 stephenmcd):

 Also yes I've been referring to GenericRelation as GFK which really
 confuses things, sorry about 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.6c8e47aadee17e968bf1be6298af2e63%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:
 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 stephenmcd):

 Sorry I really rushed the bug report.

 Some useful context might be where a related issue came up and was
 resolved as part of the 1.6.1 bugfix release:
 https://code.djangoproject.com/ticket/21428

 Again that was for the example with GFKs using custom form fields in the
 admin,something Mezzanine has made heavy use of for a few years now.

 I'm not sure how useful it will be to go over the Mezzanine code base,
 it's a very complex example. I might be able to dig up the old example we
 had for #21428 - either way it will take me some time.

 Anyway here are the relevant parts:

 Here is our GFK field:
 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/generic/fields.py#L164

 Here is a base model that many subclass, eventually using it:
 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/models.py#L125

 Here is an admin class with the above field in its fieldsets:
 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/core/admin.py#L34-L52

 And finally, here is the actual widget that the admin's form will use for
 the GFK:
 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/generic/forms.py#L18

 As you can see there are a significant number of layers to this and so
 without knowing much about Mezzanine I fear going over its code might not
 prove very useful. Again, I'll try and come up with a minimal code example
 if I can, it might just take me some time. Alternatively it's quite easy
 to reproduce this by installing the current master branch of Mezzanine
 from GitHub and running one of these admin change interfaces against
 Django 1.7 beta.

 The guts of it is though it's always been possible for GFK fields to be
 exposed as form fields in the admin given a custom widget, and this has
 regressed due to the new `__call__` implementation, and that one extra
 check in `BoundField.value()` will resolve it at least.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.c2d3bfbdfe61c50b4f9da5543283f0af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:
 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 loic84):

 Putting `and not getattr(data, "do_not_call_in_templates", False)` in
 `BoundField.value()` is ugly since this it's outside the template system.

 I don't quite understand how you can provide a custom widget for GFK, it's
 a virtual field, it doesn't implement a `formfield` method, and it doesn't
 even inherit it from `models.Field` since it subclasses `object` directly.

 Real support for virtualfields hasn't landed in Django yet (refs
 https://github.com/konk/django/tree/soc2013/composite-fields).

 Also GenericRelatedObjectManager is from `GenericRelation` not
 `GenericForeignKey`.

 Could you provide more context? Maybe some examples or pointers to the
 mezzanine codebase?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.68a2b1f57920fb3f66e0913804ea41b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
-+-
 Reporter:  stephenmcd   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:   |  Version:
  contrib.contenttypes   |  1.7-beta-2
 Severity:  Release blocker  |   Resolution:
 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 timo):

 * severity:  Normal => Release blocker
 * cc: loic84 (added)
 * needs_better_patch:   => 0
 * component:  Uncategorized => contrib.contenttypes
 * needs_tests:   => 0
 * needs_docs:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 Change is 04a2a6b0f9cb6bb98edfe84bf4361216d60a4e38. What do you think
 Loic?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.f9826261a0687cf90cc031815beb690d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #22552: 1.7 beta 3 regression - BoundField.value() tries to call GenericRelatedObjectManager instance without args

2014-05-01 Thread Django
#22552: 1.7 beta 3 regression - BoundField.value() tries to call
GenericRelatedObjectManager instance without args
---+
 Reporter:  stephenmcd |  Owner:  nobody
 Type:  Bug| Status:  new
Component:  Uncategorized  |Version:  1.7-beta-2
 Severity:  Normal |   Keywords:
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 In Mezzanine we have a form widget for GFK fields. With Django 1.7 beta 3,
 we get the following error:

 http://hastebin.com/qixuzotumi.mel

 AFAICT: In Django 1.6, `GenericRelatedObjectManager` was not callable, but
 in 1.7 it implements `__call__`. `BoundField.value()` then calls an
 instance of it without args, but `GenericRelatedObjectManager.__call__`
 expects a `manager` arg. `GenericRelatedObjectManager` also implements
 `do_not_call_in_templates`, which seems appropriate here. If I change
 `BoundField.value()` callable check to include `and not getattr(data,
 "do_not_call_in_templates", False)` then it resolves the issue.

 Happy to submit a patch if this sounds like the correct fix - really not
 sure though, quite out of my depth.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.97b25cac3e9556a0a4485cc427f92f38%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.