当前位置:网站首页>Infinite classification
Infinite classification
2022-07-19 05:04:00 【du fei】
# List of commodity types
class Cate(models.Model):
name = models.CharField(' Category name ', max_length=30)
# Link yourself
cid = models.ForeignKey('self', on_delete=models.CASCADE, related_name='subs', null=True, blank=True)
def __str__(self):
return self.name
class Meta:
db_table = 'cate'
# Sort and group
class Group(models.Model):
name = models.CharField(' Channel group name ', max_length=30)
# 1:1 Model class
cate = models.OneToOneField(Cate, on_delete=models.CASCADE, related_name=' Primary categories ')
group_url = models.CharField(' Channel group address ', max_length=200, default=' http://jd.com')
sequence = models.IntegerField(' Display order ', default=0)
def __str__(self):
return self.name
class Meta:
db_table = 'group'边栏推荐
猜你喜欢

用户登录-以及创建验短信证码

POC——DVWA‘s SQL Injection

MYSQL两个查询条件取并集然后进行查询
[email protected]: `node install.js` 的问题"/>解决[email protected]: `node install.js` 的问题

CVE-2020-10199 Nexus Repository Manager3远程命令执行漏洞复现

邮箱发送邮件(包含附件,网易、QQ)

SQL statement learning

Harmonyos second training notes

PyGame installation -requirement already satisfied

用户的管理-限制
随机推荐
Web development with fastapi
异步数据-短信验证码
【Batch】批量删除中间文件夹-个人研究脚本
上传七牛云的方法
Chat about global filter
用户的管理-限制
Attendance check-in and leave system based on SSM framework
Order system of middle office
String string special interception processing according to symbols
itext修改pdf文字
The database takes the fields of the configuration file, and then processes and judges the data
ThreadLocal线程安全示例及其原理
junit4和junit5区别
安装MySQL
Modelarts second training notes
Construction and application of knowledge map de (VII): large scale knowledge map pre training
HarmonyOS第四次培训笔记
天道酬勤,保持热爱
浅聊链路追踪
Wechat docking mechanism memo