4

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

1 Answer 1

6

You can use custom management commands.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, this worked although the django site doesn't have any examples, so I used this site: thingsilearned.com/2009/03/13/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.