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
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
>
> 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
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
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
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):
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 =
7 matches
Mail list logo