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.
24 lines
663 B
24 lines
663 B
# -*- coding: utf-8 -*-
|
|
from django.shortcuts import render
|
|
from django.contrib.auth.decorators import login_required
|
|
from django.views.decorators.csrf import csrf_protect
|
|
|
|
from ..models import License, LicensePrice
|
|
from ..consts import PAYFORMS
|
|
from ..forms import LicenseForm
|
|
|
|
|
|
@login_required
|
|
@csrf_protect
|
|
def order_license(request):
|
|
"""заказ лицензии
|
|
"""
|
|
template_name = 'customer/profile/license.html'
|
|
form = LicenseForm(request.POST or None,
|
|
initial = {'term': LicensePrice.objects.all()[0], 'payform': 0})
|
|
dictionary = {
|
|
'form': form,
|
|
}
|
|
return render(request, template_name, dictionary)
|
|
|
|
|
|
|