#import requests
from django.http import HttpResponse
from django.shortcuts import render

from .forms import usersForm
from django.shortcuts import redirect
from django.http import HttpResponseRedirect

def index(reguest):
	return render(reguest,'www/index.html')

def master(reguest):
	
	if(reguest.method=="POST"):
		form = usersForm(reguest.POST)
		if form.is_valid():
			form.save()
			return render(reguest,'www/master.html')
		else:

			return render(reguest,'www/master.html',{'errors':form.errors,'form':form})	
	
	form = usersForm()		
	return render(reguest,'www/master.html',{'form':form})