i start working with django 1.3 class based views
so i have the following problem:

when i try to update a user using django,contrib,auth.models (in this
case User model)
the is_active field doesn't update.

so i have the following view:

 class UpdateUserView(UpdateView):
        model = User    # User is taken from django.contrib.auth.models
        form_class = UserForm   # I use UserForm to hide some fields
        template_name = 'admin/user_form.html'
        success_url = '/admin/usuarios/'


the form is the following:

  class UserForm(forms.ModelForm):
        class Meta:
                model = User  # User is taken from django.contrib.auth.models
                exclude =('email','last_login','date_joined')
        def __init__(self, *args, **kwargs):
                super(UserForm, self).__init__(*args, **kwargs)


-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to