Browse Source

Fix Logování editu

middleware_test
Jonas Havelka 3 years ago
parent
commit
5ac195e63b
  1. 6
      seminar/views/views_all.py

6
seminar/views/views_all.py

@ -1162,12 +1162,12 @@ def resitelEditView(request):
form = PoMaturiteProfileEditForm(POST) form = PoMaturiteProfileEditForm(POST)
else: else:
form = ProfileEditForm(POST) form = ProfileEditForm(POST)
form_hash = hash(frozenset(form.items()))
form_logger = logging.getLogger('seminar.prihlaska.form')
form_logger.info("EDIT:" + str(form) + str(form_hash)) # TODO možná logovat jinak
if form.is_valid(): if form.is_valid():
## Změny v osobě ## Změny v osobě
fcd = form.cleaned_data fcd = form.cleaned_data
form_hash = hash(frozenset(fcd.items()))
form_logger = logging.getLogger('seminar.prihlaska.form')
form_logger.info("EDIT:" + str(fcd) + str(form_hash)) # TODO možná logovat jinak
osoba_edit.jmeno = fcd['jmeno'] osoba_edit.jmeno = fcd['jmeno']
osoba_edit.prijmeni = fcd['prijmeni'] osoba_edit.prijmeni = fcd['prijmeni']
osoba_edit.pohlavi_muz = fcd['pohlavi_muz'] osoba_edit.pohlavi_muz = fcd['pohlavi_muz']

Loading…
Cancel
Save