Gogs 5 gadi atpakaļ
vecāks
revīzija
8cc597295d

+ 2 - 2
src/account/control_user.py

@@ -181,8 +181,8 @@ def login_user(request):
     cache.delete(captcha_id)
     if not login_info or not password:
         raise ce.TipException(u"账户或密码不能为空!")
-    if not idcode:
-        raise ce.TipException(u"验证码不能为空!")
+    #if not idcode:
+    #    raise ce.TipException(u"验证码不能为空!")
     #if idcode.upper() != captcha.upper():
     #    raise ce.TipException(u"验证码错误!")
 

+ 4 - 4
src/account/views.py

@@ -57,10 +57,10 @@ class LoginView(cv.BaseView):
     def post(self, request):
         """
         #账号登录
-        @username:"test" 用户名
-        @pwd:"test123" 密码
-        @captcha_id:"erwerkkk" 图形验证码接口返回的
-        @idcode:"erwe" 图形验证码
+        @username:"root",用户名
+        @pwd:"1qaz@WSX!@#",密码
+        @captcha_id:"erwerkkk",图形验证码接口返回的
+        @idcode:"erwe",图形验证码
         """
         try:
             cr.login_user(request)

+ 1 - 1
src/common/captcha.py

@@ -35,7 +35,7 @@ def create_idcode(mlen):
     buf = StringIO.StringIO()
     image.save(buf, 'png', quality=70)
     buf_str = base64.b64encode(buf.getvalue())
-    return ''.join(code), buf_str
+    return ''.join(code), "data:image/png;base64,"+buf_str
 
 ############## 辅助函数 ##############
 def rndColor():

+ 3 - 2
src/common/models.py

@@ -9,10 +9,11 @@ from django.db import models
 class UserInfo(models.Model):
     # 基础属性
     name = models.CharField(u"名字", max_length=255, blank=True)
+    password = models.CharField(u"密码", max_length=255, blank=True)
     realname = models.CharField(u"真实名称", max_length=255, blank=True, null=True)
     email = models.CharField(u"邮箱", max_length=255, blank=True)
     phone = models.CharField(u"手机号", max_length=64, blank=True)
-    parent_id = models.CharField(u"创建人ID", max_length=16, blank=True)
+    parent_id = models.CharField(u"创建人ID", max_length=16, blank=True,null=True)
     remark = models.TextField(u"备注", blank=True)
 
     last_login = models.CharField(u"上次登录时间", max_length=128, blank=True, db_column='last_login_time')
@@ -25,7 +26,7 @@ class UserInfo(models.Model):
     ctime = models.DateTimeField(u"创建时间", auto_now_add=True)
 
     class Meta:
-        db_table = "adminuser"
+        db_table = "admin_user"
         verbose_name = u"用户信息"
         app_label = "common"
 

+ 0 - 11
src/common/views.py

@@ -9,17 +9,6 @@ from django.contrib import auth
 from django.core.cache import cache
 
 from common import core_views as cv
-from common.models import Industry 
-
-class IndustryView(cv.BaseView):
-    def get(self, request):
-        """获取行业数据接口
-        """
-        qdata = request.json
-        idset = Industry.objects.filter(status="normal").values("id","name")
-        rdata = list(idset)
-        return cv.to_suc(rdata)
-
 
 class WsNotifyView(cv.BaseView):
     def post(self,request):

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 211
src/dashboard/control_dashboard.py


+ 1 - 1
src/settings/base.py

@@ -41,8 +41,8 @@ INSTALLED_APPS = [
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'common',
-    'wsm',
     'account',
+    'xeshop',
     'operation_log',
 ]
 

+ 1 - 1
src/urls.py

@@ -22,7 +22,7 @@ from django import views
 
 
 import common.views as cview
-import wsm.views as wview
+import xeshop.views as wview
 
 
 urlpatterns = [