reg/views.py
changeset 80 cb36fc4f29df
parent 77 121a7aa78469
child 98 1af134a1e53d
equal deleted inserted replaced
79:26c22028006d 80:cb36fc4f29df
    91 
    91 
    92             if event:
    92             if event:
    93                 event.attendees.add(new_user)
    93                 event.attendees.add(new_user)
    94                 event.save()
    94                 event.save()
    95             reg_events.send_activation(new_user)
    95             reg_events.send_activation(new_user)
    96             return redirect('/reg/account_created')
    96             return redirect('/workshop/registration/account_created')
    97         else:
    97         else:
    98             return render_to_response('register.html', {'form':form, 'event':event})
    98             return render_to_response('register.html', {'form':form, 'event':event})
    99     else:
    99     else:
   100         form = reg_forms.RegisterForm()
   100         form = reg_forms.RegisterForm()
   101         return render_to_response('register.html', {'form':form, 'event':event})
   101         return render_to_response('register.html', {'form':form, 'event':event})
   376 
   376 
   377     if request.method == "POST":
   377     if request.method == "POST":
   378         form = reg_forms.EditProfileForm(request.POST)
   378         form = reg_forms.EditProfileForm(request.POST)
   379         if form.is_valid():
   379         if form.is_valid():
   380             reg_events.update_profile(user, form.cleaned_data)
   380             reg_events.update_profile(user, form.cleaned_data)
   381             return redirect('/reg/profile/view')
   381             return redirect('/workshop/registration/profile/view')
   382         else:
   382         else:
   383             return render_to_response('edit_profile.html', {'user':user, 'form':form})
   383             return render_to_response('edit_profile.html', {'user':user, 'form':form})
   384     else:
   384     else:
   385         old_info = {'first_name': user.first_name,
   385         old_info = {'first_name': user.first_name,
   386                     'last_name': user.last_name,
   386                     'last_name': user.last_name,