Re: How to insert recent session Username or UserId in database table in Django?

2015-08-19 Thread Luis Zárate
Did you make migrations ? $ python manage.py makemigrations $ python manage.py migrate El miércoles, 19 de agosto de 2015, Remaze Vs escribió: > operationalError at/ > no such column:products_product.User_id > > -- > You received this message because you are subscribed to

Re: How to insert recent session Username or UserId in database table in Django?

2015-08-19 Thread Remaze Vs
operationalError at/ no such column:products_product.User_id -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post

Re: How to insert recent session Username or UserId in database table in Django?

2015-08-19 Thread Remaze Vs
> > OperationalError at / >> >> no such column: products_product.User_id >> >> operationalError at/ no such column:products_product.User_id -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: How to insert recent session Username or UserId in database table in Django?

2015-08-19 Thread James Schneider
Use 'from' instead of 'import' for the first word. -James On Aug 19, 2015 12:33 AM, "Remaze Vs" wrote: > thanks for your time, but I am facing error invalid syntax , on that line > import django.contrib.auth.models import User > > my model.py > from django.conf import

Re: How to insert recent session Username or UserId in database table in Django?

2015-08-19 Thread Remaze Vs
thanks for your time, but I am facing error invalid syntax , on that line import django.contrib.auth.models import User my model.py from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save import

Re: How to insert recent session Username or UserId in database table in Django?

2015-08-18 Thread Luis Zárate
You need to make a foreignkey to a user. if you have a custom user look here https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#referencing-the-user-model but if it is a simple django authentication use import django.contrib.auth.models import User class Product(models.Model):

How to insert recent session Username or UserId in database table in Django?

2015-08-18 Thread Remaze Vs
I am new in Django, I am trying to make ecommerce project. I want to Insert recent login username or user Id in database by using formview code.so how to insert recent login username in database? Here is Model.py class Product(models.Model): title =