Add hierarchical geography and cloud-hosted profile images

This commit is contained in:
Codex
2026-10-04 21:30:30 +08:00
parent a77fcc6671
commit 427fd51e14
27 changed files with 618 additions and 50 deletions
+3
View File
@@ -1,4 +1,5 @@
"""A private family register, independent from login accounts and camera roles."""
import geography
import datetime as dt
import json
import secrets
@@ -186,6 +187,8 @@ class Family:
value = data.get(key, (old or {}).get(key, ''))
if not isinstance(value, str): raise a.Problem('地域信息须为文字')
item[key] = a.clean_text(value, 200 if field == 'Address' else 80)
for prefix in ('native', 'birth'):
geography.apply(item, data, old, a.clean_text, a.Problem, prefix)
for key in ('birthDate', 'deathDate'):
if item[key]:
try: