Beispiel #1
0
def signup(request):
    form = LaunchRockForm(request.POST or None)
    if request.method == 'POST':
        if form.is_valid():
            LaunchRock.objects.create(email=form.cleaned_data['email'], sign_date=datetime.datetime.now(),
                                    ip=request.META['REMOTE_ADDR'], http_refer=request.META['HTTP_REFERER'])
            return HttpResponseRedirect(reverse('launch-done'))
    return render(request, _t('launch'), {'form': form})