From c440f1f509d8fe30cf683b94d275910b22f6d94c Mon Sep 17 00:00:00 2001 From: baoliang Date: Thu, 17 Sep 2020 16:23:27 +0800 Subject: [PATCH] add department/post to userprofile --- NewMediaMonitoring/urls.py | 6 ------ dashboard/models.py | 2 ++ polls/views/__pycache__/user.cpython-38.pyc | Bin 5140 -> 5142 bytes polls/views/user.py | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/NewMediaMonitoring/urls.py b/NewMediaMonitoring/urls.py index 3ed1ca5..ab05d0f 100644 --- a/NewMediaMonitoring/urls.py +++ b/NewMediaMonitoring/urls.py @@ -17,16 +17,10 @@ from django.contrib import admin from django.urls import path, re_path, include from django.conf import settings from django.conf.urls.static import static -from wagtail.admin import urls as wagtailadmin_urls -from wagtail.documents import urls as wagtaildocs_urls -from wagtail.core import urls as wagtail_urls urlpatterns = [ path('polls/', include('polls.urls')), - re_path(r'^cms/', include(wagtailadmin_urls)), - re_path(r'^documents/', include(wagtaildocs_urls)), - re_path(r'^pages/', include(wagtail_urls)), path('admin/', admin.site.urls), path('', include('dashboard.urls')), path('captcha/', include('captcha.urls')), diff --git a/dashboard/models.py b/dashboard/models.py index a8c3529..5e15d9c 100644 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -108,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) diff --git a/polls/views/__pycache__/user.cpython-38.pyc b/polls/views/__pycache__/user.cpython-38.pyc index dddc807292600955cd6a6dba5d728db821d45da1..d54b6badb568af9fa4812c4c2b074cba65ea2aee 100644 GIT binary patch delta 67 zcmbQDF-?Ovl$V!_0SL;aljHYp@EC^H5|=Mj0`FKH5}P&MOQYj WVE@9%$hCPcr!*&H)aIQ+(To6o7!z;+ delta 65 zcmbQHF-3znl$V!_0SMCGhQx2*$orIy@xf$99+k=B>@B<;&5Vo;Df~4Y*=$9ZHm_p; U!pO+6c|NB!C*!TnyM>||0awox9{>OV diff --git a/polls/views/user.py b/polls/views/user.py index 666803d..574be62 100644 --- a/polls/views/user.py +++ b/polls/views/user.py @@ -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)