-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Luke,

On 10/12/2011 08:59 AM, Luke Plant wrote:
>> It's not so easy to explain why startproject can't just create the
>> directory to contain all the bits it creates in the first place, instead
>> of making me do it manually :-)
> 
> I think there could be at least one good reason - if the developer has
> already created a directory in which to store all the stuff, which would
> actually be my natural instinct especially when it comes to a new
> project with VCS:
> 
>  $ mkdir foo
>  $ cd foo
>  $ hg init
> 
>  # OK, now what am I going to put in it? Oh, a Django project.

In a real project, I think a layout more similar to what Mateusz
suggested is better - there should actually be a third containing
directory outside anything startproject creates, in which you put all
the non-Python stuff (including templates). This is what I generally do
- - I consider it preferable to keep non-Python stuff out of directories
that are on sys.path. In which case that outer directory would be the
one you initially create yourself.

This (and VCS considerations) are a topic for that "project layout" docs
page, which can be added separately. I don't think we need to add more
stuff to the first page of the tutorial - and even if some people want
to, it doesn't need to happen in this patch.

> In fact, it might be good idea to encourage use of VCS by mentioning it.
> If I remember SVN correctly, you would actually need to think about it
> before 'mkdir foo' - you 'svnadmin create', then checkout the empty repo
> to start working. For either of these workflows, you probably wouldn't
> want startproject creating your main directory. I actually like the idea
> that Django is not supposed to be managing your entire project - rather,
> your project uses Django.

Right. I think the stuff that startproject currently creates in my patch
is just the "Django stuff", not your entire project - and that that
"Django stuff" should be self-contained in a directory, and startproject
should create it that way. The other non-Django/non-Python bits of your
project should go outside that.

I'm pretty strongly opposed to any change that involves startproject
dumping files directly into the current directory, not inside a
container that you provide the name for. That's just bad behavior, IMO.

Carl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6VrvMACgkQ8W4rlRKtE2ebTACfS8KNH+Zj7U5P9EYD+S6sfXag
jtMAoMyu5/sA4sTIzqcRgeuw5fmc6HzL
=08bN
-----END PGP SIGNATURE-----

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

Reply via email to