diff --git a/CHANGELOG.md b/CHANGELOG.md index 7499672..1ac4a6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,3 +2,4 @@ * Hide navigation bar items if there are no games/purchases/sessions * Set default version to "git-main" to indicate development environment * Add homepage, link to it from the logo +* Make it possible to add a new platform diff --git a/src/web/tracker/forms.py b/src/web/tracker/forms.py index ad35efd..13f0165 100644 --- a/src/web/tracker/forms.py +++ b/src/web/tracker/forms.py @@ -1,5 +1,5 @@ from django import forms -from .models import Session, Purchase, Game +from .models import Session, Purchase, Game, Platform class SessionForm(forms.ModelForm): @@ -24,3 +24,9 @@ class GameForm(forms.ModelForm): class Meta: model = Game fields = ["name", "wikidata"] + + +class PlatformForm(forms.ModelForm): + class Meta: + model = Platform + fields = ["name", "group"] diff --git a/src/web/tracker/templates/base.html b/src/web/tracker/templates/base.html index 495b840..dcd7d4a 100644 --- a/src/web/tracker/templates/base.html +++ b/src/web/tracker/templates/base.html @@ -23,6 +23,7 @@