From defaa4a131855692413f6a37e76c6b4e424c1d36 Mon Sep 17 00:00:00 2001 From: baoliang Date: Mon, 26 Oct 2020 08:58:58 +0800 Subject: [PATCH] add message --- polls/views/__pycache__/user.cpython-38.pyc | Bin 6164 -> 6251 bytes polls/views/user.py | 2 ++ 2 files changed, 2 insertions(+) diff --git a/polls/views/__pycache__/user.cpython-38.pyc b/polls/views/__pycache__/user.cpython-38.pyc index 086d6a7eb8f17338df21e2d5e94af2866f8e8e9f..3a7283969ce11d8cca471206602153e40cd7cc8c 100644 GIT binary patch delta 956 zcmYk3T}V@57{}jtZfDlK&DpHoYQyGCe1kKm=L#k;icEEo1wL6MNysKzp2BsTQiPN%{X_$d&pQw^FKxCsr z6soA0ajGC8C;}rxdfwO~n|NGEswk1oF?FnvXG~MHN0rbfbh0H$5_(05=~6G$>U`TNx4wR+-VwDF~YO9eAdJ3^{l9Y z@Gb3J?QDrVJ9fU}26+#2GS?K}pOFCZx*@2EdPmCnRpe$~tWGYhEWBHpOs&s7`?+*~ z?d`(a_)ISIJ~yAvO;4;md<-8n5n2php|vn;3bX6ccu11N@`wbI@R_zilhy+Pt&cWm z?rA3|^@CCG=e(f**yraX#0HM6J}QMGV^K+#f`&k;0)2jz$us^Ruo zofwgB49BI2coOq_|6w0jS-ljAvwV9qh=wyX06w!LvuvRBSl%u_l>b;F79ma{9Eb|U zVUCvtA|8Hwx*yc0+tyb6HX`Z}ZScT!q-@s?&mgvQWQ{i?Vs!A<_WF(R#Z*E2V9QiP zgBhRs2c?}*V)5`>skh7ujo8%yf9xLEFj>^{=#8Jd0Xty1Aw{huJi^Uk(J;@bF*{bOrEZeGRIJ0T)5+3;HpI8`sj;Q0u6p3^r{gnWV!=g>KCCz>Kq!cEOVK03CpD z&Qjx53|At$Kv5{qhicH zgdp^=CZ4n)BbP|T&>l9Zhu(@Hf}X>AY%}m*=%L?P34>-hAI|T5zvuie`%Mp5$SZf&{HzbppU<#^~KavwoQDu{ME;bl4uZ!~n zFvFo)G$&W&JPZptTdu;WoM$<^DQXq#Vu9tXJad_LRfsdwrn!0M;F*lZ#j6~<@=RKvxHXp=%c^NTj%S?pki>-ZEDWGWR*FxYUm?`TjngiU zU#~Yx58nKEn=frYF0F0q9hi5m%5fT2o*3c%VY@M#o#Caa7F<-S(Qwy63Rm6V<#zHZ zgig$Ps@)xw_7YAL`f=0K66oS-)S`!|a)MAk^mQCk8ZFsO`VrQ9Pr^vC+ZzP;;Xn^L z2XU_IU0ssW8yr#bpDAU-C`mEwSI)r}-dCDo475D}{<-~puds7)(wkh1I&s?*l831+LP%iJU)%WK?zHisBa@y@-5H&ln$7B} zevRxg-0(->J$~_@f;9g2ufSzo4kVAYlGsBSAfyN*gfT)IUBL^1umDmmj{uM3JiI)D G0{j8{pU$!X diff --git a/polls/views/user.py b/polls/views/user.py index 1e0a82a..177d1d3 100644 --- a/polls/views/user.py +++ b/polls/views/user.py @@ -37,6 +37,8 @@ def polls_login(request): profile = user.userprofile_set.first() if not profile or profile.status == 0: return JsonResponse({'status': 'error', 'message': '用户尚未激话'}) + if not profile or profile.admin_status == 0: + return JsonResponse({'status': 'error', 'message': '用户已删除,请联系管理员'}) u = authenticate(request, username=phone, password=password) if u is not None: