Is it necessary to create an app for each entity in a Django project?

Asked

Viewed 61 times

1

I wonder if it is a good practice or if it is a very "extreme attitude".

Example: My project has user, client, subscription and product entities. I can create an app with all these entities or should create an app for each?

  • 1

    Hello, William. Face to be honest I’ve never heard, nor have I seen that the ideal is to create an app for each entity, but when I’m developing my projects I take. Considering the size of the system, if it will have many elements I usually create the apps for them, already if it is a small application with few entities, I like to create a core app, and do everything by itself, that for me does not get too messy the code.

  • 1

    By "entities," you mean models? If it is not a 'very "extreme" attitude it is: I N S A N

1 answer

0

Dude, it depends a lot, but in general, I like to divide my application into modules, for example, in the case of an e-commerce, I would create an app called "categories", another one called "products", I think better than creating a single app and a gigantic models.py.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.