Hello,

I'm not familiar with ManyToMany relationships since I use Django with
mongodb and this doesn't exist like so. But I'll give it a shot :

> For example: "foo", "pepe1", "pepe2" are users of the project. I
> delete returns "foo"
> I try in every way like this:
> datos=Proyectos.objects.get(id=identificador)
> if request.POST.get('usuarios','')!='':
>         datos.usuarios.add(request.POST.get('usuarios'))
>         if request.POST.get('usuariosDelete','')!='':
>                 datos.usuarios=[]

First it only tries to delete a user if a user is added, is it
intended ?
Then here :

>datos.usuarios.add(request.POST.get('usuarios'))

Here you're adding the username from the form when there is a User
object expected ?

>I want to eliminate one of those
>users.

So why trying to do  datos.usuarios=[] ? Should be
datos.usuarios.remove(the_user_you_want_to_remove).

-- 
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