So I have added a command to manage.py in my django app that basically takes the results from a view and emails them out to specific users. This command will run on a cron schedule - basically this is done as an automated, emailed report.
I've figured out how to add in the command but I want to call the view now. The problem is that I have no HttpRequest object and whenever I read the django docs on HttpRequest, my eyes glaze over and I struggle to follow it. I'm not sure exactly how to create an HttpRequest object that will satisfy my needs nor if there's another way to get this done. I also tried passing 'None' in as the request object but that didn't lead anywhere.
Help?
HttpRequest. Rather separate out your code into another function that does not depend uponrequestand call it from command as well as view.