Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_django unchained
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
1
Merge Requests
1
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
Jose Emmanuel B. Laurel
widget_django unchained
Commits
da3fa767
Commit
da3fa767
authored
Apr 06, 2022
by
Joshua Son
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: added author to announcement
parent
e6ceea29
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
1 deletion
+42
-1
models.cpython-39.pyc
...unchained/announcements/__pycache__/models.cpython-39.pyc
+0
-0
0015_announcement_author.py
...ined/announcements/migrations/0015_announcement_author.py
+20
-0
0016_alter_announcement_author.py
...nnouncements/migrations/0016_alter_announcement_author.py
+20
-0
0015_announcement_author.cpython-39.pyc
...tions/__pycache__/0015_announcement_author.cpython-39.pyc
+0
-0
0016_alter_announcement_author.cpython-39.pyc
...__pycache__/0016_alter_announcement_author.cpython-39.pyc
+0
-0
models.py
widget_django_unchained/announcements/models.py
+1
-0
announcement_board.html
...unchained/announcements/templates/announcement_board.html
+1
-1
db.sqlite3
widget_django_unchained/db.sqlite3
+0
-0
No files found.
widget_django_unchained/announcements/__pycache__/models.cpython-39.pyc
View file @
da3fa767
No preview for this file type
widget_django_unchained/announcements/migrations/0015_announcement_author.py
0 → 100644
View file @
da3fa767
# Generated by Django 3.2.12 on 2022-04-06 05:00
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0003_rename_id_name_widgetuser_id_num'
),
(
'announcements'
,
'0014_alter_reaction_reaction_self'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'announcement'
,
name
=
'author'
,
field
=
models
.
ForeignKey
(
blank
=
True
,
default
=
1
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.widgetuser'
),
),
]
widget_django_unchained/announcements/migrations/0016_alter_announcement_author.py
0 → 100644
View file @
da3fa767
# Generated by Django 3.2.12 on 2022-04-06 05:01
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0003_rename_id_name_widgetuser_id_num'
),
(
'announcements'
,
'0015_announcement_author'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'announcement'
,
name
=
'author'
,
field
=
models
.
ForeignKey
(
blank
=
True
,
default
=
1
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.widgetuser'
),
),
]
widget_django_unchained/announcements/migrations/__pycache__/0015_announcement_author.cpython-39.pyc
0 → 100644
View file @
da3fa767
File added
widget_django_unchained/announcements/migrations/__pycache__/0016_alter_announcement_author.cpython-39.pyc
0 → 100644
View file @
da3fa767
File added
widget_django_unchained/announcements/models.py
View file @
da3fa767
...
@@ -3,6 +3,7 @@ from django.db import models
...
@@ -3,6 +3,7 @@ from django.db import models
# Create your models here.
# Create your models here.
class
Announcement
(
models
.
Model
):
class
Announcement
(
models
.
Model
):
author
=
models
.
ForeignKey
(
'homepage.WidgetUser'
,
on_delete
=
models
.
CASCADE
,
blank
=
True
,
default
=
1
)
announcement_title
=
models
.
CharField
(
max_length
=
50
)
announcement_title
=
models
.
CharField
(
max_length
=
50
)
announcement_body
=
models
.
CharField
(
max_length
=
500
)
announcement_body
=
models
.
CharField
(
max_length
=
500
)
pub_date
=
models
.
DateTimeField
(
"date published"
)
pub_date
=
models
.
DateTimeField
(
"date published"
)
...
...
widget_django_unchained/announcements/templates/announcement_board.html
View file @
da3fa767
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<h2>
ANNOUNCEMENTS:
</h2>
<h2>
ANNOUNCEMENTS:
</h2>
{% for announcement in announcements%}
{% for announcement in announcements%}
<p><b>
{{announcement.announcement_title}}
</b>
dated {{announcement.pub_date}}
</p>
<p><b>
{{announcement.announcement_title}}
</b>
by {{announcement.author}}
dated {{announcement.pub_date}}
</p>
<p>
{{announcement.announcement_body}}
</p>
<p>
{{announcement.announcement_body}}
</p>
...
...
widget_django_unchained/db.sqlite3
View file @
da3fa767
No preview for this file type
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