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:
# 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
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
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
4 matches
Mail list logo