-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only fetch "recently updated" data vs pulling everything every time
- Loading branch information
Showing
8 changed files
with
156 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from django_filters import rest_framework as filters | ||
from nefarious.models import WatchMovie, WatchTVEpisode, WatchTVSeasonRequest, WatchTVSeason | ||
|
||
|
||
class WatchMovieDateUpdatedFilter(filters.FilterSet): | ||
|
||
class Meta: | ||
model = WatchMovie | ||
fields = { | ||
'collected': ['exact'], | ||
'date_updated': ['gte'], | ||
} | ||
|
||
|
||
class WatchTVSeasonDateUpdatedFilter(filters.FilterSet): | ||
|
||
class Meta: | ||
model = WatchTVSeason | ||
fields = { | ||
'collected': ['exact'], | ||
'date_updated': ['gte'], | ||
} | ||
|
||
|
||
class WatchTVEpisodeDateUpdatedFilter(filters.FilterSet): | ||
|
||
class Meta: | ||
model = WatchTVEpisode | ||
fields = { | ||
'collected': ['exact'], | ||
'date_updated': ['gte'], | ||
} | ||
|
||
|
||
class WatchTVSeasonRequestDateUpdatedFilter(filters.FilterSet): | ||
|
||
class Meta: | ||
model = WatchTVSeasonRequest | ||
fields = { | ||
'collected': ['exact'], | ||
'date_updated': ['gte'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 3.0.2 on 2024-06-09 13:42 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nefarious', '0075_auto_20240114_1715'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='watchmovie', | ||
name='date_updated', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
migrations.AddField( | ||
model_name='watchtvepisode', | ||
name='date_updated', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
migrations.AddField( | ||
model_name='watchtvseason', | ||
name='date_updated', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
src/nefarious/migrations/0077_watchtvseasonrequest_date_updated.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.0.2 on 2024-06-09 13:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('nefarious', '0076_auto_20240609_1342'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='watchtvseasonrequest', | ||
name='date_updated', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters