tags:

views:

58

answers:

1

Hi,

I'm trying to run a function defined in the views file of my django app, from the command line. Is there a way to do this?

I understand view functions are supposed to be called from a request but I need this function to be called from a cron eventually.

Thanks

+4  A: 

Custom management commands.

Daniel Roseman
Thanks, this worked although the django site doesn't have any examples, so I used this site: http://thingsilearned.com/2009/03/13/adding-custom-commands-to-managepy-and-django-adminpy/
Ash