Add model previews and shared slicer tips
This commit is contained in:
1 parent
619f9c200b
commit
b3b775b196
14 files changed
+736
-7
No files matched your search
@@ -15,6 +15,7 @@ from .models import (
|
||||
ProductType,
|
||||
SharedModel,
|
||||
SharingPreferences,
|
||||
SlicerTip,
|
||||
Variant,
|
||||
)
|
||||
|
||||
@@ -59,6 +60,16 @@ class SharedModelUploadForm(SharedModelForm):
|
||||
return upload
|
||||
|
||||
|
||||
class SlicerTipForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = SlicerTip
|
||||
fields = ["title", "text"]
|
||||
widgets = {"text": forms.Textarea(attrs={"rows": 5})}
|
||||
help_texts = {
|
||||
"text": "Bis zu 1.000 Zeichen. Nenne bei Bedarf Slicer, Material und Einstellwert."
|
||||
}
|
||||
|
||||
|
||||
class PrinterForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Printer
|
||||
|
||||
Reference in new issue
Block a user