Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cdd0662c
authored
Jun 04, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: edit user preferences
parent
33262020
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletions
+4
-1
circle/dashboard/templates/dashboard/profile.html
+1
-0
circle/dashboard/urls.py
+2
-0
circle/dashboard/views.py
+1
-1
No files found.
circle/dashboard/templates/dashboard/profile.html
View file @
cdd0662c
...
...
@@ -34,6 +34,7 @@
{%
if
profile
.
profile
.
use_gravatar
%}
checked=
"checked"
{%
endif
%}
type=
"checkbox"
/>
<a
href=
"https://gravatar.com"
>
What's Gravatar?
</a>
</p>
<a
href=
"{% url "
dashboard
.
views
.
profile-preferences
"
%}"
>
Change password or language
</a>
{% endif %}
</div>
<div
class=
"clearfix"
></div>
...
...
circle/dashboard/urls.py
View file @
cdd0662c
...
...
@@ -133,6 +133,8 @@ urlpatterns = patterns(
url
(
r'^interface/(?P<pk>\d+)/delete/$'
,
InterfaceDeleteView
.
as_view
(),
name
=
"dashboard.views.interface-delete"
),
url
(
r'^profile/$'
,
MyPreferencesView
.
as_view
(),
name
=
"dashboard.views.profile-preferences"
),
url
(
r'^profile/(?P<pk>\d+)/$'
,
ProfileView
.
as_view
(),
name
=
"dashboard.views.profile"
),
url
(
r'^profile/(?P<pk>\d+)/use_gravatar/$'
,
toggle_use_gravatar
),
...
...
circle/dashboard/views.py
View file @
cdd0662c
...
...
@@ -2462,7 +2462,7 @@ class MyPreferencesView(UpdateView):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
self
.
ojbect
=
self
.
get_object
()
redirect_response
=
HttpResponseRedirect
(
reverse
(
"dashboard.views.profile"
))
reverse
(
"dashboard.views.profile
-preferences
"
))
if
"preferred_language"
in
request
.
POST
:
form
=
MyProfileForm
(
request
.
POST
,
instance
=
self
.
get_object
())
if
form
.
is_valid
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment