Page MenuHomeSoftware Heritage

home-origin.html: fix wrong form action url
ClosedPublic

Authored by jbertran on Sep 2 2016, 5:09 PM.

Diff Detail

Repository
rDWAPPS Web applications
Branch
FixInt
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 455
Build 668: Software Heritage Python tests
Build 667: arc lint + arc unit

Event Timeline

jbertran retitled this revision from to home-origin.html: fix wrong form action url.
jbertran updated this object.
jbertran edited the test plan for this revision. (Show Details)
olasd added a reviewer: olasd.
This revision is now accepted and ready to land.Sep 2 2016, 5:09 PM
olasd requested changes to this revision.Sep 2 2016, 5:10 PM
olasd edited edge metadata.

still not the right placeholder text

This revision now requires changes to proceed.Sep 2 2016, 5:10 PM
jbertran edited edge metadata.

home-origin.html: fix wrong form action url
templates: fix wrong data-toggle attribute on elem
browse: fix redirection url generation issue

ardumont added inline comments.
swh/web/ui/views/browse.py
37

Maybe send this instruction below the 'dir_path' condition code since it's unused in it.

43

Why do you need to do explicitely the condition code on the variable dir_path?

Adapting the existing code with the dir_path renamed was ok, i think.

return redirect(url_for('browse_revision_directory',
                return redirect(url_for('browse_revision_directory',
                                        sha1_git=sha1_git,
                                        dir_path=data.get('dir_path')))
swh/web/ui/views/browse.py
43

Sorry, i mistyped. I meant, this should be enough, shouldn't it?

return redirect(url_for('browse_revision_directory',
                                       sha1_git=sha1_git,
                                       dir_path=data.get('dir_path')))
jbertran edited edge metadata.

Add documentation and factorize directory URL generation

swh/web/ui/views/browse.py
43

Empty GET params (like path) are empty strings when I receive them. This was to avoid giving an empty string to url_for, which would build an incorrect url for the redirect. It's factorized and more legible now :)

jbertran edited edge metadata.

Squashed and didn't update

ardumont edited edge metadata.
ardumont added inline comments.
swh/web/ui/views/browse.py
43

Empty GET params (like path) are empty strings when I receive them. This was to avoid giving an empty string to url_for, which would build an incorrect url for the redirect.

Ok. I did not thought of that.

It's factorized and more legible now :)

Indeed.

Awesome. Thanks.

This revision is now accepted and ready to land.Sep 5 2016, 2:23 PM
This revision was automatically updated to reflect the committed changes.