Django static page?

后端 未结 5 1569
迷失自我
迷失自我 2021-01-30 11:25

I want to make a static page which will be shown to the user only if he/she clicks on a link provided in one of my models. I can do this by making a Python page alone and callin

5条回答
  •  没有蜡笔的小新
    2021-01-30 11:50

    Bypassing views to render a static template, add this line in "urls.py". For example "About Us" page could be

    (r'^about', 'django.views.generic.simple.direct_to_template', {'template': 'path/to/about_us.html'}),
    

提交回复
热议问题