HI,
One more question
How do i update a manytomany field which is a self referential field ie
it points to the same table.
Consider for example facebooksession contains a field called friends
friends =
models.ManyToManyField("self",db_column='uid',blank=True,null=True)
On Sun, Mar 18, 2012 a
thnk u very much i got it :)
On Sun, Mar 18, 2012 at 3:57 PM, Ian Lewis wrote:
> Hi,
>
> facebook_session.books_name is a RelatedManager on the Books model class.
>
> You need to add books to the list with the add() method.
>
> book = Books(book_name="name", book_category="category")
> book.save
Hi,
facebook_session.books_name is a RelatedManager on the Books model class.
You need to add books to the list with the add() method.
book = Books(book_name="name", book_category="category")
book.save()
facebook_session.books_name.add(book)
See:
https://docs.djangoproject.com/en/1.3/ref/models
Hi
I ve to models
class FacebookSession(models.Model):
access_token = models.CharField(max_length = 250,unique=True)
expires = models.IntegerField(null=True)
user = models.ForeignKey(User, null=True)
uid = models.BigIntegerField(unique=True, null=True)
birthday = models.Dat
4 matches
Mail list logo