Browse Source

字段加长

master
燕鹏 3 years ago
parent
commit
a62d77195d
  1. 7
      .vscode/settings.json
  2. 9
      README.md
  3. 2
      py_vislib/settings/local.py
  4. 3
      requirements.txt
  5. 4
      vislib/models.py
  6. 2
      vislib/views/source.py

7
.vscode/settings.json

@ -1,7 +0,0 @@
{
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": [
"--disable=C0103",
"--disable=C0111"
]
}

9
README.md

@ -2,3 +2,12 @@
Back end of [vue-data-board](https://github.com/dongsuo/vue-data-board).
## [Document](https://docs.v11nlab.com)
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
- mysql安装失败手动下载https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
python manage.py migrate --settings=py_vislib.settings.local
python manage.py runserver --settings=py_vislib.settings.local

2
py_vislib/settings/local.py

@ -8,7 +8,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'vislib',
'USER': 'root',
'PASSWORD': '123456xxf',
'PASSWORD': 'yasaka',
'HOST': 'localhost',
'PORT': '3306',
}

3
requirements.txt

@ -1,4 +1,5 @@
Django==3.0.4
pycryptodome==3.9.8
django-cors-headers==3.2.1
mysqlclient==1.3.13
mysqlclient==1.4.6
#dm==1.3

4
vislib/models.py

@ -22,8 +22,8 @@ class SourceDataBase(models.Model):
class SourceDataTable(models.Model):
database = models.ForeignKey(SourceDataBase, on_delete=models.CASCADE)
table = models.CharField(max_length=32)
table_alias = models.CharField(max_length=32)
table = models.CharField(max_length=256)
table_alias = models.CharField(max_length=256)
status = models.IntegerField(default=1)
creator = models.ForeignKey(User, on_delete=models.CASCADE)
id = models.CharField(max_length=64, primary_key=True)

2
vislib/views/source.py

@ -151,7 +151,7 @@ def sourceTableSave(request):
id=uuid.uuid4(),
database=source,
table=table['table'],
table_alias=table['table_alias'],
# table_alias=table['table_alias'],
creator=request.user,
status=table['status'],
updated_at=default_datetime()

Loading…
Cancel
Save