text: from django.shortcuts import render,redirect
  from django.contrib import messages
  from django.contrib.auth.decorators import login_required
  from .forms import UserRegisterForm
  from django.contrib.auth.models import User
  
  def register(request):
      if request.method == 'POST':
          form = UserRegisterForm(request.POST)
          if form.is_valid():
              form.save()   #this will save the content in database
              username = form.cleaned_data.get('username')
              messages.success(request, f'Account created for {username} !')
              return redirect('login')
  
  
      else:
          form = UserRegisterForm()
  
      return render(request, 'register.html', {'form' : form})
  
  def home(request):
      return render(request,'home.html')
  
      
  