当前位置:网站首页>无限极分类
无限极分类
2022-07-17 05:03:00 【du fei】
# 商品种类表
class Cate(models.Model):
name = models.CharField('种类名称', max_length=30)
# 自己链接自己
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'
# 分类分组
class Group(models.Model):
name = models.CharField('频道组名称', max_length=30)
# 1:1模型类
cate = models.OneToOneField(Cate, on_delete=models.CASCADE, related_name='一级类别')
group_url = models.CharField('频道组地址', max_length=200, default=' http://jd.com')
sequence = models.IntegerField('展示顺序', default=0)
def __str__(self):
return self.name
class Meta:
db_table = 'group'边栏推荐
- Tasking new aurix tc37x demo project
- Emqx pressure test tread pit for your reference
- 摄像头切换
- 银行联行号cnasp&查询(二)
- 快速掌握MIPI开发攻略
- 一文了解配置中心
- Construction and application of knowledge map de (VI): storage, service and quality of knowledge map
- 浅聊全局过滤器
- Simple UI funny text conversion Emoji expression wechat applet supports sentence word conversion_ Source code
- solve [email protected] : `node install. Problems of js`
猜你喜欢
随机推荐
TiDB 性能优化概述
DirectExchange交换机的简单使用。
POC——DVWA‘s SQL Injection
【Lipschitz】基于matlab的Lipschitz李氏指数仿真
毕设:基于Vue+Socket+Redis的分布式高并发防疫健康管理系统
Expected to replace deepfake? Uncover this year's super popular nerf Technology
Shallow chat link tracking
根据日期重新排列数据js
MYSQL数据库表A数据同步到表B
swagger的坑
mysql优化
CVE-2020-10199 Nexus Repository Manager3远程命令执行漏洞复现
[fuel cell] simulation of fuel cell system control strategy based on Simulink
Introduction to redis
力扣刷题02(三数之和+最大子序和+二叉树最近公共祖先)
TiDB 性能分析和优化
Common PostgreSQL data operation notes (updated from time to time)
Learn about the configuration center
数据库取配置文件字段,然后进行数据处理和判断
POC——DVWA‘s XSS Reflected







