On 19/08/15 13:25, Remaze Vs wrote:
> username=self.request.user.username
What do you want to accomplish with this line?
This cannot work.
Where should self and self.request come from?
You probably want to us a ForeignKey to the User model.
(user = models.ForeignKey(User))
Afterwards you have to
I am new in Django I am trying to insert session login username in
database.but facing this error.
my model.py file
class Product(models.Model):
title = models.CharField(max_length=120)
description = models.TextField(null=True, blank=True)
category = models.ManyToManyField(Category, null=True,
2 matches
Mail list logo