jazzband / django-constance

Dynamic Django settings.
https://django-constance.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.72k stars 311 forks source link

Param reset when POST, PATCH or DELETE #307

Closed Patataman closed 6 years ago

Patataman commented 6 years ago

Hi! I'm not sure if this is a non expected behavior but it is very annoying one. Also, maybe it is a particular behavior from the project I'm in and not a particular bug of Constance.

The steps I do are:

  1. Go to the panel admin -> Constance
  2. Change any parameter (e.g: Default X: 0 -> Default X: 1)
  3. Make a POST, DELETE or PATCH request to the server
  4. Look at the Constance panel again and find "Default X: 0"

When I do GET requests I do not have any problem it is only with POST, PATCH or DELETE when the config values are reset (It resets all the params, not just the last I've changed)

System configuration

This are the other Django plugins I have installed, just in case:

django-app-namespace-template-loader==0.4
django-appconf==1.0.2
django-braces==1.8.1
django-compressor==2.0
django-constance==2.3.1
django-cors-headers==1.1.0
django-dbarray==0.2
django-extensions==1.6.1
django-filter==1.0.2
django-ipware==1.1.1
django-jenkins==0.18.1
django-material==0.9.2
django-nose==1.4.5
django-oauth-toolkit==0.11.0
django-picklefield==0.3.2
django-redis==4.4.4
django-static-precompiler==1.1
django-storages==1.1.8
djangorestframework==3.6.3
djangorestframework-camel-case==0.2.0
camilonova commented 6 years ago

Looks like this behaviour belongs to the django admin and not from constance.

Patataman commented 6 years ago

Neither Constance nor Admin was the problem, I found out that for some reason someone decided that reset redis parameters when doing a POST, PATCH or DELETE request was a good idea... :/