On Friday, March 2, 2012 8:48:57 PM UTC-8, Russell Keith-Magee wrote: Seriously -- Django is good at what it does, but just because you've got a > really good hammer, it doesn't mean every problem is a nail. The task you > describe sounds like almost exactly what cron scripts are designed to > handle. Rather than trying to bend Django into a shape that will solve your > problem, use the right tool for the job. > > You might also be able to attack the problem using a task queue like > celery [1]. However, celery is more complex to get set up than a cron > script. There are lots of benefits that come with that complexity, but if > you just want to get something going, you don't have any experience with > task queues, and you're not expecting any serious load problems, cron will > be the easier option. > > It's also worth pointing out that you can still use parts of Django (e.g., > your models, the ORM, the mail sending utilities) in a standalone Python > script that is called by cron/celery. Django is a just a set of Python > libraries. Yes, it's a set of libraries that is usually used to build web > sites, and most examples use Django APIs to service HTTP requests, but > there's no reason you can't write a standalone Python script that uses > Django's APIs to access and manipulate data. > Scott as Russ points out you can still use parts of Django. I've had good success with cron and custom django-admin commands<https://docs.djangoproject.com/en/1.3/howto/custom-management-commands/>. There is some overhead to write the commands but the upside is that they give you a defined way to approach the problem within the realm of Django. Also since they are django-admin commands you can run them as you would any other django-admin command manually which can be convenient at times.
Toodle-loooooooooooo.............. creecode -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/K45OgnyooaUJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.