openwisp / django-x509

Reusable django app implementing x509 PKI certificates management
http://openwisp.org
BSD 3-Clause "New" or "Revised" License
340 stars 68 forks source link

[bug] Fix JavaScript error on django 2.2 #74

Closed atb00ker closed 4 years ago

atb00ker commented 4 years ago

I see an error on javascript in the latest release with django 2.2.

Go to the CA or Certs form to see the error.

Note: Ensure django 2.2 is installed in your virtualenv, clear the cache (actually in google chrome or chromium you can go to the network tab in the developer console and check "disable cache" and repeat the process.

You should see a JS error.

marfgold1 commented 4 years ago

It seems like x509-admin.js is called first then jquery.init.js called later. That's why django.jQuery is still not defined.

Screenshot from 2019-12-21 21-49-46

atb00ker commented 4 years ago

@marfgold1 read django 2.2 release notes, that contains the answer to fix this! :smile:

marfgold1 commented 4 years ago

Ahh okay I see how to solve the problem now. I can do it, but I leave it to other since I'm still on another task 😅

nikitaermishin commented 4 years ago

@marfgold1 appreciate your previous work, I will end it :grinning: