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 = models.CharField(max_
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 d
>
> 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 emai
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
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,
Actually I want to insert session login user data in database but I when I
put this code I get all register user in Dropdown but I want to only
current login user data not all and also I want to hide this field
value.please help.
model.py
from django.conf import settingsfrom django.core.urlres
view.py file
class DealsForm(ModelForm):
class Meta:
model = Product
fields =
['title','description','category','price','sale_price','slug','active','update_defaults','user']
exclude = ('user',)
model.py file
class Product(models.Model):
title = models.CharF
I am trying to insert session login user id in database... here is my code
view.py
from django.shortcuts import render,redirect, Http404
from django.forms import ModelForm
# Create your views here.
from marketing.forms import EmailForm
from marketing.models import MarketingMessage, Slider
from
8 matches
Mail list logo