Bypass views to render a static page/template in Django Project

 Django project

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


** please note you have to save the about_us.html into template folder of your project.

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...