I have a Django
app (I'm fairly new so I'm doing my best to learn the ins and outs), where I would like to have a url endpoint simply redirect to a static html file in another folder (app).
My project file hierarchy looks like:
docs/
- html/
- index.html
myapp/
- urls.py
My urls.py
looks like:
from django.conf.urls import patterns, include, url
from django.views.generic import RedirectView
urlpatterns = patterns('',
url(r'^docs/$', RedirectView.as_view(url='/docs/html/index.html')),
)
However, when I navigate to http://localhost:8000/docs
I see the browser redirect to http://localhost:8000/docs/html/index.html
, but the page is not accessible.
Is there any reason that the /docs/html/index.html
would not be avalable to the myApp
application in a redirect like this?
An pointers would be greatly appreciated.