Commit e917018f authored by Michal Čihař's avatar Michal Čihař

Preseed contact form for logged in users

parent f5ab42ae
......@@ -31,7 +31,11 @@ def contact(request):
messages.add_message(request, messages.INFO, _('Message has been sent to administrator.'))
return HttpResponseRedirect('/')
else:
form = ContactForm()
initial = {}
if request.user.is_authenticated():
initial['name'] = request.user.get_full_name()
initial['email'] = request.user.email
form = ContactForm(initial = initial)
return render_to_response('contact.html', RequestContext(request, {
'form': form,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment