Saturday, March 30, 2013

Re: django+virtualenv+git(hub)

Hey,

I would recommend using virtualenvwrapper to manage virtual
environments for different projects.
[http://virtualenvwrapper.readthedocs.org/en/latest/]

Once you have virtualenvwrapper installed, you can create virtualenv
for new projects using

$ mkvirtualenv <project_name>

.. and you can activate this virtualenv in future using

$ workon <project_name>

For using git,

1. initialize git when you create the project
2. Copy content of required .gitignore files from
https://github.com/github/gitignore in .gitignore file for your
project

You should read `Two Scoops of Django` book
(https://django.2scoops.org/). It has dedicated chapters on optimal
django environment setup , project layouts, app design and much more.
It's worth reading.

You can find project layout explained in book at
https://github.com/twoscoops/django-twoscoops-project

On Sat, Mar 30, 2013 at 1:26 PM, John <wasteland.time@gmail.com> wrote:
> Hi list,
>
> I'm a Django newbie and have been reading of usefulness of using it with
> virtualenv+git. I'm not clear however how to set it up in terms of
> structure/hierarchy.
>
> Say I've got my ~/projects/django-projects where I want to create my
> projects so I'd initialise git inside ~/projects/django-projects. Then
> I'd create separate virtual environments inside that adjusting
> .gitignore to ignore things like:
>
> *.pyc
> .*swp
>
> # Django files
> include
> lib
> local
> man
> share
> Scripts
> .Python
> *.pyc
> *~
> *.db
>
>
> # Packages
> *.egg
> *.egg-info
> dist
> build
> eggs
> parts
> bin
> var
> sdist
> develop-eggs
> .installed.cfg
>
> # Installer logs
> pip-log.txt
>
>
>
> Is that a recommended setup/logic?
>
> Thank you
>
> John
>
> --
> 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 django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--

Sincerely,
Pankaj Singh
http://about.me/psjinx

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment