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 8263293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:02:59+00:00 2026-06-08T04:02:59+00:00

So, my team and I are new to Django development. We’ve been trying to

  • 0

So, my team and I are new to Django development. We’ve been trying to design our project structure over the last couple weeks, and we’ve done a lot of reading to try and get a grasp of the best practice of doing this.

However, we are still struggling to get our heads around the best way to store our templates/static files that are generic to all applications.

Let me detail our structure we’ve implemented so far:

root-folder/
    app-1/
        static/
            app-1/
                css/
                js/
                img/
        templates/
            base.html
            base-app-1.html **extends base.html
    app-2/
        static/
            app-2/
                css
                js
                img
        templates/
            base.html **extends base.html at 'project-name' level
            base-app-2.html **extends base.html
    project-name/
        collectstatic/
        templates/
            base.html
    static/
        base/
            css
            js
            img

The one thing that bugs me with this structure is that our top level templates reside inside the ‘project-name’ level. I would like to see this folder at the same level as our root level static folder.

However, I don’t want to move the root level static folder content into ‘project-name/collectstatic’ because I don’t want to have files inside that folder being version controlled.

We realise that there is no definitive answer to this problem in the Django world. But, are we on the right lines? Have we misunderstood something?

A couple ideas we’ve got are:

  1. To have an app dedicated to top level templates and htdocs called something along the lines of ‘general’ or ‘generic’.
  2. To move the ‘project-name/templates’ dir to the root level along side our ‘static’ folder there.
  3. To stop talking about this problem and go with the structure drawn out above.
  • 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-06-08T04:03:01+00:00Added an answer on June 8, 2026 at 4:03 am

    In Django it’s preferable to rely on staticfiles’ AppDirectoriesFinder finder and the template’s ‘app_directories.Loader` loader classes for managing your static files and templates.

    That means that you’ll have some sort of project.core, project.base or project.commons application that you’ll populate with base templates and static resources that are reused throughout your project.

    I’m assuming your problem with the project-name/collectstatic/ folder is that it’s your defined STATIC_ROOT, on a path that’s under version control. Ideally, you’ll move your static and media root outside of your project’s sources. The simplest solution is to move it next to your project’s top-level package, in the standard project layout for distributing Python packages, or to your Web server’s preconfigured document root.

    In either way, this should move your locally generated static resources outside of your project’s Python packages.

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

Sidebar

Related Questions

When trying to create a new team project with any of the default project
I've moved to a new project team and while going over the codebase, found
Our team is new to both Android and Java development (originally, we came from
I am in the process of creating a new team project by executing the
I am new to Team Foundation Server and I'm trying to connect to a
I have a situation where I have created a new team project and imported
We have created a New Team Project in TFS 2008. We want to merge
I have created a new team project using sfts v3.0 project template. Later I
As the title says: our team is new to Google Play, we've finished an
I've just come onboard with a new team and I am trying to run

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.