Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
django-panik-nonstop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
radiopanik
django-panik-nonstop
Commits
6433d60c
Commit
6433d60c
authored
Feb 26, 2015
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't list tracks that were not on air in recent diffusions
parent
612cfe33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
nonstop/models.py
nonstop/models.py
+4
-2
No files found.
nonstop/models.py
View file @
6433d60c
...
...
@@ -15,7 +15,8 @@ class Artist(models.Model):
return
reverse
(
'artist-view'
,
kwargs
=
{
'pk'
:
self
.
id
})
def
recent_diffusions
(
self
):
return
SomaLogLine
.
objects
.
filter
(
filepath__track__artist
=
self
)
.
order_by
(
'-play_timestamp'
)
return
SomaLogLine
.
objects
.
filter
(
filepath__track__artist
=
self
)
.
exclude
(
on_air
=
False
)
.
order_by
(
'-play_timestamp'
)
class
Album
(
models
.
Model
):
...
...
@@ -42,7 +43,8 @@ class Track(models.Model):
return
reverse
(
'track-view'
,
kwargs
=
{
'pk'
:
self
.
id
})
def
recent_diffusions
(
self
):
return
SomaLogLine
.
objects
.
filter
(
filepath__track
=
self
)
.
order_by
(
'-play_timestamp'
)
return
SomaLogLine
.
objects
.
filter
(
filepath__track
=
self
)
.
exclude
(
on_air
=
False
)
.
order_by
(
'-play_timestamp'
)
class
NonstopFile
(
models
.
Model
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment