Google Groups Home
Help | Sign in
Organising django projects
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Almad  
View profile
 More options Jul 28 2007, 5:09 am
From: Almad <b...@almad.net>
Date: Sat, 28 Jul 2007 02:09:27 -0700
Local: Sat, Jul 28 2007 5:09 am
Subject: Organising django projects
Hi,

I'd like to ask how to organize Django application. To me, structure
of project/app is nice idea, however I have problems applying it in
practice, so I'd like to ask about best practices.

Problems come, when application structure become deeper and nested. Is
it usual to start an application inside application? Django-admin
disagree with it.

How is it with dependencies? When part of application depends on
another, should it be subapplication, or normal top-level application
depending on another one?

Plus, when django philosophy is to have "application packages", why
are templates separated into another directory structure? I'm more
familiar (from my personal cherrypy structure) with lib/apps for
model, tpl/apps and web/apps separation for M/V/C, but django seem to
mixing it together.

What are reasons for this and what are best practices for structuring
bigger/complicated apps?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Hoeppner  
View profile
(1 user)  More options Jul 28 2007, 6:58 am
From: Chris Hoeppner <ch...@pixware.org>
Date: Sat, 28 Jul 2007 11:58:44 +0100
Local: Sat, Jul 28 2007 6:58 am
Subject: Re: Organising django projects
Almad escribió:

Here's an example of my latest project structure:

/var/www/django <---- this is on the pythonpath. everything else,
beneath it.

tagging, registration, etc. <----- apps I consitently use across most
projects are held just there. These are all svn checkouts. In case there
is a backwards incompatible change affecting a project, the app gets
copied into the project folder.

project/ <--- the root project folder (eg. contains the settings and url
files) is beneath the django folder, among the common apps.
project/webroot/static <---- contains the files to be served statically
project/webroot/php <---- I'm a minter :P and I keep php stuff on a
separate subdomainm just in case I need to move it.

Then, if an app is particularly bound to some project (eg a project with
a single app, or apps being used ONLY for that project) are held beneath
the project root. Each app holds it's own template directory. The app
template loader looks for this directory when loading a template.

Actually, my default project setup is pretty different from what you get
with startproject <name>. I wonder how I could change the template it
uses...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin Lilly  
View profile
 More options Jul 28 2007, 11:32 am
From: "Justin Lilly" <justinli...@gmail.com>
Date: Sat, 28 Jul 2007 11:32:24 -0400
Local: Sat, Jul 28 2007 11:32 am
Subject: Re: Organising django projects

It occurs to me that django-admin looks for a template page in the project
and it it isn't there, it defaults to another admin template. It would seem
as though it might be good for modularity if we had something similar to:

attempts to render app1
/home/dev/django/proj1/template_dir/app1
/home/dev/django/proj1/app1/template_dir
then normal path

This would help out a lot if we could set this up. (I know it would be
something HCoF would be interested in). Basically if a project specific
template isn't there, it will default to the application specific template.
It might also be nice to change this priority listing via settings.py.

 Has this been discussed before? What are the dev's feelings on this?

-justin

--
Justin Lilly


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Almad  
View profile
 More options Jul 29 2007, 5:24 am
From: Almad <b...@almad.net>
Date: Sun, 29 Jul 2007 02:24:14 -0700
Local: Sun, Jul 29 2007 5:24 am
Subject: Re: Organising django projects

>  Has this been discussed before? What are the dev's feelings on this?

I'd like to hear them too.

> -justin

Almad

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google