Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIF
AKPlanning
Merge requests
!20
Restrict AKWall to dates belonging to the corresponding event
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Restrict AKWall to dates belonging to the corresponding event
fix-akwall-date-range
into
master
Overview
0
Commits
3
Pipelines
0
Changes
2
Merged
Restrict AKWall to dates belonging to the corresponding event
Benjamin Hättasch
requested to merge
fix-akwall-date-range
into
master
May 10, 2020
Overview
0
Commits
3
Pipelines
0
Changes
2
Fix
#57 (closed)
0
0
Merge request reports
Compare
master
version 2
3be4dac9
May 10, 2020
version 1
09297a8c
May 10, 2020
master (base)
and
latest version
latest version
062ceb9e
3 commits,
May 10, 2020
version 2
3be4dac9
2 commits,
May 10, 2020
version 1
09297a8c
1 commit,
May 10, 2020
2 files
+
6
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
AKPlan/views.py
+
6
−
2
View file @ 062ceb9e
Edit in single-file editor
Open in Web IDE
Show full file
@@ -60,8 +60,12 @@ class PlanScreenView(PlanIndexView):
def
get_queryset
(
self
):
# Determine interesting range (some hours ago until some hours in the future as specified in the settings)
self
.
start
=
datetime
.
now
().
astimezone
(
self
.
event
.
timezone
)
-
timedelta
(
hours
=
settings
.
PLAN_WALL_HOURS_RETROSPECT
)
self
.
end
=
self
.
start
+
timedelta
(
hours
=
(
settings
.
PLAN_WALL_HOURS_RETROSPECT
+
settings
.
PLAN_WALL_HOURS_FUTURE
))
now
=
datetime
.
now
().
astimezone
(
self
.
event
.
timezone
)
if
self
.
event
.
start
<
now
<
self
.
event
.
end
:
self
.
start
=
now
-
timedelta
(
hours
=
settings
.
PLAN_WALL_HOURS_RETROSPECT
)
else
:
self
.
start
=
self
.
event
.
start
self
.
end
=
self
.
event
.
end
# Restrict AK slots to relevant ones
# This will automatically filter all rooms not needed for the selected range in the orginal get_context method
Loading