Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_quintupoltrobol
Project
Project
Details
Activity
Releases
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
Matthew Karl David P. Arpas
midterm_quintupoltrobol
Commits
61400199
Commit
61400199
authored
Mar 05, 2023
by
karin-kurusu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created models ForumPost and Reply and performed migrations
parent
403ae6f1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
0 deletions
+73
-0
0002_alter_reaction_name.py
...obol/announcements/migrations/0002_alter_reaction_name.py
+18
-0
0002_alter_reaction_name.cpython-310.pyc
...ions/__pycache__/0002_alter_reaction_name.cpython-310.pyc
+0
-0
db.sqlite3
widget_quintupoltrobol/db.sqlite3
+0
-0
models.cpython-310.pyc
..._quintupoltrobol/forum/__pycache__/models.cpython-310.pyc
+0
-0
0001_initial.py
widget_quintupoltrobol/forum/migrations/0001_initial.py
+36
-0
0001_initial.cpython-310.pyc
...forum/migrations/__pycache__/0001_initial.cpython-310.pyc
+0
-0
models.py
widget_quintupoltrobol/forum/models.py
+19
-0
No files found.
widget_quintupoltrobol/announcements/migrations/0002_alter_reaction_name.py
0 → 100644
View file @
61400199
# Generated by Django 4.1.7 on 2023-03-05 19:50
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'announcements'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'reaction'
,
name
=
'name'
,
field
=
models
.
CharField
(
choices
=
[(
'Like'
,
'Like'
),
(
'Love'
,
'Love'
),
(
'Angry'
,
'Angry'
)],
max_length
=
5
),
),
]
widget_quintupoltrobol/announcements/migrations/__pycache__/0002_alter_reaction_name.cpython-310.pyc
0 → 100644
View file @
61400199
File added
widget_quintupoltrobol/db.sqlite3
View file @
61400199
No preview for this file type
widget_quintupoltrobol/forum/__pycache__/models.cpython-310.pyc
View file @
61400199
No preview for this file type
widget_quintupoltrobol/forum/migrations/0001_initial.py
0 → 100644
View file @
61400199
# Generated by Django 4.1.7 on 2023-03-05 19:50
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
(
'dashboard'
,
'0001_initial'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'ForumPost'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'title'
,
models
.
CharField
(
max_length
=
100
)),
(
'body'
,
models
.
TextField
()),
(
'pub_datetime'
,
models
.
DateTimeField
()),
(
'author'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'dashboard.widgetuser'
)),
],
),
migrations
.
CreateModel
(
name
=
'Reply'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'body'
,
models
.
TextField
()),
(
'pub_datetime'
,
models
.
DateTimeField
()),
(
'author'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'dashboard.widgetuser'
)),
(
'forumpost'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'forum.forumpost'
)),
],
),
]
widget_quintupoltrobol/forum/migrations/__pycache__/0001_initial.cpython-310.pyc
0 → 100644
View file @
61400199
File added
widget_quintupoltrobol/forum/models.py
View file @
61400199
from
django.db
import
models
from
dashboard.models
import
WidgetUser
class
ForumPost
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
100
)
body
=
models
.
TextField
()
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
)
pub_datetime
=
models
.
DateTimeField
()
def
__str__
(
self
):
return
self
.
title
class
Reply
(
models
.
Model
):
body
=
models
.
TextField
()
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
)
pub_datetime
=
models
.
DateTimeField
()
forumpost
=
models
.
ForeignKey
(
ForumPost
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
return
self
.
body
# Create your models here.
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