From b2929c27b8f86ad8cabab08f571c4c959b4eb773 Mon Sep 17 00:00:00 2001 From: jly8866 <164473279@qq.com> Date: Fri, 17 Mar 2017 16:28:01 +0800 Subject: [PATCH] bug fix. --- sql/admin.py | 2 +- sql/migrations/0002_auto_20170317_1627.py | 32 +++++++++++++++++++++++ sql/models.py | 4 +-- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 sql/migrations/0002_auto_20170317_1627.py diff --git a/sql/admin.py b/sql/admin.py index bec66f28..0f02ce17 100644 --- a/sql/admin.py +++ b/sql/admin.py @@ -13,7 +13,7 @@ class master_configAdmin(admin.ModelAdmin): class workflowAdmin(admin.ModelAdmin): list_display = ('id','workflow_name', 'engineer', 'review_man', 'create_time', 'finish_time', 'status', 'is_backup', 'review_content', 'cluster_name', 'reviewok_time', 'sql_content', 'execute_result') - search_fields = ['id','workflow_name', 'engineer', 'review_man', 'create_time', 'finish_time', 'status', 'is_backup', 'review_content', 'cluster_name', 'reviewok_time', 'sql_content', 'execute_result'] + search_fields = ['id','workflow_name', 'engineer', 'review_man', 'sql_content'] #创建用户表单重新定义,继承自UserCreationForm class usersCreationForm(UserCreationForm): diff --git a/sql/migrations/0002_auto_20170317_1627.py b/sql/migrations/0002_auto_20170317_1627.py new file mode 100644 index 00000000..893727b8 --- /dev/null +++ b/sql/migrations/0002_auto_20170317_1627.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sql', '0001_initial'), + ] + + operations = [ + migrations.AlterModelOptions( + name='master_config', + options={'verbose_name': '主库地址', 'verbose_name_plural': '主库地址'}, + ), + migrations.AlterModelOptions( + name='workflow', + options={'verbose_name': '工单管理', 'verbose_name_plural': '工单管理'}, + ), + migrations.AlterField( + model_name='master_config', + name='master_password', + field=models.CharField(verbose_name='登录主库的密码', max_length=300), + ), + migrations.AlterField( + model_name='master_config', + name='master_user', + field=models.CharField(verbose_name='登录主库的用户名', max_length=100), + ), + ] diff --git a/sql/models.py b/sql/models.py index c199469d..e5a66da8 100644 --- a/sql/models.py +++ b/sql/models.py @@ -24,8 +24,8 @@ class master_config(models.Model): cluster_name = models.CharField('集群名称', max_length=50) master_host = models.CharField('主库地址', max_length=200) master_port = models.IntegerField('主库端口', default=3306) - master_user = models.CharField('登录主库的用户名', max_length=50) - master_password = models.CharField('登录主库的密码', max_length=50) + master_user = models.CharField('登录主库的用户名', max_length=100) + master_password = models.CharField('登录主库的密码', max_length=300) create_time = models.DateTimeField('创建时间', auto_now_add=True) update_time = models.DateTimeField('更新时间', auto_now=True)