munki / mwa2

Version 2 of MunkiWebAdmin
Other
156 stars 37 forks source link

X_METHODOVERRIDE should be X-METHODOVERRIDE #22

Closed groob closed 8 years ago

groob commented 8 years ago

See http://stackoverflow.com/questions/30461839/sending-a-delete-request-from-a-form-in-django

This fixes an issue for me that would result in a HTTP POST call when the Delete button was pressed in the UI.

gregneagle commented 8 years ago

Strangely, X_METHODOVERRIDE worked fine in my testing. If we make this change, though, we should make the change for ALL X_METHODOVERRIDE references in the .js files. I see two in manifests.js and four in pkgsinfo.js.

groob commented 8 years ago

I replaced all the references in the js files in the new commit.

gregneagle commented 8 years ago

Out of curiosity, I wonder why you saw an issue and I did not. Browser differences; web server differences? I mostly use Safari and am still running the demo server.

groob commented 8 years ago

Not sure why the difference. I am using ubuntu on the server. I tried both Safari and Chrome and was getting this in the logs after a DELETE:

[18/Apr/2016 15:58:33] "POST /api/manifests/test-manifest HTTP/1.1" 409 138

I might be missing some django middleware package that you have installed?

IMO there needs to be an explicit requirements.txt listing all the dependencies for django.

gregneagle commented 8 years ago

Once all the dependencies are defined, sure. And what about "variants"? If you aren't integrating with LDAP/AD, you don't need the LDAP stuff, etc...

This isn't, and probably never will be, a "product". It's more a construction kit. I understand that puts some people off. That's OK for now.