Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8787 closed (fixed)

Tests are currently failing on django trunk

Reported by: Alex Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: 1.0-blocker
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


It's the admin_widget tests.

Attachments (2)

django-admin-widget-test.diff (4.6 KB) - added by Alex 8 years ago.
django-admin-widget-test.2.diff (4.6 KB) - added by Alex 8 years ago.
Refactored methods for simplicty

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by Alex

comment:1 Changed 8 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by Alex

  • Keywords 1.0-blocker added

comment:3 Changed 8 years ago 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.

Changed 8 years ago by Alex

Refactored methods for simplicty

comment:4 Changed 8 years ago by brosner

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [8846]

comment:5 Changed 5 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top