Re: Django Projects and Subversion

2007-01-12 Thread Jeffrey Zelt

I am just finishing a Django project that is managed by Subversion.  I 
have set up 3 web sites to manage it - a "development", "staging" and 
"production" server.  This is a common paradigm, nothing that I came up 
with myself.

You can have active committing by developers to the repository and there 
are no problems.  Just check out a particular revision onto the the 
staging server and test that everything works as expected.  When you are 
confident that everything is OK (for that revision), you can check out 
the same revision on the production server (effectively performing an 
"upgrade").

Each web server requires a slightly different settings.py file since you 
want each to use their own databases, but most of the content of these 
files will be the same.  I even use Subversion to manage these 3 
settings files in the same repository.  I have 3 settings files:

settings_development.py
settings_staging.py
settings_production.py

When updating one of the servers with a particular revision, all of 
these files are downloaded to the particular server you are dealing 
with.  To use the appropriate settings file, I create a symbolic link:

settings.py

that points the the appropriate settings file.  You can get by without 
introducing this link by referencing the appropriate settings file in 
each Apache Virtual Server configuration, but if you want Django's 
"manage.py" script to work transparently, you need this link.

The important thing is to *NOT* put this link under revision control, 
i.e., it is not managed by the Subversion repository.  It will stick 
around while the other files in the directory are being managed by 
Subversion.

Jeff



Aidas Bendoraitis wrote:
> I have an SVN-specific question which doesn't really fit into Django
> groups. Anyway, maybe somebody of you will have enough experience and
> competence to answer it.
>
> We are going to set our Django projects under
> version control on a dedicated server. We will also publicly run
> several Django websites on the same server. So what is a better
> practice -- to use the code under source
> control for the public websites directly, or to have copies (tags) of
> the subversioned code for the public websites?
>
> How is this managed with djangoproject.com and djangobook.com?
>
> Regards,
> Aidas Bendoraitis aka Archatas
>
> >
>   


--~--~-~--~~~---~--~~
 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: Django Projects and Subversion

2007-01-11 Thread Joseph Heck
That's exactly what we're doing. Our "update production" script reads:

svn update /u/django/project
sudo /etc/init.d/apache2 restart

The only time this doesn't work is if someone has tweaked a model and
there's schema changes to be made in conjunction.

-joe

On 1/10/07, Cam <[EMAIL PROTECTED]> wrote:
>
>
> To deploy into production you should run all tests, tag a release and
> have the webserver check out your tag.
>
> cheers,
> Cam.
>
>
> >
>


--~--~-~--~~~---~--~~
 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: Django Projects and Subversion

2007-01-10 Thread Cam

To deploy into production you should run all tests, tag a release and
have the webserver check out your tag.

cheers,
Cam.


--~--~-~--~~~---~--~~
 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: Django Projects and Subversion

2007-01-10 Thread Kenneth Gonsalves


On 10-Jan-07, at 8:58 PM, Aidas Bendoraitis wrote:

> We are going to set our Django projects under
> version control on a dedicated server. We will also publicly run
> several Django websites on the same server. So what is a better
> practice -- to use the code under source
> control for the public websites directly,

this is simplest - only you need to be sure about who has permission  
to do the svn up and apache restart.

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/



--~--~-~--~~~---~--~~
 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: Django Projects and Subversion

2007-01-10 Thread Julio Nobrega

  What if someone commits something that brakes the live website?

  My recommendation is to checkout into the live folders the
version/tag/branch you want. Or checkout somewhere, test the app, and
then copy the files. Just don't run the website from a codebase where
developers are commiting.

On 1/10/07, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote:
>
> I have an SVN-specific question which doesn't really fit into Django
> groups. Anyway, maybe somebody of you will have enough experience and
> competence to answer it.
>
> We are going to set our Django projects under
> version control on a dedicated server. We will also publicly run
> several Django websites on the same server. So what is a better
> practice -- to use the code under source
> control for the public websites directly, or to have copies (tags) of
> the subversioned code for the public websites?
>
> How is this managed with djangoproject.com and djangobook.com?
>
> Regards,
> Aidas Bendoraitis aka Archatas
>
> >
>


-- 
Julio Nobrega - http://www.inerciasensorial.com.br

--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---



Django Projects and Subversion

2007-01-10 Thread Aidas Bendoraitis

I have an SVN-specific question which doesn't really fit into Django
groups. Anyway, maybe somebody of you will have enough experience and
competence to answer it.

We are going to set our Django projects under
version control on a dedicated server. We will also publicly run
several Django websites on the same server. So what is a better
practice -- to use the code under source
control for the public websites directly, or to have copies (tags) of
the subversioned code for the public websites?

How is this managed with djangoproject.com and djangobook.com?

Regards,
Aidas Bendoraitis aka Archatas

--~--~-~--~~~---~--~~
 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
-~--~~~~--~~--~--~---