class OptionsView(View):
def get(self, request):
form = OptionsForm(initial=load_config())
return render(request, 'main/options_prsr.html', context={'form': form,
'nbar': 'options_prsr'})
def post(self, request):
bound_form = OptionsForm(request.POST)
if bound_form.is_valid():
if 'btn_reload' in request.POST:
main_loop.delay(request.POST.get('date2load').replace('-', ''))