Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1002125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:47:03+00:00 2026-05-16T07:47:03+00:00

Building a django app with some mostly static pages at the front of the

  • 0

Building a django app with some mostly static pages at the front of the site e.g. about.html faq.html

that kind of thing

I was looking at how urls.py work and I created this.

('(.+\.html)$', direct_to_template),

It seems to do exactly what I needed. Now for any new .html page I add to the root of my templates folder it just works. templates/about.html templates/faq.hml

I can also use things like this in my templates

{% include "_menu.html" %}

Now someone has kindly pointed out Django FlatPages and suggested maybe I use them instead. If I’m not connecting to the db are there any disadvantages to the way I’m doing it.

Seems to me like its a better way to do it than FlatPages because it uses the db and isn’t quite as elegant (haven’t actually used flatpages in practice though)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:47:04+00:00Added an answer on May 16, 2026 at 7:47 am

    I would suggest moving one step further. If your static content doesn’t change frequently and doesn’t make use of Django’s templates then don’t use Django to serve them. Use a light weight server such as Nginx instead.

    If you do make use of Django’s template features without requiring any dynamic content from the database then you can stick with direct_to_template.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a django app that requires some currency entries. I am trying
I'm building a Django app that will need SSL on all user-facing pages. On
I'm building a web app on Django. The client insists that some column on
I'm building a site in django that interfaces with a large program written in
I'm building a site with django that lets users move content around between a
I'm building a django app that has an image gallery, and the client insists
I'm building a django based database app that allows users to upload supporting documentation.
I am building a django app that uses SQLAlchemy over MySQL. I am using
I'm building app using GAE and wanted to use Django for that. Which patch
I'm building an app to save data and some calculations made with that data,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.