models.py 995 B

123456789101112131415161718192021222324252627
  1. import uuid
  2. #
  3. # from django.db import models
  4. #
  5. # # Create your models here.
  6. # from utils.models import BaseModel
  7. #
  8. # def image_upload_to(instance, filename):
  9. # return 'editorimg/{filename}'.format(filename=str(uuid.uuid4().hex)+str(filename))
  10. #
  11. # class WebNews(BaseModel):
  12. # name = models.CharField(max_length=200,null=False, blank=False,verbose_name='标题')
  13. # content = models.TextField(default='',verbose_name='内容')
  14. # rem = models.CharField(max_length=200,default='',verbose_name='备注')
  15. # class Meta:
  16. # db_table = 'web_news'
  17. # verbose_name = '新闻表'
  18. # verbose_name_plural = verbose_name
  19. # def __str__(self):
  20. # return self.name
  21. #
  22. # class EditorImg(BaseModel):
  23. # imgurl = models.ImageField(null=False, blank=False, upload_to=image_upload_to, verbose_name='图片')
  24. # class Meta:
  25. # db_table = 'web_editorimg'
  26. # verbose_name = '富文本编辑器图片上传'
  27. # verbose_name_plural = verbose_name