Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
9e849897
Verified
Commit
9e849897
authored
5 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Rename queryset methods for announcements
at_date → on_date in_days → within_days
parent
855137e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!184
Improve announcement queries
Pipeline
#1078
failed
5 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/models.py
+2
-2
2 additions, 2 deletions
aleksis/core/models.py
with
2 additions
and
2 deletions
aleksis/core/models.py
+
2
−
2
View file @
9e849897
...
...
@@ -302,7 +302,7 @@ class AnnouncementQuerySet(models.QuerySet):
return
announcements
def
at
_date
(
self
,
when
:
Optional
[
date
]
=
None
)
->
models
.
QuerySet
:
def
on
_date
(
self
,
when
:
Optional
[
date
]
=
None
)
->
models
.
QuerySet
:
"""
Get all announcements at a certain date
"""
when
=
when
or
timezone
.
datetime
.
now
().
date
()
...
...
@@ -312,7 +312,7 @@ class AnnouncementQuerySet(models.QuerySet):
return
announcements
def
in_days
(
self
,
start
:
date
,
stop
:
date
)
->
models
.
QuerySet
:
def
with
in_days
(
self
,
start
:
date
,
stop
:
date
)
->
models
.
QuerySet
:
"""
Get all announcements valid for a set of days
"""
# Get announcements
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment