Re: how to change the root url of a project?

2013-06-26 Thread yang guang
Thank you, Jani! What you said is exactly what I want to know. I didn't distinguish the dev environment and product environment. And I have fixed it now. Guang 在 2013年6月26日星期三UTC+8下午8时07分39秒,Jani Tiainen写道: > > On Wed, 26 Jun 2013 04:40:26 -0700 (PDT) > yang guang wrote:

Re: how to change the root url of a project?

2013-06-26 Thread Sandro Dutra
# urls.py [...] from django.views.generic import TemplateView [...] urlpatterns = patterns('', [...] url(r'mysite/', TemplateView.as_view(template_name="index.html")), [...] ) or import the view you want to use. 2013/6/26 Jani Tiainen > On Wed, 26 Jun 2013 04:40:26 -0700

Re: how to change the root url of a project?

2013-06-26 Thread Jani Tiainen
On Wed, 26 Jun 2013 04:40:26 -0700 (PDT) yang guang wrote: > HI, all > I'm a beginner of django. > Here I start a project named mysite. And I can browse it with > http://127.0.0.1:8000. But now I want to change it to > http://127.0.0.1:8000/mysite/ and stll keep my url

how to change the root url of a project?

2013-06-26 Thread yang guang
HI, all I'm a beginner of django. Here I start a project named mysite. And I can browse it with http://127.0.0.1:8000. But now I want to change it to http://127.0.0.1:8000/mysite/ and stll keep my url mapping as url(r'^$', 'index') instead of (r'^mysite/$', 'index'). Because there are some