CodeforNepal / nepalmap_federal

Instance of NepalMap for federal Nepal. Join us!
https://nepalmap.org
MIT License
14 stars 20 forks source link

Update 404 page #53

Closed ravinepal closed 4 years ago

ravinepal commented 5 years ago

https://nm-fed.eastus.cloudapp.azure.com/profiles/ -- shows 404 (See text below from current 404 page).

let's find best practice for useful to show on 404 page.

Text:

Using the URLconf defined in wazimap.urls, Django tried these URL patterns, in this order:

^$ [name='homepage']
^about$ [name='about']
^help$ [name='help']
^profiles/(?P<geography_id>\w+-\w+)(-(?P<slug>[\w-]+))?/$ [name='geography_detail']
^embed/iframe.html$ [name='embed_iframe']
^(embed_data/)?profiles/(?P<geography_id>\w+-\w+)(-(?P<slug>[\w-]+))?\.json$ [name='geography_json']
^compare/(?P<geo_id1>\w+-\w+)/vs/(?P<geo_id2>\w+-\w+)/$ [name='geography_compare']
^api/1.0/data/show/latest$ [name='api_show_data']
^api/1.0/data/download/latest$ [name='api_download_data']
^api/1.0/table$ [name='api_list_tables']
^api/1.0/geo/(?P<geo_id>\w+-\w+)/parents$ [name='api_geo_parents']
^tables/(?P<table>[a-zA-Z0-9_-]+)/$ [name='table_detail']
^data/$ [name='table_search_redirect']
^data/(?P<format>map|table|distribution)/$ [name='data_detail']
^examples/(?P<example_slug>[-\w]+)/$ [name='example_detail']
^locate/$ [name='locate']
^healthcheck$ [name='healthcheck']
^robots.txt$
^place-search/json/$ [name='place_search_json']

The current URL, profiles/, didn't match any of these.

clifton-mcintosh commented 5 years ago

Yes, we should have a more generic page when not in a test environment. In the "beta" version, this is useful information to help solve bugs. I would suggest we continue to display this verbose message in the beta server

cliftonmcintosh commented 5 years ago

This commit in the https://github.com/Code4Nepal/nepalmap_app project has the line to add:

https://github.com/Code4Nepal/nepalmap_app/pull/238/commits/1c9d398be7f99f15fb550adca31f3366870930e3

cliftonmcintosh commented 5 years ago

@ravinepal

Can you please create an issue for the underlying error as well?

amitness commented 5 years ago

@ravinepal @clifton-mcintosh Looks like this is already solved? I see a generic 404 page right now.

image