Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Hiboo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACIDES
Hiboo
Commits
bb89d429
Commit
bb89d429
authored
4 years ago
by
kaiyou
Browse files
Options
Downloads
Patches
Plain Diff
List user contact info in details page
parent
066c7d8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hiboo/account/settings.py
+5
-1
5 additions, 1 deletion
hiboo/account/settings.py
hiboo/user/templates/user_details.html
+5
-0
5 additions, 0 deletions
hiboo/user/templates/user_details.html
with
10 additions
and
1 deletion
hiboo/account/settings.py
+
5
−
1
View file @
bb89d429
from
hiboo.account
import
blueprint
,
forms
from
hiboo
import
models
,
security
from
wtforms
import
fields
from
flask_babel
import
lazy_gettext
as
_
import
flask
...
...
@@ -30,7 +31,10 @@ def contact():
user
=
flask_login
.
current_user
form
=
forms
.
ContactForm
()
if
form
.
validate_on_submit
():
user
.
contact
=
form
.
data
user
.
contact
=
{
field
.
name
:
form
.
data
[
field
.
name
]
for
field
in
form
if
type
(
field
)
is
fields
.
StringField
}
models
.
db
.
session
.
add
(
user
)
models
.
db
.
session
.
commit
()
flask
.
flash
(
_
(
"
Successfully updated your contact info
"
),
"
success
"
)
...
...
This diff is collapsed.
Click to expand it.
hiboo/user/templates/user_details.html
+
5
−
0
View file @
bb89d429
...
...
@@ -17,6 +17,11 @@
<dt>
{% trans %}Created at{% endtrans %}
</dt>
<dd>
{{ user.created_at }}
</dd>
{% for name, value in user.contact.items() %}
<dt>
{{ name | capitalize }}
</dt>
<dd>
{{ value }}
</dd>
{% endfor %}
</dl>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment