Re: How do you manage your django sources?

2007-10-17 Thread Doug Van Horn

On Oct 17, 1:06 pm, stv <[EMAIL PROTECTED]> wrote:
> really? I'm researching Django for a potentially large project, I was
> thinking of having a layout like this:
>
> mainproject
> |--core # models reused everywhere: Person, Address, etc
> |--apply # models only for application: Questions, references, etc
> |--enroll # models for enrollment, mostly core, maybe 1 or 2 extras.
>
> and so one ... thinking that when I develop in the apply app I'll only have to
>
> from mainproject.core import Person
>
> and so on ... Does this not work as easily as I am hoping? I'm
> guessing core won't have much (any?) templates/views, all that being
> handled in the sub applications ...
>
> But I'm just getting into Django design ... so I may be way off base

I think what you'll end up with is more like:

from mainproject.core.models import Person
from mainproject.apply.models import Application
from mainproject.enroll.models import LicenseAgreement

It was this 'model proliferation' that moved me back towards having
one application per project.  But my projects aren't that big, and
having my Models in one place works for me.

I can still break up the views into more logical sections, based on
functionality, e.g., views.apply, views.enroll.

Your larger project may benefit from breaking the apps up, if for no
other reason than a reduction in merging during checkins.

Like I said, I tried it with many apps, but for my projects and the
way I was working them, I didn't see the advantage.

Go with multiple apps and see how it works for you.  Just write lots
of tests so you can refactor later without fear.

doug.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How do you manage your django sources?

2007-10-17 Thread stv

>
> I started out by having lots of little apps, but that seemed to be a
> bit painful, having 5 or 6 sets of models.py, views.py, and urls.py.
> Now I just have one app, the functionality that I'm working on.  I'll
> come through and refactor later if I need to.

really? I'm researching Django for a potentially large project, I was
thinking of having a layout like this:

mainproject
|--core # models reused everywhere: Person, Address, etc
|--apply # models only for application: Questions, references, etc
|--enroll # models for enrollment, mostly core, maybe 1 or 2 extras.

and so one ... thinking that when I develop in the apply app I'll only have to

from mainproject.core import Person

and so on ... Does this not work as easily as I am hoping? I'm
guessing core won't have much (any?) templates/views, all that being
handled in the sub applications ...

But I'm just getting into Django design ... so I may be way off base

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How do you manage your django sources?

2007-10-17 Thread Doug Van Horn

On Oct 17, 2:23 am, Manoj  Govindan <[EMAIL PROTECTED]> wrote:
> How many here follow the django axiom of 'one project, multiple apps'?
> If you do, how do you control the sources? Do you map one project to
> one source code repository or do individual apps get their own
> repositories?

I've found myself creating one project and one app per website.  If
some chunk of functionality shouts "reuse me!" I'll break it into it's
own app, but still house it under the same project until it gets
reused.  IMO, I'm optimizing for reuse later.  That way things stay as
simple as possible up front.

In SVN I'll have:

example.com/  # a top level project, probably one per customer site
  ./trunk
./project_name  # some name for the django project, a PITA to come
up with, I've taken to using project initials.
  ./app  # the actual django application, even more of a PITA to
come up with, I've taken to using 'app'.
./media # media for the project
./sundry  # other project files needing to be versioned
./sql  # SQL migration scripts
  ./branches
  ./tags


I started out by having lots of little apps, but that seemed to be a
bit painful, having 5 or 6 sets of models.py, views.py, and urls.py.
Now I just have one app, the functionality that I'm working on.  I'll
come through and refactor later if I need to.

Anyway, that's what I've been doing...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How do you manage your django sources?

2007-10-17 Thread akaihola

If the apps are shared (or might be shared) between multiple projects,
I put them into separate repositories and use svn externals to stick
them into the project tree.

I actually include the Django source as an svn external as well to
keep track on which branch/revision each project is using and tested
on.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How do you manage your django sources?

2007-10-17 Thread Margaret

Using one repository , then one project one directory, I do this.

On 10/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote:
>
> On Oct 17, 12:30 pm, Margaret <[EMAIL PROTECTED]> wrote:
> > version control system???
> > or local filesystem??
> >
>
> Version control system, say SVN.
>
>
> >
>


-- 
[EMAIL PROTECTED]
13585201588

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How do you manage your django sources?

2007-10-17 Thread Manoj Govindan

On Oct 17, 12:30 pm, Margaret <[EMAIL PROTECTED]> wrote:
> version control system???
> or local filesystem??
>

Version control system, say SVN.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How do you manage your django sources?

2007-10-17 Thread Margaret

version control system???
or local filesystem??

On 10/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote:
>
> How many here follow the django axiom of 'one project, multiple apps'?
> If you do, how do you control the sources? Do you map one project to
> one source code repository or do individual apps get their own
> repositories?
>
>
> >
>


-- 
[EMAIL PROTECTED]
13585201588

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How do you manage your django sources?

2007-10-17 Thread Manoj Govindan

How many here follow the django axiom of 'one project, multiple apps'?
If you do, how do you control the sources? Do you map one project to
one source code repository or do individual apps get their own
repositories?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---