Refactor: Use class-based views #73

Closed
opened 2019-09-03 10:23:30 +02:00 by nik · 12 comments
Owner

Turn all views in all apps into class-based views: https://docs.djangoproject.com/en/3.0/topics/class-based-views/

  • Identify different views and which views are similar enough to turn into a base view class, with overrides either through as_view or through inheritance or mixins
  • If it makes sense across apps, create base view classes in AlekSIS core
  • Move reusable code out of the views into util in each app, or even in AlekSIS core
  • Turn all views in all apps into class-based views finally
Turn all views in all apps into class-based views: https://docs.djangoproject.com/en/3.0/topics/class-based-views/ * [ ] Identify different views and which views are similar enough to turn into a base view class, with overrides either through `as_view` or through inheritance or mixins * [ ] If it makes sense across apps, create base view classes in AlekSIS core * [ ] Move reusable code out of the views into `util` in each app, or even in AlekSIS core * [ ] Turn all views in all apps into class-based views finally
Author
Owner

assigned to @sstoffels and unassigned @nik

assigned to @sstoffels and unassigned @nik
Author
Owner

changed the description

changed the description
Author
Owner

@sstoffels Please give an update about the issues you took responsibility for.

@sstoffels Please give an update about the issues you took responsibility for.
sstoffels commented 2019-10-04 03:39:56 +02:00 (Migrated from edugit.org)

Invested 5 hours until now (2 for my initial test-installation, see merge-request concerning installation-hints)
First, I moved the most obvious views: "persons" and "groups" to classbased, first had to learn, that the usual ListViews cannot be used with render_table (when queryset is customized). Therefore, this documentation is helpful: https://django-tables2.readthedocs.io/en/latest/pages/tutorial.html

Some testdata to import into my test-instance would be appreciated now.

Invested 5 hours until now (2 for my initial test-installation, see merge-request concerning installation-hints) First, I moved the most obvious views: "persons" and "groups" to classbased, first had to learn, that the usual ListViews cannot be used with render_table (when queryset is customized). Therefore, this documentation is helpful: https://django-tables2.readthedocs.io/en/latest/pages/tutorial.html Some testdata to import into my test-instance would be appreciated now.
Author
Owner

unassigned @sstoffels

unassigned @sstoffels
Author
Owner

changed milestone to %"2.0a2"

changed milestone to %"2.0a2"
Author
Owner

mentioned in issue #212

mentioned in issue #212
Author
Owner

removed milestone

removed milestone
Author
Owner

removed milestone

removed milestone
Owner

changed the description

changed the description
Author
Owner

marked this issue as related to #122

marked this issue as related to #122
Author
Owner

Obsoleted by #696

Obsoleted by #696
nik closed this issue 2022-07-26 13:30:03 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core#73
No description provided.