Thank very much, but I don't know what's happen.
I execute the next code and it's doing nothing :
if request.POST.get('usuariosDelete','')!='':
for i in request.POST.getlist('usuarios'):
usuario=User.objects.get(id=i)
datos.usuarios.remove(usuario)
--
2011/11/10 Aleksandar Ristić :
> If I understood correctly, you need to remove a user from a project. You
> can do it like this:
>
> datos.usarios.remove(User.objects.get(id=user_id))
> datos.save()
>
You don't need to save() the model instance after removing an item
from an M2M link - you haven't
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10. 11. 11 8:50, jose osuna perez wrote:
> Sorry xD
> Hi, i wrote the same text in a Spanish blog xD, well I explain my
> problem, I have a table that has the following model:
>
> class Proyectos(models.Model):
> titulo=models.CharField(max_length
Sorry xD
Hi, i wrote the same text in a Spanish blog xD, well I explain my
problem, I have a table that has the following model:
class Proyectos(models.Model):
titulo=models.CharField(max_length=100)
creacion=models.DateField(default=datetime.datetime.now)
estado=models.CharField(max_l
English please
2011/11/9 jose osuna perez
> Hola, bueno les explico mi problema, tengo 1 tabla que tiene el
> siguiente modelo:
>
> class Proyectos(models.Model):
>titulo=models.CharField(max_length=100)
>creacion=models.DateField(default=datetime.datetime.now)
>estado=models.CharFie
Hola, bueno les explico mi problema, tengo 1 tabla que tiene el
siguiente modelo:
class Proyectos(models.Model):
titulo=models.CharField(max_length=100)
creacion=models.DateField(default=datetime.datetime.now)
estado=models.CharField(max_length=30)
objetivo=models.TextField(null=Tr
6 matches
Mail list logo