I am using BeautifulSoup to scrape some data that is going to be shown on a webpage. However, the data is calculated every time the page is opened, and this causes the page to load for awhile before it is opened. In Django, is there a simple method to calculate the data before the page is accessed so that it opens more quickly, and can also update the data every hour?
I was able to find this: https://media.readthedocs.org/pdf/django-cron/latest/django-cron.pdf, but I am not sure if there is a more simple method.
I would suggest making a python script and a regular cron job to pull the data into a Django model every hour. Then you can access the Django model normally.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments