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
c645e472
Commit
c645e472
authored
Apr 12, 2024
by
Ciella Francisco
😵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified and removed unnecessary blocks of code in CreateView within event_management views.py
parent
b804aa8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
views.py
redbrickboard/event_management/views.py
+2
-15
No files found.
redbrickboard/event_management/views.py
View file @
c645e472
...
...
@@ -19,21 +19,8 @@ class EventListView(ListView):
class
EventCreateView
(
CreateView
):
model
=
Event
fields
=
'__all__'
def
get_context_data
(
self
,
**
kwargs
:
Any
)
->
dict
[
str
,
Any
]:
context
=
super
()
.
get_context_data
(
**
kwargs
)
context
[
'form'
]
=
EventForm
()
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
form
=
EventForm
(
request
.
POST
)
if
form
.
is_valid
():
return
self
.
get
(
request
,
*
args
,
**
kwargs
)
else
:
return
render
(
request
,
self
.
template_name
,
{
'form'
:
form
})
form_class
=
EventForm
success_url
=
'/events/'
template_name
=
'event_management/event-form.html'
class
EventUpdateView
(
UpdateView
):
...
...
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