使用这个小烧瓶应用程序:
session["counter"]
并进行简单的GET请求:
from django.db import models
class Category(models.Model):
name = models.CharField(max_length=100, )
class Industry(models.Model):
name = models.CharField(max_length=100)
class OrderDetail(models.Model):
company_name = models.CharField(max_length=100, blank=True, null=True)
name_in_logo = models.CharField(max_length=150)
slogan = models.CharField(max_length=200)
describe_website_and_audience = models.TextField(blank=True)
category = models.OneToOneField(Category, on_delete=models.CASCADE, default=None)
industry = models.OneToOneField(Industry, on_delete=models.CASCADE, default=None)
class SampleImages(models.Model):
image = models.ImageField(upload_to='images/tile_images')
category = models.ManyToManyField(Category)
industry = models.ManyToManyField(Industry)
orderdetail = models.ForeignKey(OrderDetail, on_delete=models.CASCADE, default=None)
{{1}}的内容在连续请求之间永不改变,始终保持1。我读过其他问题,我可能不得不启用cookie。这是否适用于我的情况?如果是这样,我该怎么办?我尚未找到解决方案。谢谢。