Skip to content
Snippets Groups Projects

Add customizable ordering and new request type for timeslot queryset

Merged Richard Blechinger requested to merge ordering-timeslots into master
All threads resolved!

Hello!

In this MR I added a way to customize the ordering of the TimeSlot queryset with a new order GET parameter. It defaults to sorting by reverse start date. (aka -start).

I also added a new query parameter surrounding which returns the 10 timeslots closest to the current date.

Since it's been a while since I've written Python, I'm not sure if this is the most safe/optimal way to do it, but I hope I did alright :D

If I should change anything, please let me know!

Edited by Richard Blechinger

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 758bb25a - Strip - character to make sure field can be validated properly

    Compare with previous version

  • Ernesto Rico Schmidt approved this merge request

    approved this merge request

  • mentioned in commit c0aabb28

  • Ernesto Rico Schmidt resolved all threads

    resolved all threads

  • Please register or sign in to reply
    Loading