Merge branch 'master' of http://210.77.77.77/xieshen/newmediamonitoring
# Conflicts: # NewMediaMonitoring/urls.py
This commit is contained in:
commit
6d313c3d22
|
@ -95,6 +95,7 @@ class Organization(models.Model):
|
|||
town = models.CharField('乡', max_length=256, null=True, blank=True)
|
||||
village = models.CharField('村', max_length=256, null=True, blank=True)
|
||||
level = models.ForeignKey(Level,on_delete=models.CASCADE,null=True,blank=True)
|
||||
directly = models.CharField('直属',max_length=256,null=True,blank=True)
|
||||
created = models.DateTimeField('创建时间', auto_now_add=True)
|
||||
updated = models.DateTimeField('更新时间', auto_now=True)
|
||||
|
||||
|
@ -107,6 +108,8 @@ class Userprofile(models.Model):
|
|||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
name = models.CharField('姓名', null=True, blank=True, max_length=256)
|
||||
sex = models.CharField('性别', null=True, blank=True, max_length=256)
|
||||
department = models.CharField('部门', null=True, blank=True, max_length=256)
|
||||
post = models.CharField('职务', null=True, blank=True, max_length=256)
|
||||
image = models.FileField(upload_to='profile', null=True, blank=True)
|
||||
organization = models.ForeignKey(
|
||||
Organization, on_delete=models.CASCADE, null=True, blank=True)
|
||||
|
@ -388,6 +391,7 @@ class News(models.Model):
|
|||
)
|
||||
id = models.UUIDField('id',primary_key=True,default=uuid.uuid4)
|
||||
type = models.CharField('文章类型',max_length=256,null=True,blank=True,choices=NEWMEDIA_NEWS_CHOICES)
|
||||
source = models.CharField('文章来源',max_length=256,null=True,blank=True)
|
||||
title = models.CharField('文章标题',max_length=256,null=True,blank=True)
|
||||
image = models.FileField(
|
||||
upload_to='news/%Y/%m/%d/', null=True, blank=True)
|
||||
|
|
|
@ -75,7 +75,7 @@ def send_code(request):
|
|||
after_1min = now + datetime.timedelta(minutes=1)
|
||||
response = sent_sms_code(phone, code)
|
||||
result = response.decode('utf8')
|
||||
print(result)
|
||||
print(phone,result)
|
||||
if "OK" in result:
|
||||
VerifyCode.objects.create(
|
||||
code=code, phone=phone, category=category, timeouted=after_1min)
|
||||
|
|
Loading…
Reference in New Issue