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
dfc29402
Commit
dfc29402
authored
Apr 13, 2024
by
Ciella Francisco
😵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified html templates and models to enable URL redirectin for adding and editing events
parent
ab78e69f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
0 deletions
+5
-0
models.py
redbrickboard/event_management/models.py
+3
-0
event-details.html
..._management/templates/event_management/event-details.html
+1
-0
event-list.html
...ent_management/templates/event_management/event-list.html
+1
-0
No files found.
redbrickboard/event_management/models.py
View file @
dfc29402
...
@@ -21,6 +21,9 @@ class Event(models.Model):
...
@@ -21,6 +21,9 @@ class Event(models.Model):
def
get_absolute_url
(
self
):
def
get_absolute_url
(
self
):
return
reverse
(
'event_management:event-details'
,
kwargs
=
{
'pk'
:
self
.
pk
})
return
reverse
(
'event_management:event-details'
,
kwargs
=
{
'pk'
:
self
.
pk
})
def
get_update_url
(
self
):
return
reverse
(
'event_management:event-update'
,
kwargs
=
{
'pk'
:
self
.
pk
})
# def save(self, *args, **kwargs):
# def save(self, *args, **kwargs):
# if self.event_datetime_end is None:
# if self.event_datetime_end is None:
...
...
redbrickboard/event_management/templates/event_management/event-details.html
View file @
dfc29402
...
@@ -12,4 +12,5 @@
...
@@ -12,4 +12,5 @@
{% for promo in object.promos.all %}
{% for promo in object.promos.all %}
<img
src=
"{{ promo.img.url }}"
/>
<img
src=
"{{ promo.img.url }}"
/>
{% endfor %}
{% endfor %}
<button
type=
"button"
onclick=
"location.href='{{ event.get_update_url }}'"
>
Update
</button>
{% endblock %}
{% endblock %}
redbrickboard/event_management/templates/event_management/event-list.html
View file @
dfc29402
...
@@ -13,4 +13,5 @@
...
@@ -13,4 +13,5 @@
</ul>
</ul>
{% endfor %}
{% endfor %}
</ul>
</ul>
<button
type=
"button"
onclick=
"location.href='/events/add/'"
>
Add Event
</button>
{% endblock %}
{% endblock %}
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