feat: auth, role and moderation logic added

This commit is contained in:
Денис Братусев committed 2026-10-29 16:31:04 +03:00
1 parent 1212dca845
commit 36b1341a10
14 files changed
+821 -175

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
from django import forms
from .models import Game
class GameCreateForm(forms.ModelForm):
class Meta:
model = Game
fields = [
"title",
"author_name",
"short_description",
"description",
"icon",
"file",
"version",
"unity_version",
"tags",
]
labels = {
"title": "Название приложения",
"author_name": "Автор / команда",
"short_description": "Краткое описание",
"description": "Полное описание",
"icon": "Иконка",
"file": "Архив приложения",
"version": "Версия приложения",
"unity_version": "Версия Unity",
"tags": "Теги",
}
widgets = {
"title": forms.TextInput(
attrs={"class": "form-control"}
),
"author_name": forms.TextInput(
attrs={"class": "form-control"}
),
"short_description": forms.Textarea(
attrs={"class": "form-control", "rows": 3}
),
"description": forms.Textarea(
attrs={"class": "form-control", "rows": 6}
),
"icon": forms.ClearableFileInput(
attrs={"class": "form-control"}
),
"file": forms.ClearableFileInput(
attrs={"class": "form-control"}
),
"version": forms.TextInput(
attrs={"class": "form-control"}
),
"unity_version": forms.TextInput(
attrs={"class": "form-control"}
),
"tags": forms.SelectMultiple(
attrs={"class": "form-select"}
),
}