#8787: Tests are currently failing on django trunk
--------------------------------------+-------------------------------------
Reporter: Alex | Owner: nobody
Status: new | Milestone: 1.0
Component: Admin interface | Version: SVN
Resolution: | Keywords: 1.0-blocker
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------+-------------------------------------
Comment (by mtredinnick):
Those two copies of `url_parameters()` is a bug waiting to happen (we'll
update one and forget the other). Since the second case is in a class that
inherits from the first, write a method that does the initial stuff
(`base_url_parameters()`) and then `url_parameters()` in
`ForeignKeyRawIdWidget` can call that and update the result, whilst
`url_parameters()` in `ManyToManyRawIdWidget` can just be an alias to
`base_url_parameters()` (or call it and do nothing). That way, you exploit
the subclassing and factor out the common code.
Also, you seem to be doing some manual escaping in that string (I know
you're only copying earlier code, but if it's a bug, we should fix it). Is
it guaranteed that that's the only escaping needed? Can you use Python's
query string construction code and then call `escape()`? I'm wondering
whether it's possible to have say a double-quote or a closing angle
bracket in the parameter values somehow.
--
Ticket URL: <http://code.djangoproject.com/ticket/8787#comment:3>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---