from django.shortcuts import render
from .forms import RegisterForm
def register(feauest):
if request.method=='POST':
form=RegisterForm(request.POST)
if form.is_valid():
name=form.cleaned_data['username']
password=form.cleaned_data['password']
email=form.cleaned_data['email']
gender=form.cleaned_data['gender']
form.save()
form=RegisterForm()
return render(request, 'form.html', {'form': form})'
当我运行它时,我得到一个 AttributeError: 'RegisterForm' object has no attribute 'save'
请谁能帮我修复它。