python - Django: call index function on page reload -


i wondering how call index(request) function thats in views.py upon every page reload. index(request) gets called when app loads. every other page reload after calls function in views.py called filter_report(request). problem running 85% of code in filter_report(request) in index(request) , understanding don't want 2 functions lot of same stuff. take 15% of code isn't in index(request) in filter_report(request) , split different methods , have index(request) call other methods based on conditionals.

well, not how works. each view separate , called urls map it. if have shared code, want either factor out separate functions can call each view, or use template tag or context processor add relevant information template automatically.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -