Hello,
I have this piece of code:

from django import newforms as forms

class RegistroForm(forms.Form):
        username = forms.CharField(max_length=30)
        password = forms.CharField(max_length=20, widget=forms.PasswordInput())
        nombre = forms.CharField(max_length=50)
        email = forms.EmailField(max_length=30)

def registro_usuario(request):
        mensaje = "Registro de usuario"
        uForm = RegistroForm()
        
        if request.method == 'POST':
                if request.POST.get('submit') == 'Registro':
                        postDict = request.POST.copy()
                        uForm = RegistroForm(postDict)
                        
                        if uForm.is_valid():
                                uForm.save()                    
<<<<<<<<<<<<<<<<<<<<<<<<<

And I get this error:

Traceback:
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py"
in get_response
  82.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/home/fcano/djcode/bolsacarteras/../bolsacarteras/Autenticacion/views.py"
in registro_usuario
  61.                           uForm.save()

Exception Type: AttributeError at /registro/
Exception Value: 'RegistroForm' object has no attribute 'save'

I supposed that every object from any class inherited from
newforms.Form already had a save attribute!?!?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to