1

I've read that an "app" in Django is a piece of reusable functionality.

As this is not crystal clear in my mind maybe Django pro dev may judge my real life example and put me on the right track if necessary before I start coding.

My goal is to create a really lightweight financial dashboard for our studio.

I am using Django Boilerplate as project starter.

So my root looks like :

apps/
config/
db/
libs/
public/
static/
templates/
.gitignore
.manage.py

In "apps/" I have the following tree (each one is an app)

apps/invoice (manage all invoices)
apps/estimate (manage all estimates)
apps/customer (manage all customers for both invoice and estimates)
apps/idstore (manage a central repository of unique custom ID for each estimate and invoice)
apps/main (manage all global business logic such as routing etc..)

Am i doing it right ? Wrong ? Am I over-complexifying the stuff ? Will I face major trouble during development lifecycle with this organisation ?

Thanks for your thoughts on this.

Matthieu
  • 1,084
  • 12
  • 23
  • 1
    This looks like a reasonable approach. The idea of a `main` app is a good one, although I usually put it below the `apps` folder (i.e. in the project's root) and use it to hold the main `urls`, `sitemaps` etc. I wouldn't check the `db` or `public` folder into Git though - they are server specific, not project specific. I wrote [a short blog post on the setup I generally use](http://timmyomahony.com/blog/2012/11/09/general-django-project-structure-or-folder-layout/) (although it's more an overall approach as opposed to app-layout) – Timmy O'Mahony Dec 11 '12 at 13:29
  • Thanks for your feedback Timmy, I'll read your blog note right now. – Matthieu Dec 11 '12 at 14:31
  • You should probably also mention which Django version you use, as 1.4 has changed the project layout; maybe [this](http://stackoverflow.com/questions/9212233/django-1-4-new-project-folder-structure-forces-project-prefixes) can point you in the right direction... – Bernhard Vallant Dec 11 '12 at 16:09
  • I am using DJANGO 1.4. I've read the thread you are pointing to but it did not help to clear things up. – Matthieu Dec 11 '12 at 16:20
  • This has been documented in several other SO questions. Some links for you to try: [Use cases for new Django 1.4 project structure?](http://stackoverflow.com/questions/12060698/use-cases-for-new-django-1-4-project-structure) [Where should i create django apps in django 1.4?](http://stackoverflow.com/questions/10888388/where-should-i-create-django-apps-in-django-1-4) There are lots of blogs out there that have documented this Django 1.4 structural change. Let me know if you need more links. – tatlar Feb 09 '13 at 00:22

0 Answers0