Dashboard widget for SMART PLAN #340

Merged
hansegucker merged 8 commits from feature/smart-plan-dashboard-widget into master 2020-02-17 15:34:11 +01:00
Owner
Can be merged when https://edugit.org/AlekSIS/official/AlekSIS/merge_requests/155 is merged.
Author
Owner

changed milestone to %"2.0a2"

changed milestone to %"2.0a2"
Author
Owner

@nik, now you can review.

@nik, now you can review.
Owner

Please evaluate https://pypi.org/project/humanize/ instead

Please evaluate https://pypi.org/project/humanize/ instead
Owner

This should be in models.py for auto-discovery to work properly (without abusing side-effects of admin site registration, which might not happen in cases like applying single-app migrations, etc.).

This should be in `models.py` for auto-discovery to work properly (without abusing side-effects of admin site registration, which might not happen in cases like applying single-app migrations, etc.).
Owner

Doesn't this have a lot of common code with the regular view funtion? If yes, duplicate logic should probably be factored out (or argued against ;)).

Doesn't this have a lot of common code with the regular view funtion? If yes, duplicate logic should probably be factored out (or argued against ;)).
Owner
Oh, even https://docs.djangoproject.com/en/3.0/ref/contrib/humanize/ ;)
Author
Owner

The issue with putting it into models.py is a circular import.

The issue with putting it into models.py is a circular import.
Author
Owner

There is a lot of common code, that's true. But some part of this code can't be factored out. I will do some work on this.

There is a lot of common code, that's true. But some part of this code can't be factored out. I will do some work on this.
Author
Owner

Ok, that's great.

Ok, that's great.
Owner

Which one?

Which one?
Author
Owner

from aleksis.apps.chronos.util.prev_next import get_next_relevant_day

↓

from aleksis.apps.chronos.models import TimePeriod

`from aleksis.apps.chronos.util.prev_next import get_next_relevant_day` ↓ `from aleksis.apps.chronos.models import TimePeriod`
Owner

That's why I always wanted the code in prev_next as class methods on TimePeriod, or something similar ;).

That's why I always wanted the code in prev_next as class methods on TimePeriod, or something similar ;).
Author
Owner

Yes, you are right. #65

Yes, you are right. #65
Author
Owner

added 6 commits

  • 7e89c1d4...fbc203aa - 4 commits from branch master
  • 0e0eacb4 - Merge branch 'master' into feature/smart-plan-dashboard-widget
  • a7eb4dc1 - Fix path of get_next_relevant_day

Compare with previous version

added 6 commits <ul><li>7e89c1d4...fbc203aa - 4 commits from branch <code>master</code></li><li>0e0eacb4 - Merge branch &#39;master&#39; into feature/smart-plan-dashboard-widget</li><li>a7eb4dc1 - Fix path of get_next_relevant_day</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Chronos/merge_requests/36/diffs?diff_id=1340&start_sha=7e89c1d4a221df1ae999d899b0e4473df38e2ecb)
Author
Owner

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/AlekSIS/official/AlekSIS-App-Chronos/merge_requests/36/diffs?diff_id=1341&start_sha=a7eb4dc193e6bc1bbce5d2516d7dbd05a0b4c3d8#1a4cb5cefae331bb26c07cfa4f7d111984be7066_36_34)
Author
Owner

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/AlekSIS/official/AlekSIS-App-Chronos/merge_requests/36/diffs?diff_id=1341&start_sha=a7eb4dc193e6bc1bbce5d2516d7dbd05a0b4c3d8#fad72c9513e514267b1bd6995b4fd81994ed1fa7_15_0)
Author
Owner

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/AlekSIS/official/AlekSIS-App-Chronos/merge_requests/36/diffs?diff_id=1341&start_sha=a7eb4dc193e6bc1bbce5d2516d7dbd05a0b4c3d8#fad72c9513e514267b1bd6995b4fd81994ed1fa7_18_0)
Author
Owner

added 2 commits

  • 4a199dc9 - Move TimetableWidget to models.py
  • 9ecc6742 - Use django.contrib.humanize instead of own functions for dashboard widget

Compare with previous version

added 2 commits <ul><li>4a199dc9 - Move TimetableWidget to models.py</li><li>9ecc6742 - Use django.contrib.humanize instead of own functions for dashboard widget</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Chronos/merge_requests/36/diffs?diff_id=1341&start_sha=a7eb4dc193e6bc1bbce5d2516d7dbd05a0b4c3d8)
Author
Owner

added 2 commits

  • 00fd4ba2 - Refactor out a lot of stuff used by TimetableWidget and my_timetable both to...
  • c5b23ddd - Add card action link "Go to smart plan" for dashboard widget

Compare with previous version

added 2 commits <ul><li>00fd4ba2 - Refactor out a lot of stuff used by TimetableWidget and my_timetable both to...</li><li>c5b23ddd - Add card action link &quot;Go to smart plan&quot; for dashboard widget</li></ul> [Compare with previous version](/AlekSIS/official/AlekSIS-App-Chronos/merge_requests/36/diffs?diff_id=1342&start_sha=9ecc67428a461c57d4cb5202d5d80677ab8740d4)
Author
Owner

resolved all threads

resolved all threads
Author
Owner

Any progress?

Any progress?
Owner

merged

merged
Owner

mentioned in commit fd78dcd1e4

mentioned in commit fd78dcd1e4ef8ca270ee77667136ce434e6cc778
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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-App-Chronos!340
No description provided.