Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1726. Remove the third argument of get_redirect_route in main.py #2480

Merged
merged 1 commit into from
Sep 18, 2016
Merged

Fix #1726. Remove the third argument of get_redirect_route in main.py #2480

merged 1 commit into from
Sep 18, 2016

Conversation

Andimeo
Copy link
Contributor

@Andimeo Andimeo commented Sep 16, 2016

Fix #1726 .
Generate the field name as regex_route.replace('/', '_')

@codecov-io
Copy link

Current coverage is 47.72% (diff: 100%)

Merging #2480 into develop will not change coverage

@@            develop      #2480   diff @@
==========================================
  Files           191        191          
  Lines         16181      16181          
  Methods        2800       2800          
  Messages          0          0          
  Branches       2743       2743          
==========================================
  Hits           7722       7722          
  Misses         8459       8459          
  Partials          0          0          

Powered by Codecov. Last update 91bddcb...0316982

@seanlip
Copy link
Member

seanlip commented Sep 16, 2016

Couple of questions:

  • do we actually need a field name? I remember this was inserted before 'just because' it was needed in the regex route thing.
  • do we need get_redirect_route(), or is it sufficient to just add /? at the end of every regex?

@Andimeo
Copy link
Contributor Author

Andimeo commented Sep 17, 2016

@seanlip Do you mean that we add '/?' at the end of each regex then form a tuple, (regex_path, handler_class), just like the mapreduce_handlers?

@Andimeo
Copy link
Contributor Author

Andimeo commented Sep 17, 2016

@seanlip I tried the above proposal. But for create, either r'%s/<collection_id>' or r'%s/<collection_id>/?' doesn't work, no matter I visit /create/$collection_id or /create/$collection_id/.

@Andimeo
Copy link
Contributor Author

Andimeo commented Sep 17, 2016

@seanlip I tried with SimpleRoute and Route, but neither works. For SimpleRoute, it can't parse the arguments from the path. For Route, it will escape the '/?' I add as '/?'. Should we stick to the RedirectRoute thing?

@seanlip
Copy link
Member

seanlip commented Sep 18, 2016

OK, thanks for investigating! Yep, the current solution looks good; LGTM. Thanks!

@seanlip seanlip merged commit 38a33c5 into oppia:develop Sep 18, 2016
@Andimeo Andimeo deleted the issue-1726 branch September 20, 2016 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants