Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
SFB 1288 - INF
nopaque
Commits
175dbcea
Commit
175dbcea
authored
5 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Add creation and registration dates.
parent
5a67164d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models.py
+4
-0
4 additions, 0 deletions
app/models.py
with
4 additions
and
0 deletions
app/models.py
+
4
−
0
View file @
175dbcea
...
...
@@ -4,6 +4,7 @@ from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from
werkzeug.security
import
generate_password_hash
,
check_password_hash
from
.
import
db
from
.
import
login_manager
from
datetime
import
datetime
class
Permission
:
...
...
@@ -106,6 +107,7 @@ class User(UserMixin, db.Model):
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
confirmed
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
registration_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
email
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
,
index
=
True
)
password_hash
=
db
.
Column
(
db
.
String
(
128
))
role_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
'
roles.id
'
))
...
...
@@ -203,6 +205,7 @@ class AnonymousUser(AnonymousUserMixin):
"""
Model replaces the default AnonymousUser.
"""
def
can
(
self
,
permissions
):
return
False
...
...
@@ -217,6 +220,7 @@ class Job(db.Model):
__tablename__
=
'
jobs
'
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
creation_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
description
=
db
.
Column
(
db
.
String
(
64
))
'''
'
Requested ressources.
...
...
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