Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
red_brick_board
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
Ciella Francisco
red_brick_board
Commits
ce0cf129
Commit
ce0cf129
authored
Apr 13, 2024
by
Ciella Francisco
😵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited Promo model to accommodate changes for forms.py formset
parent
8c875a66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
models.py
redbrickboard/event_management/models.py
+12
-2
No files found.
redbrickboard/event_management/models.py
View file @
ce0cf129
...
...
@@ -30,8 +30,18 @@ class Event(models.Model):
# super(Event, self).save(*args, **kwargs)
class
Promo
(
models
.
Model
):
img
=
models
.
ImageField
(
upload_to
=
'images/'
,
height_field
=
None
,
width_field
=
None
,
max_length
=
100
,
blank
=
True
)
event_name
=
models
.
ForeignKey
(
Event
,
on_delete
=
models
.
CASCADE
)
event
=
models
.
ForeignKey
(
Event
,
related_name
=
"promos"
,
on_delete
=
models
.
CASCADE
,
null
=
True
)
img
=
ResizedImageField
(
quality
=
75
,
force_format
=
'WebP'
,
upload_to
=
'promos/'
)
def
__str__
(
self
):
return
self
.
event
.
event_name
def
get_absolute_url
(
self
):
return
reverse
(
'event_management:event-details'
,
kwargs
=
{
'pk'
:
self
.
pk
})
class
Comment
(
models
.
Model
):
event_comment
=
models
.
TextField
(
default
=
''
,
max_length
=
255
)
...
...
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