Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Castellum
castellum_scheduler
Commits
c556a8a2
Commit
c556a8a2
authored
Feb 22, 2021
by
Hayat
Committed by
Bengfort
Mar 02, 2021
Browse files
add uuid field to schedule
parent
ef50e5c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
scheduler/main/migrations/0002_schedule_uuid.py
0 → 100644
View file @
c556a8a2
# Generated by Django 3.1.6 on 2021-02-22 14:39
from
django.db
import
migrations
,
models
import
uuid
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'main'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'schedule'
,
name
=
'uuid'
,
field
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
unique
=
True
),
),
]
scheduler/main/models.py
View file @
c556a8a2
...
...
@@ -17,6 +17,7 @@
# <http://www.gnu.org/licenses/>.
import
datetime
import
uuid
from
django.db
import
models
from
django.utils
import
formats
...
...
@@ -24,6 +25,7 @@ from django.utils.translation import gettext_lazy as _
class
Schedule
(
models
.
Model
):
uuid
=
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
unique
=
True
,
editable
=
False
)
title
=
models
.
CharField
(
_
(
'Title'
),
max_length
=
254
)
def
__str__
(
self
):
...
...
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