The url I try: http://127.0.0.1:8000/manifest/archive/?page=1
.
The regex pattern:
- (The original one I tried):
r'^archive/(?P<reverse>[n]{0,1})/?\?page=[0-9]+/?'
- (An easier I also tried in the python console.)
r'^archive/\?page=[0-9]+'
- (The easiest possible, just to try.)
r'^archive/\?page=1'
(But I escaped the question mark in the right way, don't I?)
I tried all of these regexes in the python console and they worked nice, so I think the problem isn't about a wrong regex.
So: why don't this work?
Optional information:
the projects url-conf:
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', RedirectView.as_view(url=reverse_lazy('manifest:index'))),
url(r'^manifest/', include('manifest.urls', namespace='manifest')),
]
note: the url 127.0.0.1:8000/manifest/index
matches as it should, so can't be about everything is made wrong.
The url traceback:
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/manifest/archive/?page=1
Using the URLconf defined in asqiir005.urls, Django tried these URL patterns, in this order:
^admin/
^$
^manifest/ ^$ [name='index']
^manifest/ ^(?P<number>[0-9]+)$ [name='article']
^manifest/ ^archive/\?page=1
^manifest/ ^archive/(?P<reverse>[n]{0,1})/?\?page=[0-9]+/? [name='paged_archive']
^manifest/ ^archive/all/(?P<reverse>[n]{0,1})/?$ [name='whole_archive']
^media\/(?P<path>.*)$
The current URL, manifest/archive/, didn't match any of these.