Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b8dd3ee258 | |||
| dc965687c2 | |||
| ebc66bbf64 | |||
| d04db0ecb5 | |||
| fc72b23b11 | |||
| a681b4d63b | |||
| c452ac24e0 | |||
| ae889bff7d | |||
| 99dc86dc27 | |||
| 8eefcb8290 | |||
| ad0f9a54d0 |
@ -443,6 +443,11 @@ it's annoying.
|
||||
** TODO [#C] Allow users to see tasks on calendar view :vrobbler:personal:project:templates:feature:
|
||||
https://codepen.io/oliviale/pen/QYqybo
|
||||
** TODO [#C] Come up with a possible flow using WebDAV and super-productivity for tasks :personal:feature:project:vrobbler:tasks:
|
||||
* Version 19.0
|
||||
** DONE Add periodic check for mood :vrobbler:feature:moods:personal:project:
|
||||
:PROPERTIES:
|
||||
:ID: 55404488-c69f-0dd5-838e-1d1e15c873eb
|
||||
:END:
|
||||
* Version 18.7
|
||||
** DONE Use the timezone history log to fix old Scrobbles that fall into those timezone blocks :vrobbler:chore:scrobbles:project:personal:
|
||||
:PROPERTIES:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from scrobbles.dataclasses import BoardGameLogData, BoardGameScoreLogData
|
||||
#from scrobbles.dataclasses import BoardGameLogData, BoardGameScoreLogData
|
||||
|
||||
|
||||
@pytest.mark.skip("Need to get local tests running working again")
|
||||
|
||||
@ -1,18 +1,25 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
|
||||
from beers.untappd import get_beer_from_untappd_id, get_rating_from_soup
|
||||
from beers.untappd import get_beer_from_untappd_id
|
||||
from django.apps import apps
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from django_extensions.db.models import TimeStampedModel
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from scrobbles.dataclasses import BeerLogData
|
||||
from scrobbles.dataclasses import BaseLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class BeerLogData(BaseLogData):
|
||||
rating: Optional[str] = None
|
||||
|
||||
|
||||
class BeerStyle(TimeStampedModel):
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
@ -12,14 +14,87 @@ from django.urls import reverse
|
||||
from django_extensions.db.models import TimeStampedModel
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from scrobbles.dataclasses import BoardGameLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
from locations.models import GeoLocation
|
||||
from people.models import Person
|
||||
from scrobbles.dataclasses import BaseLogData, LongPlayLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class BoardGameScoreLogData(BaseLogData):
|
||||
person_id: Optional[int] = None
|
||||
bgg_username: Optional[str] = None
|
||||
color: Optional[str] = None
|
||||
character: Optional[str] = None
|
||||
team: Optional[str] = None
|
||||
score: Optional[int] = None
|
||||
win: Optional[bool] = None
|
||||
new: Optional[bool] = None
|
||||
rank: Optional[int] = None
|
||||
seat_order: Optional[int] = None
|
||||
role: Optional[str] = None
|
||||
rank: Optional[int] = None
|
||||
seat_order: Optional[int] = None
|
||||
role: Optional[str] = None
|
||||
lichess_username: Optional[str] = None
|
||||
|
||||
@property
|
||||
def person(self) -> Optional[Person]:
|
||||
return Person.objects.filter(id=self.person_id).first()
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
name = ""
|
||||
if self.person:
|
||||
name = self.person.name
|
||||
return name
|
||||
|
||||
def __str__(self) -> str:
|
||||
out = self.name
|
||||
if self.score:
|
||||
out += f" {self.score}"
|
||||
if self.color:
|
||||
out += f" ({self.color})"
|
||||
if self.win:
|
||||
out += f" [W]"
|
||||
return out
|
||||
|
||||
|
||||
@dataclass
|
||||
class BoardGameLogData(BaseLogData, LongPlayLogData):
|
||||
players: Optional[list[BoardGameScoreLogData]] = None
|
||||
location_id: Optional[int] = None
|
||||
difficulty: Optional[int] = None
|
||||
solo: Optional[bool] = None
|
||||
two_handed: Optional[bool] = None
|
||||
expansion_ids: Optional[int] = None
|
||||
moves: Optional[list] = None
|
||||
rated: Optional[str] = None
|
||||
speed: Optional[str] = None
|
||||
variant: Optional[str] = None
|
||||
lichess_id: Optional[int] = None
|
||||
board: Optional[str] = None
|
||||
rounds: Optional[int] = None
|
||||
details: Optional[str] = None
|
||||
# Legacy
|
||||
learning: Optional[bool] = None
|
||||
scenario: Optional[str] = None
|
||||
|
||||
@cached_property
|
||||
def player_log(self) -> str:
|
||||
if self.players:
|
||||
return ", ".join(
|
||||
[
|
||||
BoardGameScoreLogData(**player).__str__()
|
||||
for player in self.players
|
||||
]
|
||||
)
|
||||
return ""
|
||||
|
||||
|
||||
class BoardGamePublisher(TimeStampedModel):
|
||||
name = models.CharField(max_length=255)
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
|
||||
@ -3,7 +3,7 @@ from boardgames.models import BoardGame
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import get_user_model
|
||||
from scrobbles.models import Scrobble
|
||||
from scrobbles.notifications import NtfyNotification
|
||||
from scrobbles.notifications import ScrobbleNtfyNotification
|
||||
|
||||
User = get_user_model()
|
||||
|
||||
@ -124,5 +124,5 @@ def import_chess_games_for_all_users():
|
||||
if scrobbles_to_create:
|
||||
created = Scrobble.objects.bulk_create(scrobbles_to_create)
|
||||
for scrobble in created:
|
||||
NtfyNotification(scrobble).send()
|
||||
ScrobbleNtfyNotification(scrobble).send()
|
||||
return scrobbles_to_create
|
||||
|
||||
@ -9,7 +9,7 @@ import requests
|
||||
from books.constants import BOOKS_TITLES_TO_IGNORE
|
||||
from django.apps import apps
|
||||
from django.contrib.auth import get_user_model
|
||||
from scrobbles.notifications import NtfyNotification
|
||||
from scrobbles.notifications import ScrobbleNtfyNotification
|
||||
from stream_sqlite import stream_sqlite
|
||||
from webdav.client import get_webdav_client
|
||||
|
||||
@ -409,7 +409,7 @@ def process_koreader_sqlite_file(file_path, user_id) -> list:
|
||||
if new_scrobbles:
|
||||
created = Scrobble.objects.bulk_create(new_scrobbles)
|
||||
if created:
|
||||
NtfyNotification(created[-1]).send()
|
||||
ScrobbleNtfyNotification(created[-1]).send()
|
||||
fix_long_play_stats_for_scrobbles(created)
|
||||
logger.info(
|
||||
f"Created {len(created)} scrobbles",
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
from collections import OrderedDict
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
from datetime import timedelta, datetime
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
|
||||
import requests
|
||||
@ -35,9 +37,9 @@ from vrobbler.apps.books.locg import (
|
||||
lookup_comic_from_locg,
|
||||
lookup_comic_writer_by_locg_slug,
|
||||
)
|
||||
from vrobbler.apps.books.sources.google import lookup_book_from_google
|
||||
from vrobbler.apps.books.sources.semantic import lookup_paper_from_semantic
|
||||
from vrobbler.apps.scrobbles.dataclasses import BookLogData
|
||||
from books.sources.google import lookup_book_from_google
|
||||
from books.sources.semantic import lookup_paper_from_semantic
|
||||
from scrobbles.dataclasses import BaseLogData, LongPlayLogData
|
||||
|
||||
COMICVINE_API_KEY = getattr(settings, "COMICVINE_API_KEY", "")
|
||||
|
||||
@ -46,6 +48,23 @@ User = get_user_model()
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class BookPageLogData(BaseLogData):
|
||||
page_number: Optional[int] = None
|
||||
end_ts: Optional[int] = None
|
||||
start_ts: Optional[int] = None
|
||||
duration: Optional[int] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class BookLogData(BaseLogData, LongPlayLogData):
|
||||
koreader_hash: Optional[str] = None
|
||||
page_data: Optional[dict[int, BookPageLogData]] = None
|
||||
pages_read: Optional[int] = None
|
||||
page_start: Optional[int] = None
|
||||
page_end: Optional[int] = None
|
||||
|
||||
|
||||
class Author(TimeStampedModel):
|
||||
name = models.CharField(max_length=255)
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
@ -161,7 +180,9 @@ class Book(LongPlayScrobblableMixin):
|
||||
return reverse("books:book_detail", kwargs={"slug": self.uuid})
|
||||
|
||||
@classmethod
|
||||
def find_or_create(cls, title: str, enrich: bool = False, commit: bool = True):
|
||||
def find_or_create(
|
||||
cls, title: str, enrich: bool = False, commit: bool = True
|
||||
):
|
||||
"""Given a title, get a Book instance.
|
||||
|
||||
If the book is not already in our database, or overwrite is True,
|
||||
@ -173,10 +194,15 @@ class Book(LongPlayScrobblableMixin):
|
||||
# TODO use either a Google Books id identifier or author name like for tracks
|
||||
book, created = cls.objects.get_or_create(title=title)
|
||||
if not created:
|
||||
logger.info("Found exact match for book by title", extra={"title": title})
|
||||
logger.info(
|
||||
"Found exact match for book by title", extra={"title": title}
|
||||
)
|
||||
|
||||
if not enrich:
|
||||
logger.info("Found book by title, but not enriching", extra={"title": title})
|
||||
logger.info(
|
||||
"Found book by title, but not enriching",
|
||||
extra={"title": title},
|
||||
)
|
||||
return book
|
||||
|
||||
book_dict = lookup_book_from_google(title)
|
||||
|
||||
@ -1,15 +1,23 @@
|
||||
from django.apps import apps
|
||||
from dataclasses import dataclass
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from django_extensions.db.models import TimeStampedModel
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from scrobbles.dataclasses import BrickSetLogData
|
||||
from scrobbles.mixins import LongPlayScrobblableMixin
|
||||
from vrobbler.apps.scrobbles.dataclasses import (
|
||||
BaseLogData,
|
||||
LongPlayLogData,
|
||||
WithPeopleLogData,
|
||||
)
|
||||
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class BrickSetLogData(BaseLogData, WithPeopleLogData, LongPlayLogData):
|
||||
pass
|
||||
|
||||
|
||||
class BrickSet(LongPlayScrobblableMixin):
|
||||
""""""
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
|
||||
from django.apps import apps
|
||||
@ -6,12 +8,18 @@ from django.urls import reverse
|
||||
from django_extensions.db.models import TimeStampedModel
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from scrobbles.dataclasses import FoodLogData
|
||||
from scrobbles.dataclasses import BaseLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class FoodLogData(BaseLogData):
|
||||
meal: Optional[str] = None
|
||||
rating: Optional[str] = None
|
||||
|
||||
|
||||
class FoodCategory(TimeStampedModel):
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
@ -1,12 +1,19 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
from django.apps import apps
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from scrobbles.dataclasses import LifeEventLogData
|
||||
from scrobbles.dataclasses import BaseLogData, WithPeopleLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class LifeEventLogData(BaseLogData, WithPeopleLogData):
|
||||
pass
|
||||
|
||||
|
||||
class LifeEvent(ScrobblableMixin):
|
||||
description = models.TextField(**BNULL)
|
||||
|
||||
|
||||
@ -1,19 +1,25 @@
|
||||
import logging
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from scrobbles.dataclasses import BaseLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
from vrobbler.apps.scrobbles.dataclasses import MoodLogData
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
BNULL = {"blank": True, "null": True}
|
||||
User = get_user_model()
|
||||
|
||||
|
||||
@dataclass
|
||||
class MoodLogData(BaseLogData):
|
||||
reasons: Optional[str] = None
|
||||
|
||||
|
||||
class Mood(ScrobblableMixin):
|
||||
description = models.TextField(**BNULL)
|
||||
image = models.ImageField(upload_to="moods/", **BNULL)
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.2.19 on 2025-07-30 22:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('profiles', '0026_userprofile_timezone_change_log'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='userprofile',
|
||||
name='mood_checkin_enabled',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='userprofile',
|
||||
name='mood_checkin_frequency',
|
||||
field=models.CharField(default='hourly', max_length=20),
|
||||
),
|
||||
]
|
||||
@ -1,6 +1,5 @@
|
||||
from zoneinfo import ZoneInfo
|
||||
import pendulum
|
||||
from datetime import datetime
|
||||
from django.utils import timezone
|
||||
import logging
|
||||
from django.conf import settings
|
||||
@ -56,6 +55,9 @@ class UserProfile(TimeStampedModel):
|
||||
imap_pass = EncryptedField(**BNULL)
|
||||
imap_auto_import = models.BooleanField(default=False)
|
||||
|
||||
mood_checkin_enabled = models.BooleanField(default=False)
|
||||
mood_checkin_frequency = models.CharField(max_length=20, default="hourly")
|
||||
|
||||
ntfy_url = models.CharField(max_length=255, **BNULL)
|
||||
ntfy_enabled = models.BooleanField(default=False)
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
|
||||
import requests
|
||||
@ -9,12 +11,19 @@ from django_extensions.db.models import TimeStampedModel
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from puzzles.sources import ipdb
|
||||
from scrobbles.dataclasses import PuzzleLogData
|
||||
from scrobbles.dataclasses import JSONDataclass
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class PuzzleLogData(JSONDataclass):
|
||||
with_people: Optional[int] = None
|
||||
rating: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
|
||||
|
||||
class PuzzleManufacturer(TimeStampedModel):
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
name = models.CharField(max_length=255)
|
||||
@ -58,6 +67,10 @@ class Puzzle(ScrobblableMixin):
|
||||
def __str__(self):
|
||||
return f"{self.title} ({self.pieces_count}) by {self.manufacturer}"
|
||||
|
||||
@property
|
||||
def logdata_cls(self):
|
||||
return PuzzleLogData
|
||||
|
||||
@property
|
||||
def subtitle(self):
|
||||
return self.manufacturer.name
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
from functools import cached_property
|
||||
import inspect
|
||||
import json
|
||||
from dataclasses import asdict, dataclass
|
||||
from typing import Optional
|
||||
@ -33,192 +31,25 @@ class JSONDataclass(JSONWizard):
|
||||
|
||||
|
||||
@dataclass
|
||||
class ScrobbleLogData(JSONDataclass):
|
||||
description: Optional[str] = None
|
||||
class BaseLogData(JSONDataclass):
|
||||
details: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class LongPlayLogData(JSONDataclass):
|
||||
serial_scrobble_id: Optional[int]
|
||||
long_play_complete: bool = False
|
||||
|
||||
|
||||
class WithOthersLogData(JSONDataclass):
|
||||
with_user_ids: Optional[list[int]] = None
|
||||
with_names_str: Optional[list[str]] = None
|
||||
|
||||
@property
|
||||
def with_names(self) -> list[str]:
|
||||
with_names = []
|
||||
if self.with_user_ids:
|
||||
with_names += [u.full_name for u in self.with_users if u]
|
||||
if self.with_names_str:
|
||||
with_names += [u for u in self.with_names_str]
|
||||
return with_names
|
||||
|
||||
@property
|
||||
def with_users(self) -> list[User]:
|
||||
with_users = []
|
||||
if self.with_user_ids:
|
||||
with_users = [
|
||||
User.objects.filter(id=i).first() for i in self.with_user_ids
|
||||
]
|
||||
return with_users
|
||||
|
||||
|
||||
@dataclass
|
||||
class BoardGameScoreLogData(JSONDataclass):
|
||||
person_id: Optional[int] = None
|
||||
bgg_username: str = ""
|
||||
color: Optional[str] = None
|
||||
character: Optional[str] = None
|
||||
team: Optional[str] = None
|
||||
score: Optional[int] = None
|
||||
win: Optional[bool] = None
|
||||
new: Optional[bool] = None
|
||||
rank: Optional[int] = None
|
||||
seat_order: Optional[int] = None
|
||||
role: Optional[str] = None
|
||||
|
||||
@property
|
||||
def person(self) -> Optional[Person]:
|
||||
return Person.objects.filter(id=self.person_id).first()
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
name = ""
|
||||
if self.person:
|
||||
name = self.person.name
|
||||
return name
|
||||
|
||||
def __str__(self) -> str:
|
||||
out = self.name
|
||||
if self.score:
|
||||
out += f" {self.score}"
|
||||
if self.color:
|
||||
out += f" ({self.color})"
|
||||
if self.win:
|
||||
out += f" [W]"
|
||||
return out
|
||||
|
||||
|
||||
@dataclass
|
||||
class BoardGameLogData(LongPlayLogData):
|
||||
complete: Optional[bool] = None
|
||||
serial_scrobble_id: Optional[int] = None
|
||||
long_play_complete: Optional[bool] = None
|
||||
players: Optional[list[BoardGameScoreLogData]] = None
|
||||
location_id: Optional[int] = None
|
||||
difficulty: Optional[int] = None
|
||||
solo: Optional[bool] = None
|
||||
two_handed: Optional[bool] = None
|
||||
expansion_ids: Optional[int] = None
|
||||
|
||||
@cached_property
|
||||
def geo_location(self) -> Optional[GeoLocation]:
|
||||
if self.geo_location_id:
|
||||
return GeoLocation.objects.filter(id=self.geo_location_id).first()
|
||||
|
||||
@cached_property
|
||||
def player_log(self) -> str:
|
||||
return ", ".join([BoardGameScoreLogData(**player).__str__() for player in self.players])
|
||||
|
||||
@dataclass
|
||||
class BookPageLogData(JSONDataclass):
|
||||
page_number: Optional[int] = None
|
||||
end_ts: Optional[int] = None
|
||||
start_ts: Optional[int] = None
|
||||
duration: Optional[int] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class BookLogData(LongPlayLogData):
|
||||
long_play_complete: Optional[bool] = None
|
||||
koreader_hash: Optional[str] = None
|
||||
page_data: Optional[dict[int, BookPageLogData]] = None
|
||||
pages_read: Optional[int] = None
|
||||
page_start: Optional[int] = None
|
||||
page_end: Optional[int] = None
|
||||
serial_scrobble_id: Optional[int] = None
|
||||
details: Optional[str] = None
|
||||
class WithPeopleLogData(JSONDataclass):
|
||||
with_people_ids: Optional[list[int]] = None
|
||||
|
||||
@property
|
||||
def with_people(self) -> list["Person"]:
|
||||
from people.models import Person
|
||||
|
||||
@dataclass
|
||||
class LifeEventLogData(WithOthersLogData):
|
||||
with_user_ids: Optional[list[int]] = None
|
||||
with_names_str: Optional[list[str]] = None
|
||||
location: Optional[str] = None
|
||||
geo_location_id: Optional[int] = None
|
||||
details: Optional[str] = None
|
||||
|
||||
def geo_location(self):
|
||||
return GeoLocation.objects.filter(id=self.geo_location_id).first()
|
||||
|
||||
|
||||
@dataclass
|
||||
class MoodLogData(JSONDataclass):
|
||||
reasons: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class VideoLogData(JSONDataclass):
|
||||
title: str
|
||||
video_type: str
|
||||
run_time_seconds: int
|
||||
kind: str
|
||||
year: Optional[int]
|
||||
episode_number: Optional[int] = None
|
||||
source_url: Optional[str] = None
|
||||
imdbID: Optional[str] = None
|
||||
season_number: Optional[int] = None
|
||||
cover_url: Optional[str] = None
|
||||
next_imdb_id: Optional[int] = None
|
||||
tv_series_id: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class VideoGameLogData(LongPlayLogData):
|
||||
serial_scrobble_id: Optional[int] = None
|
||||
long_play_complete: Optional[bool] = False
|
||||
console: Optional[str] = None
|
||||
emulated: Optional[bool] = False
|
||||
emulator: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class BrickSetLogData(LongPlayLogData, WithOthersLogData):
|
||||
serial_scrobble_id: Optional[int]
|
||||
long_play_complete: bool = False
|
||||
with_user_ids: Optional[list[int]] = None
|
||||
with_names_str: Optional[list[str]] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class TrailLogData(WithOthersLogData):
|
||||
with_user_ids: Optional[list[int]] = None
|
||||
with_names_str: Optional[list[str]] = None
|
||||
details: Optional[str] = None
|
||||
effort: Optional[str] = None
|
||||
difficulty: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class BeerLogData(WithOthersLogData):
|
||||
with_user_ids: Optional[list[int]] = None
|
||||
with_names_str: Optional[list[str]] = None
|
||||
details: Optional[str] = None
|
||||
rating: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class FoodLogData(JSONDataclass):
|
||||
meal: Optional[str] = None
|
||||
details: Optional[str] = None
|
||||
rating: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class PuzzleLogData(JSONDataclass):
|
||||
with_others: Optional[str] = None
|
||||
rating: Optional[str] = None
|
||||
notes: Optional[str] = None
|
||||
if not self.with_people_ids:
|
||||
return []
|
||||
return [Person.objects.filter(id=pid) for pid in self.with_people_ids]
|
||||
|
||||
@ -2,6 +2,7 @@ import codecs
|
||||
import csv
|
||||
import logging
|
||||
from datetime import datetime, timedelta
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import requests
|
||||
from django.contrib.auth import get_user_model
|
||||
@ -61,10 +62,10 @@ def import_audioscrobbler_tsv_file(file_path, user_id):
|
||||
},
|
||||
)
|
||||
continue
|
||||
|
||||
timestamp = user.profile.get_timestamp_with_tz(
|
||||
datetime.fromtimestamp(int(row[AsTsvColumn["TIMESTAMP"].value]))
|
||||
)
|
||||
timestamp = datetime.fromtimestamp(
|
||||
int(row[AsTsvColumn["TIMESTAMP"].value])
|
||||
).astimezone(ZoneInfo("UTC"))
|
||||
timestamp = user.profile.get_timestamp_with_tz(timestamp)
|
||||
stop_timestamp = timestamp + timedelta(seconds=track.run_time_seconds)
|
||||
|
||||
new_scrobble = Scrobble(
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from vrobbler.apps.scrobbles.utils import (
|
||||
send_mood_checkin_reminders
|
||||
)
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
sent_count = send_mood_checkin_reminders()
|
||||
print(f"Sent {sent_count} mood check-in notifications")
|
||||
@ -14,6 +14,7 @@ from boardgames.models import BoardGame
|
||||
from books.koreader import process_koreader_sqlite_file
|
||||
from books.models import Book, Paper
|
||||
from bricksets.models import BrickSet
|
||||
from dataclass_wizard.errors import ParseError
|
||||
from django.conf import settings
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core.files import File
|
||||
@ -42,7 +43,7 @@ from puzzles.models import Puzzle
|
||||
from scrobbles import dataclasses as logdata
|
||||
from scrobbles.constants import LONG_PLAY_MEDIA, MEDIA_END_PADDING_SECONDS
|
||||
from scrobbles.importers.lastfm import LastFM
|
||||
from scrobbles.notifications import NtfyNotification
|
||||
from scrobbles.notifications import ScrobbleNtfyNotification
|
||||
from scrobbles.stats import build_charts
|
||||
from scrobbles.utils import get_file_md5_hash, media_class_to_foreign_key
|
||||
from sports.models import SportEvent
|
||||
@ -718,11 +719,11 @@ class Scrobble(TimeStampedModel):
|
||||
)
|
||||
|
||||
@property
|
||||
def logdata(self) -> Optional[logdata.JSONDataclass]:
|
||||
def logdata(self) -> Optional[logdata.BaseLogData]:
|
||||
if self.media_obj:
|
||||
logdata_cls = self.media_obj.logdata_cls
|
||||
else:
|
||||
logdata_cls = logdata.ScrobbleLogData
|
||||
logdata_cls = logdata.BaseLogData
|
||||
|
||||
log_dict = self.log
|
||||
if isinstance(self.log, str):
|
||||
@ -736,7 +737,14 @@ class Scrobble(TimeStampedModel):
|
||||
if not log_dict:
|
||||
log_dict = {}
|
||||
|
||||
return logdata_cls(**log_dict)
|
||||
try:
|
||||
return logdata_cls.from_dict(log_dict)
|
||||
except ParseError:
|
||||
logger.warning(
|
||||
"Could not parse log data",
|
||||
extra={"log_dict": log_dict, "scrobble_id": self.id},
|
||||
)
|
||||
return logdata_cls()
|
||||
|
||||
def redirect_url(self, user_id) -> str:
|
||||
user = User.objects.filter(id=user_id).first()
|
||||
@ -1316,7 +1324,7 @@ class Scrobble(TimeStampedModel):
|
||||
scrobble_data: dict,
|
||||
) -> "Scrobble":
|
||||
scrobble = cls.objects.create(**scrobble_data)
|
||||
NtfyNotification(scrobble).send()
|
||||
ScrobbleNtfyNotification(scrobble).send()
|
||||
return scrobble
|
||||
|
||||
def stop(self, timestamp=None, force_finish=False) -> None:
|
||||
|
||||
@ -3,13 +3,26 @@ import requests
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.sites.models import Site
|
||||
from django.urls import reverse
|
||||
|
||||
class Notification(ABC):
|
||||
scrobble: "Scrobble"
|
||||
class BasicNtfyNotification(ABC):
|
||||
ntfy_headers: dict = {}
|
||||
ntfy_url: str = ""
|
||||
title: str = ""
|
||||
|
||||
def __init__(self, profile: "UserProfile"):
|
||||
self.profile = profile.user
|
||||
protocol = "http" if settings.DEBUG else "https"
|
||||
domain = Site.objects.get_current().domain
|
||||
self.url_tmpl = f'{protocol}://{domain}' + '{path}'
|
||||
|
||||
@abstractmethod
|
||||
def send(self) -> None:
|
||||
pass
|
||||
|
||||
class ScrobbleNotification(BasicNtfyNotification):
|
||||
scrobble: "Scrobble"
|
||||
|
||||
def __init__(self, scrobble: "Scrobble"):
|
||||
self.scrobble = scrobble
|
||||
self.user = scrobble.user
|
||||
@ -19,13 +32,12 @@ class Notification(ABC):
|
||||
self.url_tmpl = f'{protocol}://{domain}' + '{path}'
|
||||
|
||||
|
||||
|
||||
@abstractmethod
|
||||
def send(self) -> None:
|
||||
pass
|
||||
|
||||
|
||||
class NtfyNotification(Notification):
|
||||
class ScrobbleNtfyNotification(ScrobbleNotification):
|
||||
def __init__(self, scrobble, **kwargs):
|
||||
super().__init__(scrobble)
|
||||
self.ntfy_str: str = f"{self.scrobble.media_obj}"
|
||||
@ -55,3 +67,27 @@ class NtfyNotification(Notification):
|
||||
"Click": self.click_url,
|
||||
},
|
||||
)
|
||||
|
||||
class MoodNtfyNotification(BasicNtfyNotification):
|
||||
def __init__(self, profile, **kwargs):
|
||||
super().__init__(profile)
|
||||
self.ntfy_str: str = "Would you like to check in about your mood?"
|
||||
self.click_url = self.url_tmpl.format(path=reverse("moods:mood-list"))
|
||||
self.title = "Mood Check-in!"
|
||||
|
||||
def send(self):
|
||||
if (
|
||||
self.profile
|
||||
and self.profile.ntfy_enabled
|
||||
and self.profile.ntfy_url
|
||||
):
|
||||
requests.post(
|
||||
self.profile.ntfy_url,
|
||||
data=self.ntfy_str.encode(encoding="utf-8"),
|
||||
headers={
|
||||
"Title": self.title,
|
||||
"Priority": "high",
|
||||
"Tags": "smiley, check",
|
||||
"Click": self.click_url,
|
||||
},
|
||||
)
|
||||
|
||||
@ -26,7 +26,7 @@ from scrobbles.constants import (
|
||||
SCROBBLE_CONTENT_URLS,
|
||||
)
|
||||
from scrobbles.models import Scrobble
|
||||
from scrobbles.notifications import NtfyNotification
|
||||
from scrobbles.notifications import ScrobbleNtfyNotification
|
||||
from scrobbles.utils import convert_to_seconds, extract_domain
|
||||
from sports.models import SportEvent
|
||||
from sports.thesportsdb import lookup_event_from_thesportsdb
|
||||
@ -505,7 +505,7 @@ def email_scrobble_board_game(
|
||||
scrobble.played_to_completion = True
|
||||
scrobble.save()
|
||||
scrobbles_created.append(scrobble)
|
||||
NtfyNotification(scrobble).send()
|
||||
ScrobbleNtfyNotification(scrobble).send()
|
||||
|
||||
return scrobbles_created
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ from django.utils import timezone
|
||||
from profiles.models import UserProfile
|
||||
from profiles.utils import now_user_timezone
|
||||
from scrobbles.constants import LONG_PLAY_MEDIA
|
||||
from scrobbles.notifications import NtfyNotification
|
||||
from scrobbles.notifications import MoodNtfyNotification, ScrobbleNtfyNotification
|
||||
from scrobbles.tasks import (
|
||||
process_koreader_import,
|
||||
process_lastfm_import,
|
||||
@ -318,7 +318,20 @@ def send_stop_notifications_for_in_progress_scrobbles() -> int:
|
||||
).seconds
|
||||
|
||||
if elapsed_scrobble_seconds > scrobble.media_obj.run_time_seconds:
|
||||
NtfyNotification(scrobble, end=True).send()
|
||||
ScrobbleNtfyNotification(scrobble, end=True).send()
|
||||
notifications_sent += 1
|
||||
|
||||
return notifications_sent
|
||||
|
||||
def send_mood_checkin_reminders() -> int:
|
||||
"""Get all profiles with mood check-ins enabled and checkin!"""
|
||||
from profiles.models import UserProfile
|
||||
|
||||
now = timezone.now()
|
||||
notifications_sent = 0
|
||||
for profile in UserProfile.objects.filter(mood_checkin_enabled=True):
|
||||
if profile.mood_checkin_frequency == "hourly" and now.minute == 0:
|
||||
MoodNtfyNotification(profile).send()
|
||||
notifications_sent += 1
|
||||
|
||||
return notifications_sent
|
||||
|
||||
@ -56,6 +56,7 @@ from scrobbles.utils import (
|
||||
get_long_plays_completed,
|
||||
get_long_plays_in_progress,
|
||||
)
|
||||
from moods.models import Mood
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@ -66,15 +67,17 @@ class ScrobbleableListView(ListView):
|
||||
|
||||
def get_queryset(self):
|
||||
queryset = super().get_queryset()
|
||||
if self.model == Mood:
|
||||
return queryset
|
||||
|
||||
user_filter = Q()
|
||||
if not self.request.user.is_anonymous:
|
||||
user_filter = Q(scrobble__user=self.request.user)
|
||||
|
||||
queryset = (
|
||||
queryset.annotate(
|
||||
scrobble_count=Count("scrobble"),
|
||||
)
|
||||
.filter(user_filter, scrobble_count__gt=0)
|
||||
.order_by("-scrobble_count")
|
||||
queryset.filter(user_filter).annotate(
|
||||
scrobble_count=Count("scrobble")
|
||||
).filter(scrobble_count__gt=0).order_by("-scrobble_count")
|
||||
)
|
||||
return queryset
|
||||
|
||||
|
||||
@ -18,19 +18,33 @@ class TaskLogData(JSONDataclass):
|
||||
description: Optional[str] = None
|
||||
title: Optional[str] = None
|
||||
project: Optional[str] = None
|
||||
notes: Optional[dict] = None
|
||||
updated_at: Optional[str] = None
|
||||
todoist_id: Optional[str] = None
|
||||
todoist_event: Optional[str] = None
|
||||
todoist_type: Optional[str] = None
|
||||
notes: Optional[dict] = None
|
||||
todoist_type: Optional[str] = None
|
||||
todoist_label_list: Optional[list] = None
|
||||
todoist_project_id: Optional[str] = None
|
||||
body: Optional[str] = None
|
||||
state: Optional[str] = None
|
||||
labels: Optional[str] = None
|
||||
properties: Optional[list] = None
|
||||
drawers: Optional[list] = None
|
||||
source: Optional[str] = None
|
||||
source_id: Optional[str] = None
|
||||
timestamps: Optional[list] = None
|
||||
details: Optional[str] = None
|
||||
|
||||
def notes_as_str(self) -> str:
|
||||
"""Return formatted notes with line breaks and no keys"""
|
||||
note_block = ""
|
||||
if not self.notes:
|
||||
return note_block
|
||||
if isinstance(self.notes, list):
|
||||
note_block = "</br>".join(self.notes)
|
||||
|
||||
for id, content in self.notes.items():
|
||||
note_block += content + "</br>"
|
||||
if isinstance(self.notes, dict):
|
||||
for id, content in self.notes.items():
|
||||
note_block += content + "</br>"
|
||||
return note_block
|
||||
|
||||
|
||||
|
||||
@ -1,14 +1,23 @@
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from django.apps import apps
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from scrobbles.dataclasses import TrailLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from locations.models import GeoLocation
|
||||
from scrobbles.dataclasses import BaseLogData, WithPeopleLogData
|
||||
from scrobbles.mixins import ScrobblableConstants, ScrobblableMixin
|
||||
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class TrailLogData(BaseLogData, WithPeopleLogData):
|
||||
effort: Optional[str] = None
|
||||
difficulty: Optional[str] = None
|
||||
|
||||
|
||||
class Trail(ScrobblableMixin):
|
||||
class PrincipalType(models.TextChoices):
|
||||
WOODS = "WOODS"
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
|
||||
from django.conf import settings
|
||||
@ -8,7 +10,11 @@ from django.urls import reverse
|
||||
from django_extensions.db.models import TimeStampedModel
|
||||
from imagekit.models import ImageSpecField
|
||||
from imagekit.processors import ResizeToFit
|
||||
from scrobbles.dataclasses import VideoGameLogData
|
||||
from scrobbles.dataclasses import (
|
||||
BaseLogData,
|
||||
LongPlayLogData,
|
||||
WithPeopleLogData,
|
||||
)
|
||||
from scrobbles.mixins import LongPlayScrobblableMixin, ScrobblableConstants
|
||||
from scrobbles.utils import get_scrobbles_for_media
|
||||
from videogames.igdb import lookup_game_id_from_gdb
|
||||
@ -18,6 +24,18 @@ BNULL = {"blank": True, "null": True}
|
||||
User = get_user_model()
|
||||
|
||||
|
||||
@dataclass
|
||||
class VideoGameLogData(BaseLogData, LongPlayLogData, WithPeopleLogData):
|
||||
platform_id: Optional[int] = None
|
||||
emulated: Optional[bool] = False
|
||||
emulator: Optional[str] = None
|
||||
|
||||
def platform(self):
|
||||
if not self.platform_id:
|
||||
return
|
||||
return VideoGamePlatform.objects.filter(id=self.platform_id).first()
|
||||
|
||||
|
||||
class VideoGamePlatform(TimeStampedModel):
|
||||
name = models.CharField(max_length=255)
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
from typing import Optional
|
||||
from uuid import uuid4
|
||||
@ -22,6 +23,7 @@ from videos.metadata import VideoMetadata
|
||||
from videos.sources.imdb import lookup_video_from_imdb
|
||||
from videos.sources.tmdb import lookup_video_from_tmdb
|
||||
from videos.sources.youtube import lookup_video_from_youtube
|
||||
from vrobbler.apps.scrobbles.dataclasses import BaseLogData, WithPeopleLogData
|
||||
|
||||
YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v="
|
||||
YOUTUBE_CHANNEL_URL = "https://www.youtube.com/channel/"
|
||||
@ -31,6 +33,11 @@ logger = logging.getLogger(__name__)
|
||||
BNULL = {"blank": True, "null": True}
|
||||
|
||||
|
||||
@dataclass
|
||||
class VideoLogData(BaseLogData, WithPeopleLogData):
|
||||
rating: Optional[int] = None
|
||||
|
||||
|
||||
class Channel(TimeStampedModel):
|
||||
uuid = models.UUIDField(default=uuid4, editable=False, **BNULL)
|
||||
name = models.CharField(max_length=255)
|
||||
@ -243,6 +250,10 @@ class Video(ScrobblableMixin):
|
||||
def get_absolute_url(self):
|
||||
return reverse("videos:video_detail", kwargs={"slug": self.uuid})
|
||||
|
||||
@property
|
||||
def logdata_cls(self):
|
||||
return VideoLogData
|
||||
|
||||
@property
|
||||
def subtitle(self):
|
||||
if self.tv_series:
|
||||
|
||||
68
vrobbler/templates/puzzles/puzzle_detail.html
Normal file
68
vrobbler/templates/puzzles/puzzle_detail.html
Normal file
@ -0,0 +1,68 @@
|
||||
{% extends "base_list.html" %}
|
||||
{% load mathfilters %}
|
||||
{% load static %}
|
||||
{% load naturalduration %}
|
||||
|
||||
{% block title %}{{object.title}}{% endblock %}
|
||||
|
||||
{% block head_extra %}
|
||||
<style>
|
||||
.cover img {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.cover {
|
||||
float: left;
|
||||
width: 252px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.summary {
|
||||
float: left;
|
||||
width: 600px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block lists %}
|
||||
|
||||
<div class="row">
|
||||
<div class="summary">
|
||||
{% if object.description%}
|
||||
<p>{{object.description|safe|linebreaks|truncatewords:160}}</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
<p style="float:right;">
|
||||
<a href="{{object.untappd_link}}"><img src="{% static "images/untappd-logo.png" %}" width=35></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<p>{{scrobbles.count}} scrobbles</p>
|
||||
<p>
|
||||
<a href="{{object.start_url}}">Drink again</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md">
|
||||
<h3>Last scrobbles</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for scrobble in scrobbles.all|dictsortreversed:"timestamp" %}
|
||||
<tr>
|
||||
<td>{{scrobble.local_timestamp}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
23
vrobbler/templates/puzzles/puzzle_list.html
Normal file
23
vrobbler/templates/puzzles/puzzle_list.html
Normal file
@ -0,0 +1,23 @@
|
||||
{% extends "base_list.html" %}
|
||||
|
||||
{% block title %}Puzzles{% endblock %}
|
||||
|
||||
{% block head_extra %}
|
||||
<style>
|
||||
dl { width: 210px; float:left; margin-right: 10px; }
|
||||
dt a { color:white; text-decoration: none; font-size:smaller; }
|
||||
img { height:200px; width: 200px; object-fit: cover; }
|
||||
dd .right { float:right; }
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block lists %}
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md">
|
||||
<div class="table-responsive">
|
||||
{% include "_scrobblable_list.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -79,6 +79,13 @@
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if Puzzle %}
|
||||
<h4>Puzzles</h4>
|
||||
{% with scrobbles=Puzzle count=Puzzle_count time=Puzzle_time %}
|
||||
{% include "scrobbles/_scrobble_table.html" %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
|
||||
{% if Book %}
|
||||
<h4>Books</h4>
|
||||
{% with scrobbles=Book count=Book_count time=Book_time %}
|
||||
|
||||
@ -40,11 +40,13 @@ from vrobbler.apps.profiles import urls as profiles_urls
|
||||
from vrobbler.apps.trails import urls as trails_urls
|
||||
from vrobbler.apps.beers import urls as beers_urls
|
||||
from vrobbler.apps.foods import urls as foods_urls
|
||||
from vrobbler.apps.puzzles import urls as puzzles_urls
|
||||
from vrobbler.apps.videogames import urls as videogame_urls
|
||||
from vrobbler.apps.videos import urls as video_urls
|
||||
from vrobbler.apps.videos.api.views import SeriesViewSet, VideoViewSet
|
||||
from vrobbler.apps.webpages import urls as webpages_urls
|
||||
#from vrobbler.apps.modern_ui import urls as modern_ui_urls
|
||||
|
||||
# from vrobbler.apps.modern_ui import urls as modern_ui_urls
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r"scrobbles", ScrobbleViewSet)
|
||||
@ -73,7 +75,7 @@ urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path("accounts/", include("allauth.urls")),
|
||||
path("o/", include(oauth2_urls)),
|
||||
#path("modern_ui/", include(modern_ui_urls, namespace="modern_ui")),
|
||||
# path("modern_ui/", include(modern_ui_urls, namespace="modern_ui")),
|
||||
path("", include(music_urls, namespace="music")),
|
||||
path("", include(book_urls, namespace="books")),
|
||||
path("", include(video_urls, namespace="videos")),
|
||||
@ -85,6 +87,7 @@ urlpatterns = [
|
||||
path("", include(trails_urls, namespace="trails")),
|
||||
path("", include(beers_urls, namespace="beers")),
|
||||
path("", include(foods_urls, namespace="foods")),
|
||||
path("", include(puzzles_urls, namespace="puzzles")),
|
||||
path("", include(tasks_urls, namespace="tasks")),
|
||||
path("", include(webpages_urls, namespace="webpages")),
|
||||
path("", include(podcast_urls, namespace="podcasts")),
|
||||
|
||||
Reference in New Issue
Block a user