Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6d5b7363
authored
Feb 05, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add Profile model
Closes #43
parent
472b00ed
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
circle/dashboard/migrations/0002_auto__add_profile.py
+0
-0
circle/dashboard/models.py
+14
-1
No files found.
circle/dashboard/migrations/0002_auto__add_profile.py
0 → 100644
View file @
6d5b7363
This diff is collapsed.
Click to expand it.
circle/dashboard/models.py
View file @
6d5b7363
from
django.conf
import
settings
from
django.contrib.auth.models
import
User
from
django.db.models
import
Model
,
ForeignKey
from
django.db.models
import
Model
,
ForeignKey
,
OneToOneField
,
CharField
from
django.utils.translation
import
ugettext_lazy
as
_
from
vm.models
import
Instance
...
...
@@ -7,3 +9,14 @@ from vm.models import Instance
class
Favourite
(
Model
):
instance
=
ForeignKey
(
Instance
)
user
=
ForeignKey
(
User
)
class
Profile
(
Model
):
user
=
OneToOneField
(
User
)
preferred_language
=
CharField
(
verbose_name
=
_
(
'preferred language'
),
choices
=
settings
.
LANGUAGES
,
max_length
=
32
,
default
=
settings
.
LANGUAGE_CODE
,
blank
=
False
)
org_id
=
CharField
(
# may be populated from eduPersonOrgId field
unique
=
True
,
blank
=
True
,
null
=
True
,
max_length
=
64
,
help_text
=
_
(
'Unique identifier of the person, e.g. a student number.'
))
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