One of the pillars of Django is DRY principle and hardcoding your urls in Javascript is violating that principle. Moreover, building parametrized urls on the fly is error-prone and ugly. # Where to ...
Use Django's template engines to render static files that are collected during the collectstatic routine and likely served above Django at runtime. Files rendered by django-render-static are ...