Yipit Django Blog: Sharing Everything We’re Learning
tech.yipit.com
tech.yipit.com
And you say that before you have even one content post out?!
I'm not holding my breath...
Hopefully you can keep it up!
http://pushingkarma.com/projects/django-dbbackup/
What is your opinion on it? Compared to South?
outputfile=/tmp/database_`date +%Y_%m_%d`.sql.gz
pg_dump fashiondb -U fashionuser | gzip > $outputfile
s3cmd --config ~/.s3cfg put $outputfile s3://mybucket
rm $outputfileI haven't looked, but it might also, in the spirit of Django, be "database agnostic" and allow you to import data across DBMSs. You'd still need to keep some things like uploaded files in sync though.
s3cmd --config ~/.s3cfg get s3://BUCKET/database_$1.sql.gz
gunzip database_$1.sql.gz
sudo -u postgres dropdb DBNAME
sudo -u postgres createdb -O DBUSER DBNAME
sudo -u postgres psql DBNAME < database_$1.sql
rm database_$1.sql
But I suppose being database agnostic would be handy - it would make switching from mysql to postgres easier.HN discussion: http://news.ycombinator.com/item?id=2936364
Any effort to assemble "field" knowledge around Django would be great. For instance, I was looking for best practices for splitting settings.py (separating dev, test and prod-specific configs). If anybody's interested, I went through: http://stackoverflow.com/questions/88259/how-do-you-configur... , http://www.djangobook.com/en/2.0/chapter12/ (under "Using Different Settings for Production") and https://code.djangoproject.com/wiki/SplitSettings ...
* settings/__init__.py
* settings/base.py
* settings/development.py
* settings/staging.py.
* settings/production.py
* settings/credentials.py
This allows me to have a base settings file which the others inherit from, and all settings are tracked in git apart from passwords which are stored in credentials.py.Unlike some other approaches, installed apps are just defined once (in the base), but apps can be added/removed for each environment.