Django reverse() for JavaScript

前端 未结 9 1103
情深已故
情深已故 2020-12-24 07:24

In my project I have a lot of Ajax methods, with external client-side scripts (I don\'t want to include JavaScript into templates!) and changing URLs is kind of pain for me

9条回答
  •  长情又很酷
    2020-12-24 07:53

    I created a mechanism that builds a list of url patterns in your Django project and outputs that in a Javascript file. It is a fork of django-js-utils.

    The repo link is here: https://github.com/Dimitri-Gnidash/django-js-utils

提交回复
热议问题