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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:22:56+00:00 2026-05-12T19:22:56+00:00

I have a few models: ‘Article, Video, BlogPost, News, Commodity’. Each are in their

  • 0

I have a few models: ‘Article, Video, BlogPost, News, Commodity’. Each are in their own application.

They all are basically the same models with a few extra fields on each. But each share about 15 fields. I’m using an abstract base class. I’m trying to figure out how I should do organization for this. My current setup is like this:

apps/
    abstract_models.py
    abstract_templatetags.py
    abstract_forms.py
    articles/
        models.py
        ...
    videos/
        models.py
        ...
    blogs/
    ...

While I know this isnt a good way, I’m just not sure where to put all the information that is shared. I’ve been doing like this, then per app just subclassing the Form or the Model and making the local modifications. Since they are just a small amount of changes vs the whole picture I think that abstract class is the way to go, but I may be wrong.

They share so much structure, but for obvious reasons I would like to keep them separate apps. But I would like to clean it up a bit.

Any thoughts would be greatly appreciated.

  • 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-12T19:22:56+00:00Added an answer on May 12, 2026 at 7:22 pm

    I setup an app that I can use across different projects and call it tools. In tools I have my basic base models that I tend to reuse across projects and import it where needed.

    For example, I have a CreatedModifiedModel in tools/models.py which adds fields for creation and modification time, as well as the user who did the creating and modifying.

    After being defined once, I can simply do:

    from tools.models import CreatedModifiedModel    
    
    class Widget(CreatedModifiedModel):
        # comes with my four fields automatically
    

    You could create a single app called base or core or tools and then put all your abstract classes in there, to help keep it clean and make it reusable in the future.

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

Sidebar

Related Questions

So I'm building a Django application, and these are a few models I have:
I have a few models in Django where I attach a location to each
I have a few data models (tables) which are associated with each other. If
I have few models - User , Teacher and TeacherLeader . class User <
I have a few nested view models with observable arrays and am unable to
I have set up a few models in a simple django project. When I
I have quite a few libraries and models that get loaded into a controller,
I have an admin model with a few inline models included with it (see
I have a model that requires quite a few BooleanFields, they could be considered
Hi i am using django 1.2 .I my case i have few models which

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.