123456789101112131415161718192021222324252627 |
- import uuid
- #
- # from django.db import models
- #
- # # Create your models here.
- # from utils.models import BaseModel
- #
- # def image_upload_to(instance, filename):
- # return 'editorimg/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
- #
- # class WebNews(BaseModel):
- # name = models.CharField(max_length=200,null=False, blank=False,verbose_name='标题')
- # content = models.TextField(default='',verbose_name='内容')
- # rem = models.CharField(max_length=200,default='',verbose_name='备注')
- # class Meta:
- # db_table = 'web_news'
- # verbose_name = '新闻表'
- # verbose_name_plural = verbose_name
- # def __str__(self):
- # return self.name
- #
- # class EditorImg(BaseModel):
- # imgurl = models.ImageField(null=False, blank=False, upload_to=image_upload_to, verbose_name='图片')
- # class Meta:
- # db_table = 'web_editorimg'
- # verbose_name = '富文本编辑器图片上传'
- # verbose_name_plural = verbose_name
|