Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
RECIRCLE
/
portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
11
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2b3bf428
authored
Jul 03, 2019
by
Bodor Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create template model and install falke8
parent
415ba749
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
Pipfile
+1
-0
Pipfile.lock
+0
-0
recircle/template/models.py
+30
-4
No files found.
Pipfile
View file @
2b3bf428
...
...
@@ -6,6 +6,7 @@ verify_ssl = true
[dev-packages]
httpie = "*"
django-rest-swagger = "*"
flake8 = "*"
[packages]
django = "*"
...
...
Pipfile.lock
View file @
2b3bf428
This diff is collapsed.
Click to expand it.
recircle/template/models.py
View file @
2b3bf428
from
django.db
import
models
from
images.models
import
Disk
class
InstanceTemplate
:
class
BaseTemplate
(
models
.
Model
):
"""Virtual machine template.
"""
...
...
@@ -9,15 +11,39 @@ class InstanceTemplate:
name
=
models
.
CharField
(
max_length
=
100
,
verbose_name
=
"name"
,
help_text
=
"Human readable name of template."
,
help_text
=
"Human readable name of template."
)
description
=
models
.
TextField
(
verbose_name
=
"description"
,
blank
=
True
,
help_text
=
"Description of the template."
verbose_name
=
"description"
,
blank
=
True
,
help_text
=
"Description of the template."
)
# owner = models.ForeignKey(User)
remote_ID
=
models
.
CharField
(
max_length
=
40
,
unique
=
True
,
verbose_name
=
"remote_ID"
,
help_text
=
"ID, which helps access the template."
,
help_text
=
"ID, which helps access the template."
)
created_at
=
models
.
DateTimeField
(
auto_now_add
=
True
,
editable
=
False
,
help_text
=
"Date, when the template created."
)
class
Template
(
BaseTemplate
):
disk
=
models
.
ForeignKey
(
Disk
,
related_name
=
"templates"
,
on_delete
=
models
.
CASCADE
,
help_text
=
"The disk where the template is located."
)
# class PureTemplate(BaseTemplate):
# images = modesl.ForeignKey(
# Image,
# related_name="templates",
# on_delete=models.CASCADE
# )
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