From bed24b5c1c955d3d918ba682389870535f59a088 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Sat, 21 Sep 2019 16:26:55 +0200 Subject: [PATCH] Unusefull stuff --- multi_op/views.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/multi_op/views.py b/multi_op/views.py index 7b94a158..7debd02e 100644 --- a/multi_op/views.py +++ b/multi_op/views.py @@ -154,34 +154,10 @@ def disconnect_room(request, room, roomid): )) -def edit_preferences(request): - """ View to edit the settings of the tickets """ - - preferences_instance, created = Preferences.objects.get_or_create(id=1) - preferencesform = EditPreferencesForm( - request.POST or None, - instance = preferences_instance,) - - if preferencesform.is_valid(): - if preferencesform.changed_data: - preferencesform.save() - messages.success(request,'Preferences updated') - return redirect(reverse('preferences:display-options',)) - else: - messages.error(request,'Formulaire Invalide') - return form({'preferencesform':preferencesform,},'multi_op/form_preferences.html',request) - return form({'preferencesform':preferencesform,},'multi_op/form_preferences.html',request) - - def navbar_user(): """View to display the app in user's dropdown in the navbar""" return ('topologie', render_to_string('multi_op/navbar.html')) -def preferences(request): - """ View to display the settings of the tickets in the preferences page""" - pref, created = Preferences.objects.get_or_create(id=1) - context = {'preferences':pref,'language':str(pref.LANGUES[pref.mail_language][1])} - return render_to_string('tickets/preferences.html', context=context, request=request, using=None)