How to set base URL in Django

后端 未结 4 494
故里飘歌
故里飘歌 2021-01-04 09:30

I would like to run Django from location https://www.example.com/someuri/ so that I have the admin interface at https://www.example.com/someuri/admin/. I can see the login w

4条回答
  •  被撕碎了的回忆
    2021-01-04 10:08

    This should work for you.

    from django.conf.urls import patterns, url
    
    urlpatterns = patterns('',
        (r'^someuri/admin/', include(admin.site.urls) ),
    )
    

提交回复
热议问题