Add backlogger app at /backlogger/ with login protection
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Django app with Item model (games/books/films/other categories), CRUD
views, and login-required access. Login page at /accounts/login/ uses
custom dark-themed template consistent with the site design.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 22:18:32 +03:00
parent 62bb86f11d
commit a8ab5f6ce1
14 changed files with 825 additions and 0 deletions

39
backlogger/models.py Normal file
View File

@@ -0,0 +1,39 @@
from django.db import models
class Item(models.Model):
GAMES = 'games'
BOOKS = 'books'
FILMS = 'films'
OTHER = 'other'
CATEGORY_CHOICES = [
(GAMES, 'Games'),
(BOOKS, 'Books'),
(FILMS, 'Films'),
(OTHER, 'Other'),
]
category = models.CharField(max_length=10, choices=CATEGORY_CHOICES)
name = models.CharField(max_length=200)
progress_percent = models.FloatField(default=0.0)
favorite = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
# Games
hours_played = models.FloatField(null=True, blank=True)
total_hours = models.FloatField(null=True, blank=True)
# Books
pages_read = models.IntegerField(null=True, blank=True)
total_pages = models.IntegerField(null=True, blank=True)
# Films
watched = models.BooleanField(null=True, blank=True)
duration_minutes = models.IntegerField(null=True, blank=True)
class Meta:
ordering = ['-favorite', 'name']
def __str__(self):
return f"{self.get_category_display()}: {self.name}"