Skip to content

Commit

Permalink
20230602_readme_pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
LawrenceLiu023 committed Jun 2, 2023
1 parent e7bd2ec commit 5c13007
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# README

![GDAD_home_pc.png](/assets/img/GDAD%E4%B8%BB%E9%A1%B5_%E6%A1%8C%E9%9D%A2%E7%89%88.jpeg)
![GDAD_home_pc.png](assets\img\GDAD主页_桌面版.jpeg)

本目录为疾病相关G-四链体数据库G4-Disease Association Database (GDAD)的目录,本文档说明了GDAD的开发环境以及设计框架等信息。

Expand Down Expand Up @@ -224,6 +224,10 @@ GDAD包含3个数据表:

`GDA`的数据通过使用[DisGeNET REST API](https://www.disgenet.org/api/),使用Python脚本从DisGeNET获取。条件为`GENE`数据表中的全部基因,数据来源限制为CURATED。

数据库实体-联系图:

![E-R.png](assets\img\ER图.png)

## 前端设计

设计主题蓝色:RGB:(0,123,255), HEX:#007bff
Expand All @@ -232,6 +236,10 @@ GDAD包含3个数据表:

交互类的部件推荐使用主题蓝色进行强调突出,非必要情况尽可能减少不同颜色的使用,提高整洁度。各个功能分区用简单的视觉划分进行提示,避免过多的线条。

网页模板加入了直接渲染Markdown文件的功能,数据库的说明文档网页即使用了此功能,效果如下。

![document.png](assets\img\document.png)

### 模板继承

使用html模板的继承功能,由于最基础的模板我放在了`mysite/gdad/templates/gdad/base.html`,所以继承时候,需要说明是在哪个应用的模板目录下的,代码范例如下:
Expand All @@ -249,10 +257,14 @@ GDAD包含3个数据表:
查询功能与文档中的`QuerySet`条目相关,可以在官方文档中查找各种查询功能的实现。
`QuerySet`搜索得到的结果,是一个类名为`QuerySet`的对象,基本可以认为是`Set`,它可以转换为列表,可以使用`len()`方法,可以用`[数字]`索引,而且其中的每一个元素是`models.py`中定义的一个类的实例。

![g4.png](assets\img\g4.png)

## 导出功能

表格可以一键点击选中全部,然后就可以复制到本地了。同时也使用了Bootstrap table的export扩展,加了一个按钮可以直接一键下载文件。

![g4_search.jpeg](assets\img\g4_search.jpeg)

## 数据导入

数通过自动化代码可以实现把原始文件自动转换为适合导入数据库的格式,然后可以导入MySQL数据库。自动化代码存放路径为`scripts/gdad_data_import.py`.
Expand Down Expand Up @@ -308,3 +320,14 @@ if api_key:
if s:
s.close()
```

## 入门帮助

各个软件工具的使用,上面已经附上了相关的官方文档链接,其中较重要的Django、Bootstrap均有官方中文文档,上手方便。在此对各种软件的使用帮助进一步整合。

|软件工具|帮助链接|
|:---:|:---|
|Bootstrap Table Export|<https://bootstrap-table.com/docs/extensions/export/>|
|Bootstrap|<https://v4.bootcss.com/>|
|Django|<https://docs.djangoproject.com/zh-hans/4.1/intro/tutorial01/>|
|Python|<https://docs.python.org/zh-cn/3/>|
Binary file added assets/img/ER图.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/GDAD主页_移动版.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/document.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/g4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/g4_search.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c13007

Please sign in to comment.