feat(accounts): 实现用户资料与认证页面

This commit is contained in:
bruce
2026-09-09 13:01:36 +08:00
parent f4a92699f0
commit 163d20f710
11 changed files with 177 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""用户资料表单。"""
from django import forms
from .models import UserProfile
TIMEZONE_CHOICES = [("Asia/Shanghai", "中国标准时间(上海)")]
class UserProfileForm(forms.ModelForm):
"""只暴露第一阶段允许用户自行修改的资料字段。"""
timezone = forms.ChoiceField(label="时区", choices=TIMEZONE_CHOICES)
class Meta:
model = UserProfile
fields = ("display_name", "timezone")