Changing website version written in python+django

53 views
Skip to first unread message

Zoltán Turcsányi

unread,
Aug 1, 2014, 1:06:38 AM8/1/14
to django...@googlegroups.com
Hi Everyone,


I have a website written in python+django and I deployed it to pythonanywhere.com. It's okay, works well, but I want to deploy new versions. How should I do that?
Just copy the new files with rsync? Or change the full django project directory?
I would be really grateful if you wrote it step by step.


Thanks,
Zoli

Lachlan Musicman

unread,
Aug 1, 2014, 1:12:38 AM8/1/14
to django...@googlegroups.com
You can copy the files on top of the old files and then restart the
web server, which will bump the wsgi or fastcgi, which should be
sufficient.

cheers
L.
> --
> 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...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> 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/cb3e728b-433a-4e47-974b-b8e6a40eb07c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
You have to be really clever to come up with a genuinely dangerous
thought. I am disheartened that people can be clever enough to do that
and not clever enough to do the obvious thing and KEEP THEIR IDIOT
MOUTHS SHUT about it, because it is much more important to sound
intelligent when talking to your friends.
This post was STUPID.
-----------------------------------------------------------------------------------------------------------
The Most Terrifying Thought Experiment of All Time
http://www.slate.com/articles/technology/bitwise/2014/07/roko_s_basilisk_the_most_terrifying_thought_experiment_of_all_time.html

Zoltán Turcsányi

unread,
Aug 1, 2014, 2:29:55 AM8/1/14
to django...@googlegroups.com
THX
Z

CLIFFORD ILKAY

unread,
Aug 1, 2014, 12:24:45 PM8/1/14
to django...@googlegroups.com
Hi Zoli,

I'm assuming that you're not using virtualenv right now. The best way to
do this is to use virtualenv, virtualenwrapper, and a revision control
system like Mercurial. The workflow goes something like this.

mkvirtualenv new_site
# pip install (all the bits that make up your site with the versions
that you want)
# hg clone (/path/to/old_site)
# run automated tests
# cd (to wherever manage.py is)
python manage.py runserver

That will enable you to test the upgraded site without any risk of
breaking the currently working site. Once you're satisfied that it's
working as you expect, you can "pip freeze > requirements.txt" and use
that as the basis of seeding an installation on the production server.
Again, use virtualenv on the server so that you can isolate the
environment for your site from the system-wide site-packages.

We have a site we built using Mezzanine 3.0.9. It pulled in Django 1.6.2
as a dependency when we did "pip install Mezzanine". In a test
virtualenv, we duplicated the production virtualenv so we had Mezzanine
3.0.9 and all its dependencies. We then ran "pip install --upgrade
Mezzanine" and that pulled in Mezzanine 3.1.9 with Django 1.6.5.
Immediately, we noticed there was some breakage on the site we built. We
downgraded to Mezzanine 3.0.9 in the test environment while leaving
Django 1.6.5 alone and that breakage disappeared so it's clear that it's
not Django but Mezzanine at the source of the breakage.

We upgraded Django to 1.6.5 in the production environment while leaving
Mezzanine at 3.0.9 and we'll have to deal with the breakage of our site
with Mezzanine 3.1.9 in the test environment before we can upgrade
Mezzanine in production, too. If we weren't using virtualenv, that would
have been an ordeal.

--
Regards,

Clifford Ilkay

647-778-8696

Dinamis

<http://dinamis.com>

Jagger

unread,
Aug 4, 2014, 5:01:29 PM8/4/14
to django...@googlegroups.com
Hi Clifford,

Thanks for your detailed answer.

Regards,
Zoli
Reply all
Reply to author
Forward
0 new messages