Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_father when can i be on my own i have the hello world to see
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
father when can i be on my own i have the hello world to see
widget_father when can i be on my own i have the hello world to see
Commits
6d0d3258
Commit
6d0d3258
authored
May 19, 2022
by
Charles Lim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added image field to announcement model
parent
3736d8fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
0004_announcement_announcement_pic.py
...nt_board/migrations/0004_announcement_announcement_pic.py
+18
-0
models.py
announcement_board/models.py
+2
-0
No files found.
announcement_board/migrations/0004_announcement_announcement_pic.py
0 → 100644
View file @
6d0d3258
# Generated by Django 4.0.4 on 2022-05-19 14:16
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'announcement_board'
,
'0003_alter_announcement_pub_date'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'announcement'
,
name
=
'announcement_pic'
,
field
=
models
.
FileField
(
blank
=
True
,
null
=
True
,
upload_to
=
'uploads'
),
),
]
announcement_board/models.py
View file @
6d0d3258
...
...
@@ -6,6 +6,8 @@ class Announcement(models.Model):
announcement_body
=
models
.
TextField
(
blank
=
True
)
pub_date
=
models
.
DateField
(
"date published"
)
author
=
models
.
ForeignKey
(
WidgetUser
,
on_delete
=
models
.
CASCADE
,
default
=
1
)
announcement_pic
=
models
.
FileField
(
upload_to
=
"uploads"
,
null
=
True
,
blank
=
True
)
def
__str__
(
self
):
return
self
.
announcement_title
...
...
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