views:

735

answers:

3

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 calling it, but I want it be called from Django. The user interface should constructed using the Django API only.

Any suggestions?

+4  A: 

Do you mean something like Django's flatpages app? It does exactly what you describe.

jonwd7
A: 

If you want to make a static page the flatpages is a good choice. It allows you to easily create static content. Creating static content is not harder than creating a view really.

googletorp
+5  A: 

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'}),

rubayeet
thanks it works this is only i needed
ha22109