← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/redirect-201 into lp:launchpad

 

The proposal to merge lp:~sinzui/launchpad/redirect-201 into lp:launchpad has been updated.

Description changed to:

I'm getting oopses while trying to submit a merge proposal where the
description has a non-ASCII character in it. The character in question
was a Unicode emdash.

The traceback shows that the MP was was created, the error happened when
that page is rendeder. While the unicode error is odd, it is equally
odd that the view is rendering HTML for an ajax view with a status
of 201. The work is wasteful.

--------------------------------------------------------------------

RULES

    Pre-implementation: no one
    * The action is setting 201 and the location so that the ajax method
      will issue its own redirect.
      * When the HTML for is used, the action sets next_url which sets up
        a redirection view and does not render the template.
    * Add 201 to the list of statuses that the LaunchpadView does not
      render a content.

QA

    * Visit https://code.qastaging.launchpad.net/~sinzui/launchpad/mailman-archive-0/+register-merge
    * Enter "This has a mdash — that I can see" in the comment field.
    * Submit the MP.
    * Verify your browser loads the MP.

LINT

    lib/lp/app/doc/launchpadview.txt
    lib/lp/services/webapp/publisher.py
    lib/lp/services/webapp/tests/test_publisher.py

LoC

    I have a 16,000 credit this week

TEST

    ./bin/test -vvc -t LaunchpadView lp.services.webapp.tests.test_publisher
    ./bin/test -vvc -t launchpadview.txt lp.app.tests.test_doc

IMPLEMENTATION

I added unittests for _isRedirected() and how __call__() uses it. Added
201 to the list of statuses that do not render page content. I removed
a doctest that was replaced by a unittest.
    lib/lp/app/doc/launchpadview.txt
    lib/lp/services/webapp/publisher.py
    lib/lp/services/webapp/tests/test_publisher.py

Do not render html when status is 201.

For more details, see:
https://code.launchpad.net/~sinzui/launchpad/redirect-201/+merge/136198
-- 
https://code.launchpad.net/~sinzui/launchpad/redirect-201/+merge/136198
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/redirect-201 into lp:launchpad.


References