3

I was wondering if there's a way to add a static html page in django like an "Faq" or "About us" page. if there is a way please let me know

1 Answer 1

7

I would suggest you to use TemplateView for static page

from django.urls import path
from django.views.generic import TemplateView

urlpatterns = [
    path('about/', TemplateView.as_view(template_name="about.html")),
]

TemplateView should be used when you want to present some information in a html page

TemplateView shouldn’t be used when your page has forms and does creation or update of objects.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.