e50dc7a9d4
fix: remove token parameter from download_scale_results endpoint
...
- Updated the download_scale_results function to eliminate the token parameter, simplifying the endpoint's signature.
- This change enhances clarity and aligns with the current requirements for accessing scale results.
2025-06-16 10:23:44 +08:00
319844e55c
feat: add CSV download endpoint for scale results
...
- Implemented a new endpoint to download scale results as a CSV file.
- The endpoint retrieves responses based on the scale ID and formats the data, including question IDs and subscale scores, into a CSV format.
- Updated database URL to remove the public directory reference for better file access.
2025-06-16 10:19:52 +08:00
d99d7f7c12
fix: correct public file path handling in get_public_file function
...
- Moved the public_path assignment to ensure it is set before checking for the file's existence.
- This change resolves potential issues when accessing files in the public directory.
2025-06-16 09:32:23 +08:00
fc9d439cf9
feat: add created_at timestamp to ScaleResult model and response handling
...
- Introduced created_at field in the ScaleResult model to track response creation time.
- Updated result handling logic in app.py to populate created_at with the current UTC time when saving responses.
2025-06-16 09:08:21 +08:00
90720b3cec
refactor: rename RawResponse to ScaleResult for improved clarity
...
- Updated the database model from RawResponse to ScaleResult to better reflect its purpose.
- Adjusted the result handling logic in app.py to utilize the new ScaleResult model for storing user responses.
2025-06-16 06:50:25 +08:00
ce020a5674
refactor: update response model and location handling
...
- Renamed RawResponse model to Response for clarity.
- Changed location field type from String to JSON in the Response model.
- Updated result handling logic to store location as a JSON object instead of a string.
2025-06-16 06:47:40 +08:00
7cb36eb1af
fix: update database URL to point to public directory
...
- Changed the SQLALCHEMY_DATABASE_URL to use the public directory for the SQLite database file, ensuring proper access and organization of database resources.
2025-06-16 06:39:49 +08:00
e3b3b5a1f6
feat: 添加异常处理以增强数据库保存逻辑
...
- 在结果处理逻辑中添加try-except块,以捕获保存用户响应到数据库时的异常
- 确保在发生错误时能够打印异常信息,提升系统的稳定性和可调试性
2025-06-16 06:29:46 +08:00
ee9e6a5cca
feat: 增强IP地址记录功能以支持地理位置获取
...
- 在app.py中新增GeoIP2数据库支持,获取用户IP的地理位置信息
- 更新RawResponse模型,新增location、raw_response、sum_response和avg_response字段以存储更多用户响应数据
- 修改结果处理逻辑,保存用户的地理位置信息和响应数据
- 更新.gitignore以排除GeoLite2-City.mmdb文件
2025-06-16 06:13:11 +08:00
e08909eacd
feat: 更新IP地址记录逻辑以支持代理头
...
- 修改结果处理逻辑以获取真实IP地址,考虑代理头的影响
- 更新RawResponse模型中的ip_address字段以保存用户的真实IP
2025-06-16 05:33:40 +08:00
ff44ce6264
feat: 增加IP地址记录功能以保存用户响应
...
- 在RawResponse模型中新增ip_address字段
- 更新结果处理逻辑以记录用户的IP地址
2025-06-16 05:27:45 +08:00
7989c8ed4e
feat: 添加数据库支持以保存问卷响应
...
- 新增数据库模型和连接配置,使用SQLite存储问卷响应
- 更新结果处理逻辑,将用户响应保存到数据库
- 更新.gitignore以排除数据库文件和缓存目录
2025-06-16 05:17:49 +08:00
8117d7e669
docs: 更新开源地址链接以反映新的项目位置
2025-06-16 04:30:40 +08:00
133dfc3fca
fix: update robots.txt to include sitemap directive
2025-06-16 04:24:35 +08:00
6e49fadbab
feat: 添加网站地图生成功能并优化公共文件访问
...
- 新增生成sitemap.xml的功能,包含静态和动态路由
- 优化公共文件访问接口,支持直接返回sitemap.xml
2025-06-16 04:15:44 +08:00
345c571dda
feat: 增加公共文件访问功能并添加favicon和robots.txt
...
- 新增公共文件访问接口,允许从public目录获取文件
- 添加favicon.ico以改善网站标识
- 新增robots.txt以指导搜索引擎爬虫行为
2025-06-16 03:50:28 +08:00
73f419f1aa
Delete scales/English/Symptom Checklist-90 (SCL90).yml
2025-06-15 19:24:18 +00:00
df77a10735
添加均分计算
2025-05-17 20:03:45 +08:00
0d62ef66e6
Ignore scale path
2025-05-17 19:16:29 +08:00
mxr612
ca37b9758b
docs: 更新页面标题以反映品牌名称和动态内容
...
更新了 `index.html` 中的标题为 "心尺.Org",以更准确地反映品牌名称。同时,将 `list.html` 中的标题改为动态显示 `{{ tag }}`,以便根据页面内容动态调整标题。
2025-04-26 21:44:04 +08:00
mxr612
88d046d9cc
docs: 将“心尺”统一更新为“心尺.Org”
...
将README.md和base.html中的“心尺”统一更新为“心尺.Org”,以确保品牌名称的一致性。
2025-04-26 21:31:57 +08:00
mxr612
0a6e38b7e3
docs: 更新页面标题为“心尺”
...
将页面标题从“心尺 PsychoScales”简化为“心尺”,以保持简洁性和一致性。
2025-04-26 21:21:30 +08:00
mxr612
6b41b8e096
refactor: 重构标签处理和界面文本
...
- 删除tagmap.yml文件,简化标签处理逻辑
- 将标签存储方式从字典改为列表,减少复杂性
- 更新界面文本,将"PsychoScales"替换为"心尺"
- 修改README.md中的项目描述,使其更简洁清晰
2025-04-26 20:44:29 +08:00
mxr612
72db5c8b83
feat: 新增中庸实践思维量表和SCL90量表
...
新增中文版中庸实践思维量表和英文版SCL90量表,用于心理评估。同时优化了加载问卷数据的逻辑,支持递归遍历文件夹以加载所有问卷文件。
2025-04-22 21:19:22 +08:00
mxr612
c4efd778a9
style: 调整CSS样式和HTML模板格式
...
- 修改`styles.css`中的`input[type="submit"]`样式,增加宽度并调整边距
- 修复`scale.html`中的拼写错误,将`lable`改为`label`
- 更新`base.html`的meta描述和关键词,优化SEO
- 调整HTML模板中的格式和缩进,提高代码可读性
2025-04-22 21:09:49 +08:00
mxr612
74931a5161
更新了base中的js放置和meta信息
2025-03-15 21:37:54 +08:00
mxr612
7fe421368e
说明、样式和一点优化
2025-03-15 20:35:33 +08:00
mxr612
74546fc2fb
更改了两处量表配置命名,优化了一处css
2025-03-14 23:52:54 +08:00
mxr612
4fc9660f8b
修复了量表计算逻辑,修复了量表required提示
2025-03-10 12:48:42 +00:00
mxr612
7e85847a41
更改了item range的标注方式,为PSAI作准备。
2025-03-10 06:37:20 +00:00
mxr612
a6e1b4bee8
优化了提交按钮样式
2025-03-09 14:36:22 +00:00
mxr612
5c12a8e885
优化了移动端样式和提交按钮
2025-03-09 14:22:01 +00:00
mxr612
e90daedb48
修复了list页html safe
2025-03-09 10:43:52 +00:00
mxr612
f817765913
优化了list页面样式
2025-03-09 10:38:10 +00:00
mxr612
e2199cfe5a
导航栏适配了移动设备
2025-03-09 09:53:06 +00:00
mxr612
fa2c0af4ec
优化了提交按钮样式,修复了结果页标题
2025-03-09 03:39:10 +00:00
mxr612
dafb591001
优化了量表按钮的样式
2025-03-09 02:10:23 +00:00
mxr612
b835237787
改善了量表按钮的弹性
2025-03-08 15:47:57 +00:00
mxr612
4a99a7b9d1
将tag目录置为/tag/{tag},避免与其他目录冲突。
2025-03-08 07:55:25 +00:00
mxr612
441768dab0
使用了html模板;增加了导航栏;将lang改为看起来更加通用的tag
2025-03-07 12:47:41 +00:00
mxr612
4954abfca4
增加了首页语言分类及语言二级菜单,美化了结果路径,添加了内容层级及content居中
2025-03-07 03:54:04 +00:00
mxr612
1e4470650a
增加了浮动abstract和一个量表
2025-03-06 09:26:21 +00:00
49c6bf11a0
Update README.md
2025-03-06 07:08:48 +00:00
2dbcb69fcb
修复了一处量表错误
2025-03-06 05:38:02 +00:00
mxr612
22c222813b
完善了样例量表,增加了描述中数学公式的支持。
2025-03-05 11:49:52 +00:00
mxr612
9356c13339
替换json为yml加载,简化了编辑。同时优化了数据结构
2025-03-05 10:08:57 +00:00
mxr612
819e773342
优化了按钮数字居中
2025-03-05 08:26:27 +00:00
mxr612
df675505d9
更换url风格,修复了https下的表单提交报错
2025-03-05 08:17:36 +00:00
mxr612
e1f804fbef
通过写死Static路径改善https适配
2025-03-05 07:27:04 +00:00
mxr612
f2011039be
优化了CSS:表单选项尺寸和在移动设备上的表现
2025-03-05 04:08:00 +00:00