cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

add explicit url pattern for reg sections #813

Closed ascott1 closed 8 years ago

ascott1 commented 8 years ago

This adds an explicit URL pattern for routing to reg sections via the front-end and should fix a bug where the generic slice at the hash of the URL was causing bits of the URL to be lost.

I wanted to test that this would not cause issues when the site is live at consumerfiannce.gov/eregulations and added the following to urls.py courtesy of @willbarton so that I could serve the site at the /eregulations URI locally:

from django.conf.urls import include
eregs_urlpatterns = urlpatterns
urlpatterns = patterns(
    '',
    url(r'^eregulations/', include(eregs_urlpatterns)),
)

Though this passes all existing tests, I want to be careful that this does not cause any routing issues in production. Any additional manual testing would be appreciated.

Note: It may be worth adding explicit URL routing for each type of route to avoid ambiguity long-term.

willbarton commented 8 years ago

resized_51475d7e-1772-4e8b-972b-1db375dffda9