Yipit Django Blog: Sharing Everything We’re Learning
11–20 of 20 posts
Re: Yipit Django Blog: Sharing Everything We’re Learning
#12Hopefully you can keep it up!
Re: Yipit Django Blog: Sharing Everything We’re Learning
#13Can anyone recommend any similar existing resources?
There's "Django Best Practices", which was discussed two months ago (although it doesn't seem like it grew a lot since): http://lincolnloop.com/django-best-practices/ 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).…
* 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.
Re: Yipit Django Blog: Sharing Everything We’re Learning
#14As someone also doing production Django for a web-app (as opposed to a news/content site) I'm thrilled to see a team committed to posting lessons-learned... but I'm always suspicious of "We're gonna post lots of great stuff here.. you know, soon." So hopefully you start coughing up the content. Looking forward to it :)
It's always a challenge to get more posts out but we're committed to it :-)
And you say that before you have even one content post out?!
I'm not holding my breath...
Re: Yipit Django Blog: Sharing Everything We’re Learning
#15Have you all ever taken a look at Django-DBBackup? 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 $outputfileRe: Yipit Django Blog: Sharing Everything We’re Learning
#16As someone also doing production Django for a web-app (as opposed to a news/content site) I'm thrilled to see a team committed to posting lessons-learned... but I'm always suspicious of "We're gonna post lots of great stuff here.. you know, soon." So hopefully you start coughing up the content. Looking forward to it :)
It's always a challenge to get more posts out but we're committed to it :-)
Re: Yipit Django Blog: Sharing Everything We’re Learning
#17Have you all ever taken a look at Django-DBBackup? http://pushingkarma.com/projects/django-dbbackup/ What is your opinion on it? Compared to South?
I don't get it - what does django-dbbackup offer over 4 lines of bash: outputfile=/tmp/database_`date +%Y_%m_%d`.sql.gz pg_dump fashiondb -U fashionuser | gzip > $outputfile s3cmd --config ~/.s3cfg put $outputfile s3://mybucket rm $outputfile
I 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.
Re: Yipit Django Blog: Sharing Everything We’re Learning
#18Earlier quoted context omitted.
I don't get it - what does django-dbbackup offer over 4 lines of bash: outputfile=/tmp/database_`date +%Y_%m_%d`.sql.gz pg_dump fashiondb -U fashionuser | gzip > $outputfile s3cmd --config ~/.s3cfg put $outputfile s3://mybucket rm $outputfile
Well, code to restore the database from a backup for one. It also seems to track form which server backups were created. I 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
But I suppose being database agnostic would be handy - it would make switching from mysql to postgres easier.Re: Yipit Django Blog: Sharing Everything We’re Learning
#19Re: Yipit Django Blog: Sharing Everything We’re Learning
#20Can anyone recommend any similar existing resources?
There's "Django Best Practices", which was discussed two months ago (although it doesn't seem like it grew a lot since): http://lincolnloop.com/django-best-practices/ 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).…