Q: Update Django app hosted at pythonanywhere Hi I have some app hosted at pythonanywhere using github, and now I made some improvements to the app in my local machine, but I do not know how to update the online app whitout affecting the database. 
Thanks in advance?

A: do you mean you've made changes to the database on your local PC (new or modified models.py) and you want to know how to apply them to the existing database on PythonAnywhere without breaking existing data?
It depends what version of django you're using.  For versions 1.6 and older, you would use a tool called south.  For more recent versions, 1.7 and onwards, you would use the built-in migrations framework.
If you're using django-migrations, then it should be very simple and "just work".  Pull down your latest code onto PythonAnywhere, activate your virtualenv, and then run
python manage.py migrate 

If you need to use South, it's a little more complicated.  You'll have to do something like this:


*

*go back to a commit that matches the code that's currently live on pythonanywhere 

*for each of your apps, run python manage.py schemamigration appname --initial

*now check out the latest version of your code

*for each of your apps, run python manage.py schemamigration appname --auto

*commit the new migrations files into your repository

*pull down the latest code on PythonAnywhere

*for each of your apps, run python manage.py mygrate appname --fake 001

*then run python manage.py migrate
More info in the south docs.  This is quite tricky stuff so backup your database first!
But hopefully you're using a modern version of django, and you can do it the easy way :)
