How do folks prefer to layout their Django projects when using
virtualenv?  Do you do either of the following, or something else?

Method 1: (project & apps at same level)

~/tmp$ virtualenv my_proj
~/tmp$ cd my_proj
~/tmp/my_proj$ . bin/activate
(my_proj)~/tmp/my_proj$ pip install django # ...
(my_proj)~/tmp/my_proj$ django-admin.py startproject my_project
(my_proj)~/tmp/my_proj$ django-admin.py startapp my_app1
(my_proj)~/tmp/my_proj$ # run/test from virtenv root

Method 2: (apps within project)

~/tmp$ virtualenv my_proj
~/tmp$ cd my_proj
~/tmp/my_proj$ . bin/activate
(my_proj)~/tmp/my_proj$ pip install django # ...
(my_proj)~/tmp/my_proj$ django-admin.py startproject my_project
(my_proj)~/tmp/my_proj$ cd my_project
(my_proj)~/tmp/my_proj/my_project$ ./manage.py startapp my_app1
(my_proj)~/tmp/my_proj/my_project$ # run/test from proj root

Do you have to jockey the $PYTHONPATH to find apps in either case?
If so, how do you make this portable/versioned (modify the
virtualenv scripts and add them to $VCS? have a custom script and put
that in $VCS?)

Which bits do you include/exclude when using version-control?

Do you keep your requirements.txt for pip at the top level virtualenv
directory, or inside the project folder (or elsewhere)?

I've seen a couple blog-posts that advocate "use virtualenv" but most
seem to elide the best-practice details.

Any tips appreciated.

-tkc



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20131017102654.3556c3f9%40bigbox.christie.dr.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to