Perfect! Thanks.
On Oct 25, 2:20 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On 10/25/07, Ryan K <[EMAIL PROTECTED]> wrote:
>
> > Why can't I change the User's name like so:
>
> > results[0].user.name = 'Brian'
> > results[0].user.save()
>
> > ?
>
> > I instead have to assign it first:
>
> >
On 10/25/07, Ryan K <[EMAIL PROTECTED]> wrote:
> Why can't I change the User's name like so:
>
> results[0].user.name = 'Brian'
> results[0].user.save()
>
> ?
>
> I instead have to assign it first:
>
> found_user = results[0].user
> found_user.name = 'Brian'
> found_user.save()
>
> Any help unders
For example, I have to basic models:
class User(models.Model):
name = models.CharField(max_length=30)
class AlterEgo(models.Model):
nickname = models.CharField(max_length=30)
user = models.ForeignKey(User)
I do a lookup for a User named 'Ryan' and one object is found.
results
For example, I have to basic models:
class User(models.Model):
name = models.CharField(max_length=30)
class AlterEgo(models.Model):
nickname = models.CharField(max_length=30)
user = models.ForeignKey(User)
I do a lookup for a User named 'Ryan' and one object is found.
results
4 matches
Mail list logo