News for hackers. Stuff that matters.
Re:Django Best Practices — Updated for 1.4 by mik4el on Thursday September 13, 2012 @04:24AM (#4515257)
Thanks! Good starting point. I'd like a section on using django on cloud services, e.g. AWS Elastic beanstalk. Another best practise I'd want is scheduling scripts with https://docs.djangoproject.com/en/dev/howto/custom-managemen... and Cron, or using Celery. There is much confusion on those topics I think.

Edited some spelling...

Re:Django Best Practices — Updated for 1.4 by Bockit on Thursday September 13, 2012 @05:14AM (#4515335)
I'm not giving best practises as I'm myself fairly new to Django, this is just a couple of packages to take a look at.

I've been deploying two projects to AWS very recently and we've been using django-pipeline and django-storages (with s3 boto storage) for asset management. ./manage.py collectstatic and all your static files are up on S3. With a bit of finagling around[1] you can even have user uploads hit there seamlessly as well.

[1]: http://stackoverflow.com/questions/10390244/how-to-set-up-a-...

EDIT: Pipeline isn't necessary for storing static files on S3, but if you want to compile SASS/LESS/cs files or any transforms really it works really well.

Re:Django Best Practices — Updated for 1.4 by mik4el on Thursday September 13, 2012 @05:17AM (#4515341)
Thank you!
Re:Django Best Practices — Updated for 1.4 by roam on Thursday September 13, 2012 @05:07AM (#4515323)
What's confusing you? (I'm trying to help, not being snarky)

If you want to invoke some Django-based logic at regular intervals without having to install Celery (and monitoring and a decent queue) you'll opt for a management command. The link you posted should help you out here. Invoking the script yourself or telling cron to invoke it for you shouldn't be hard if you know about cron.

With regards to Celery: I think the tutorial and docs are pretty clear on how to use it and how to set it up.

Re:Django Best Practices — Updated for 1.4 by mik4el on Thursday September 13, 2012 @05:13AM (#4515334)
Thanks for your comment =) Nothing is confusing me there, but try to search for "django script cron" and you'll see people suggesting setting up urls to start the script, having an external script that import settings and many other complex things. The craziest thing I've seen (but probably useful for some cases) is to have the regular requests from google-bots invoke scripts... That's why I think it's a good thing to suggest managment commands when they're so easy and integrates nicely with your apps. Celery however is good for more complex usecases. I was merely making a suggestion for best-practise.
Re:Django Best Practices — Updated for 1.4 by roam on Thursday September 13, 2012 @05:30AM (#4515363)
I imagine most of those icky suggestions are coming from people who used to run php on hosts with a lot of restrictions. You're right, this should definitely be a part of a best practices guide.
Re:Django Best Practices — Updated for 1.4 by ipmb on Thursday September 13, 2012 @09:41AM (#4516058)
Thanks for the feedback! I filed a couple of issues to address this:

* https://github.com/lincolnloop/django-best-practices/issues/... * https://github.com/lincolnloop/django-best-practices/issues/...

If you think of any more, feel free to file your own.

Re:Django Best Practices — Updated for 1.4 by mik4el on Thursday September 13, 2012 @10:05AM (#4516166)
Thanks! Filed my schedule scripts comment as an issue. Looking forward to see this develop. Hope I can contribute.