1

In my project, there are applications named "developer" and "startup"

In developer and startup application, i need a table named "languages", which implies that the language developer use and startup use.

So i made model named "languages", But I'm thinking about whether to make this in developer application or startup application, or make a new application and make it in it.

When I made it in developer application, i could use it by importing startup application models.py. But actually, I don't think that the table "languages" is more relevant to application "developler" than "startup".

How should I do?

I referenced link https://stackoverflow.com/questions/4137287/sharing-models-between-django-apps

Yoonjae
  • 51
  • 1
  • 4

1 Answers1

1

As far I can see from your context: the language model (If even needed) should go to the developer because the developer is the one who closely relates to language, and will mostly consume it in views, and serializer, etc.

In general, we follow these three basic rules

  1. Keep apps small Each app
  2. Does one thing well
  3. Keep apps separate so they can be exported and used elsewhere

Just keep these simple basic rules in front of yourself whenever defining a new model in a Django app.

Umar Hayat
  • 4,300
  • 1
  • 12
  • 27