mirror of
https://github.com/bratusev07/skb-market.git
synced 2026-12-05 05:09:44 +00:00
feat: auth, role and moderation logic added
This commit is contained in:
1 parent
1212dca845
commit
36b1341a10
14 files changed
+821
-175
No files matched your search
@@ -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"}
|
||||
),
|
||||
}
|
||||
Reference in new issue
Block a user