You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
696 B

import json
from django.views.generic import TemplateView
from django.shortcuts import HttpResponse
#from forms import CallbackForm
from service.order_forms import CallBackForm
class AdvertisingView(TemplateView):
template_name = 'simple_pages/advertising.html'
class AboutView(TemplateView):
template_name = 'simple_pages/about.html'
def callback(request):
response = {'success': False}
if request.GET:
form = CallBackForm(request.GET)
if form.is_valid():
form.save()
response['success'] = True
else:
response['errors'] = form.errors
return HttpResponse(json.dumps(response), content_type='application/json')