Django : Is it a good idea to generate JS dynamically?

后端 未结 5 2095
北恋
北恋 2021-02-03 12:23

When I write my JS files for a Django project, of course I do some AJAX calls, and for the moment the urls for those calls are hard-coded (which is very ugly).

I was thi

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-03 13:05

    I would go for a hybrid technique. Serve most of your javascript statically. But in your Django template, have a

提交回复
热议问题