<gh_stars>0
from django.shortcuts import render
from django.contrib.auth import login, authenticate
from django.contrib.auth.forms import UserCreationForm

# Create your views here.
def user_register(request):
    if request.method == 'POST':
        form = UserCreationForm(request.POST)
        if form.is_valid():
            form.save()
            return render(request,'user/register.html',{'form':form, 'message':'You Have Succesfully Registered'})
    else:
        form = UserCreationForm()
    return render(request,'user/register.html',{'form':form})
