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

  • Home
  • SEARCH
  • 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 6114319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:57:39+00:00 2026-05-23T14:57:39+00:00

I have a simple (I hope so) question about the structure of a typical

  • 0

I have a simple (I hope so) question about the structure of a typical Django website. I have to restructure my site using some “Django-powered” pages mixed to other typical static pages.

I’d like to have a few templates and a lot of pages using these templates.

My question is:

What is the best way to provide different content for each page?
What I’m thinking right now is having different pages in my URL conf using the same templates and modifying the content within the View. But it’s so unnatural to “hard-code” my content within the View, I suppose.

Is there a way to define content areas in my template and, for example, edit them within the Admin panel?

There must be better ways, I think.

Thank you!

Edit
Maybe Flatpages could help in my task. But does exist a way to add “content areas” tied to specific parts of the templates? I can fine only the main content area.

  • 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-23T14:57:39+00:00Added an answer on May 23, 2026 at 2:57 pm

    You can use generic views, and I would heartily encourage you to. They’re great. Check out the django docs for generic views. But as for different pages requiring a different template, yeah, that’s how websites work.

    Django is not “file-light” – it works by combining lots of small files. You’re quite right to be averse to hard-coding HTML in your view controller – that’s generally bad practice. You’re going to have a template for each view, but really, how many views do you have? Even in a large application, the number of views that can’t be handled by either a built-in or custom-made generic view is going to be pretty low.

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

Sidebar

Related Questions

I have what I hope is a fairly simple question about using the value
I have a simple question about Java's XML API and I hope there's a
i have pretty simple simple question (i hope so). How do i change the
Well, I have a simple question, at least I hope its simple. I was
I have what I hope is a simple question pertaining to the Atmel AVR
I'm trying to learn WPF, so here's a simple question, I hope: I have
Simple (I hope), HTML question. Let's say I have a column group that spans
I have a simple question about sending a file (XML file) from my webapp
I hope I have a simple question for you all, but working with dates
Wa are talking about Non-uniform rational B-spline . We have some simple 3 dimentional

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.