Class based views #104
Labels
No Label
backlog
bug
duplicate
enhancement
feature
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
in discussion
invalid
priority
1
priority
2
priority
3
priority
4
priority
5
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: IT-Naturschutz/konova#104
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Status quo
The project is based on ye good ol fashioned method based views, which is fine and works properly.
However, we surely could reduce the size of our code base by switching to class based views.
Improvement
Refactor views from method based to class based, including all advantages class inheritance provides!
Our
BaseModalForm
provides a methodprocess_request()
which handlesGET
as wekk asPOST
requests. This is handy in case of function based view structure, where the handling ofGET
andPOST
does not need to be placed inside the view logic.However, to be able to support class based views on routes where
BaseModalForm
derivatives are used, the abstract class view will call the same logic onget()
as onpost()
to ensure the same behaviour as previously on function based views.This might look strange, but is an effective way to support the refactoring without touching existing logic on
BaseModalForm
.Merged in #200