import os
import platform

from django import get_version as django_version
from django.shortcuts import render, redirect
from .forms import IntakeForm

def index(request):
    if request.method == 'POST':
        form = IntakeForm(request.POST)
        if form.is_valid():
            form.save()
            return redirect('intake_success')
    else:
        form = IntakeForm()
    return render(request, 'core/index.html', {'form': form})

def intake_success(request):
    return render(request, 'core/success.html')
