Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
287cedde
authored
Jun 13, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add language code when choosing a language
parent
863841c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
circle/dashboard/forms.py
+7
-0
No files found.
circle/dashboard/forms.py
View file @
287cedde
...
...
@@ -45,6 +45,12 @@ from vm.models import (
InstanceTemplate
,
Lease
,
InterfaceTemplate
,
Node
,
Trait
,
Instance
)
from
.models
import
Profile
,
GroupProfile
from
circle.settings.base
import
LANGUAGES
from
django.utils.translation
import
string_concat
LANGUAGES_WITH_CODE
=
((
l
[
0
],
string_concat
(
l
[
1
],
" ("
,
l
[
0
],
")"
))
for
l
in
LANGUAGES
)
class
VmSaveForm
(
forms
.
Form
):
...
...
@@ -1101,6 +1107,7 @@ class TraitForm(forms.ModelForm):
class
MyProfileForm
(
forms
.
ModelForm
):
preferred_language
=
forms
.
ChoiceField
(
LANGUAGES_WITH_CODE
)
class
Meta
:
fields
=
(
'preferred_language'
,
'email_notifications'
,
...
...
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