def add_crime(request): context = RequestContext(request) if request.method == 'POST': form = crimeForm(request.POST) var = request.POST['crimetype'] if form.is_valid(): form.save(commit=True) return thanks(request) else: print form.errors else: form = crimeForm() return render(request, 'crime/add_crime.html', locals())
def mod_crime(request): form = crimeForm() return render(request, 'crime/mod_crime.html', locals())