当前位置:网站首页>无限极分类
无限极分类
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'边栏推荐
猜你喜欢

DSL search results processing, including sorting, paging, highlighting

一文了解Zipkin

shardingproxy分库分表实战及同类产品对比

Shallow chat link tracking

一文了解配置中心

The database takes the fields of the configuration file, and then processes and judges the data

ThreadLocal线程安全示例及其原理

Freshman task-5

CVE-2022-23131 Zabbix SAML SSO认证绕过漏洞

FanoutExchange交换机简单使用
随机推荐
Mysql database table a data synchronization to table b
Penetration test 10 - scan web directories (dirb, wfuzz, wpscan, Nikto)
项目组暑假总结01
POC——DVWA‘s File Inclusion
加密和解密
Construction and application of knowledge map de (VI): storage, service and quality of knowledge map
Hightec new aurix tc37x demo project
拥抱声明式UI
数据库取配置文件字段,然后进行数据处理和判断
Simple UI funny text conversion Emoji expression wechat applet supports sentence word conversion_ Source code
MySQL fuzzy matching 1, 11111 similar string problems
npm安装教程
Restclient operation document
毕设:基于Vue+Socket+Redis的分布式高并发防疫健康管理系统
String string special interception processing according to symbols
shardingproxy分库分表实战及同类产品对比
TiDB 性能优化概述
tidb 学习
摄像头切换
赚钱大师小程序【最新版5.9.9】商城/佣金即时提现/分销推广/话费充值/美团饿了么外卖