im getting this error all the time. IntegrityError at /accounts/register/ column username is not unique Request Method: POST Request URL: http://localhost:8000/accounts/register/ Exception Type: IntegrityError Exception Value: column username is not unique Exception Location: C:\Python25\lib\site-packages\django\db\backends \sqlite3\base.py in execute, line 93
forms.py class RegistrationForm(forms.Form): """Player registration form""" username = forms.CharField(max_length=20) password = forms.CharField(min_length=4, max_length=20, widget=forms.PasswordInput()) first_name = forms.CharField(max_length=20) last_name = forms.CharField(max_length=20) email = forms.EmailField(max_length=40) def save(self, data): u = User.objects.create_user(data['username'], data['email'], data['password']) u.is_active = False u.first_name = data['first_name'] u.last_name = data['last_name'] u.save() views.py def register_page(request): """Register page""" if request.user.is_authenticated(): return render_to_response('register.html', {'has_account':True}) if request.POST: form = RegistrationForm(request.POST) if form.is_valid(): form.save(form.clean_data) form = LoginForm() return render_to_response('login.html', {'form':form}) else: return render_to_response('register.html', {'form':form}) else: form = RegistrationForm() return render_to_response('register.html', {'form':form}) can someone please help? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---