Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

270
Views
Recommended way to package a Django project? Django package with multiple apps or multiple Django packages?

I am working on a Django project that is separated into 5 apps (each have 3-6 models). As a whole, this project is definitely something I would reuse in other projects, but it would only be useful if it included all the apps because they are intrinsically related.

Therefore, I want to package this project to make it reusable following the Django docs and Django cookiecutter django package. However, these examples show only how to package with a single app.

From what I have read there are a few options:

  1. Make 5 packages
  2. Make one app with 30 models and convert models.py into a module
  3. Make a package with 5 apps (Similar to how django-allauth is setup)

I am planning on using option 3 because I think option 1 is overkill and option 2 is considered bad practice (See this post and this post). The issue I see with option 3 is that then a project that uses this package would have to install all 5 apps in INSTALLED_APPS like so:

INSTALLED_APPS = [
    'project',
    'project.app1',
    'project.app2',...
]

Is there a way to avoid having to install all the apps in INSTALLED_APPS if I package the project with 5 apps? Or is option 1 or 2 better for this use case?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If the apps are very coupled and can only be used together, IMO makes no sense to have them in different packages. So option 3 is the answer: put them all in a single package installable via setup.py if it's private, or publish on pip if it's public.

Shameless plug: for other advice related to Django apps, you might be interested in my "Your Django app is a User Interface" talk: https://www.youtube.com/watch?v=Mnzvjn1v1CY (slides here)

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!