here is my myproject/urls.py
urlpatterns = [
url(r'^$', index, name='index'),
url(r'^admin/', admin.site.urls),
url(r'^myapp/', include('myapp.urls'))
]
when i run python manage.py runserver 127.0.0.1:8000 its working fine http://127.0.0.1:8000 http://127.0.0.1:8000/admin http://127.0.0.1:8000/myapp
but I want to like this
http://127.0.0.1:8000/myproject http://127.0.0.1:8000/myproject/admin http://127.0.0.1:8000/myproject/myapp
and all URLs even templates URLs should redirect in the same pattern.
where i can set the single changes in path/Setting to redirect with /myproject/ to work fine. and later I can change with /myproject/ to /project2/ in a single place.
actually, I am running my project from nginx ,
server {
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
is works fine for http://127.0.0.8000/
but where i can set the name in one place like
location /myname/ {
...
}
so that my project will comes under http://127.0.0.8000/myname/myprojet