Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
lesson_34
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Владислав Андреев
lesson_34
Commits
457bc91f
Commit
457bc91f
authored
Jun 30, 2021
by
Владислав Андреев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asdfasdf
parent
8b95034d
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
0 deletions
+57
-0
0004_genre.py
article/migrations/0004_genre.py
+20
-0
0005_genre_description.py
article/migrations/0005_genre_description.py
+18
-0
0006_alter_genre_description.py
article/migrations/0006_alter_genre_description.py
+18
-0
models.py
article/models.py
+1
-0
No files found.
article/migrations/0004_genre.py
0 → 100644
View file @
457bc91f
# Generated by Django 3.2.4 on 2021-06-28 15:05
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'article'
,
'0003_auto_20210624_2001'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Genre'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
max_length
=
50
,
verbose_name
=
'Название'
)),
],
),
]
article/migrations/0005_genre_description.py
0 → 100644
View file @
457bc91f
# Generated by Django 3.2.4 on 2021-06-28 15:08
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'article'
,
'0004_genre'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'genre'
,
name
=
'description'
,
field
=
models
.
CharField
(
default
=
'описание'
,
max_length
=
100
,
verbose_name
=
'Описание'
),
),
]
article/migrations/0006_alter_genre_description.py
0 → 100644
View file @
457bc91f
# Generated by Django 3.2.4 on 2021-06-30 08:02
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'article'
,
'0005_genre_description'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'genre'
,
name
=
'description'
,
field
=
models
.
CharField
(
max_length
=
100
,
verbose_name
=
'Описание'
),
),
]
article/models.py
View file @
457bc91f
...
...
@@ -8,6 +8,7 @@ class Author(models.Model):
def
__str__
(
self
):
return
f
"{self.name} {self.last_name}"
class
Article
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
100
,
null
=
False
,
blank
=
False
,
verbose_name
=
'Название'
)
content
=
models
.
TextField
(
max_length
=
3000
,
null
=
False
,
blank
=
False
,
verbose_name
=
'Тело'
)
...
...
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