Ejemplo n.º 1
0
def order_info_view(request, template_name="registration/order_info.html"):
    """Представление данных профиля"""
    if request.method == 'POST':
        postdata = request.POST.copy()
        form = UserProfileForm(postdata)
        if form.is_valid():
            profile.set(request)
            url = urlresolvers.reverse('my_account')
            return HttpResponseRedirect(url)
    else:
        user_profile = profile.retrieve(request)
        form = UserProfileForm(instance=user_profile)
    page_title = _(u'Edit Order Information')
    return render_to_response(template_name, locals(),
                                  context_instance=RequestContext(request))
Ejemplo n.º 2
0
def order_info_view(request, template_name="registration/order_info.html"):
    """Представление данных профиля"""
    if request.method == 'POST':
        postdata = request.POST.copy()
        form = UserProfileForm(postdata)
        if form.is_valid():
            profile.set(request)
            url = urlresolvers.reverse('my_account')
            return HttpResponseRedirect(url)
    else:
        user_profile = profile.retrieve(request)
        form = UserProfileForm(instance=user_profile)
    page_title = _(u'Edit Order Information')
    request.breadcrumbs(page_title, request.path_info)
    return render_to_response(template_name, locals(),
                                  context_instance=RequestContext(request))
Ejemplo n.º 3
0
def set(request):
    """Заполняем форму данными пользователя"""
    profile = retrieve(request)
    profile_form = UserProfileForm(request.POST, instance=profile)
    profile_form.save()
Ejemplo n.º 4
0
def set(request):
    """Заполняем форму данными пользователя"""
    profile = retrieve(request)
    profile_form = UserProfileForm(request.POST, instance=profile)
    profile_form.save()
Ejemplo n.º 5
0
def set(request):
    profile = retrieve(request)
    profile_form = UserProfileForm(request.POST, instance=profile)
    profile_form.save()