Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
4a960490
Commit
4a960490
authored
Mar 05, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply language changes immediatelly
parent
ab470a7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
accounts/views.py
accounts/views.py
+4
-0
No files found.
accounts/views.py
View file @
4a960490
...
@@ -6,6 +6,7 @@ from django.utils.translation import ugettext as _
...
@@ -6,6 +6,7 @@ from django.utils.translation import ugettext as _
from
django.http
import
HttpResponseRedirect
from
django.http
import
HttpResponseRedirect
from
django.core.mail
import
mail_admins
from
django.core.mail
import
mail_admins
from
accounts.models
import
set_lang
from
accounts.forms
import
ProfileForm
,
UserForm
,
ContactForm
from
accounts.forms
import
ProfileForm
,
UserForm
,
ContactForm
def
profile
(
request
):
def
profile
(
request
):
...
@@ -16,6 +17,9 @@ def profile(request):
...
@@ -16,6 +17,9 @@ def profile(request):
if
form
.
is_valid
()
and
userform
.
is_valid
():
if
form
.
is_valid
()
and
userform
.
is_valid
():
form
.
save
()
form
.
save
()
userform
.
save
()
userform
.
save
()
set_lang
(
request
.
user
,
request
=
request
,
user
=
request
.
user
)
# Need to redirect to allow language change
return
HttpResponseRedirect
(
'/accounts/profile/'
)
else
:
else
:
form
=
ProfileForm
(
instance
=
request
.
user
.
get_profile
())
form
=
ProfileForm
(
instance
=
request
.
user
.
get_profile
())
userform
=
UserForm
(
instance
=
request
.
user
)
userform
=
UserForm
(
instance
=
request
.
user
)
...
...
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