mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-04 14:16:21 +01:00
For when we might want to add syntax highlight ti it, which is a completely different can of worms though.
30 lines
648 B
Python
30 lines
648 B
Python
"""
|
|
Forms for custom_css app
|
|
"""
|
|
|
|
# Alliance Auth Custom CSS
|
|
from allianceauth.custom_css.models import CustomCSS
|
|
from allianceauth.custom_css.widgets import CssEditorWidget
|
|
|
|
# Django
|
|
from django import forms
|
|
|
|
|
|
class CustomCSSAdminForm(forms.ModelForm):
|
|
"""
|
|
Form for editing custom CSS
|
|
"""
|
|
|
|
class Meta:
|
|
model = CustomCSS
|
|
fields = ("css",)
|
|
widgets = {
|
|
"css": CssEditorWidget(
|
|
attrs={
|
|
"style": "width: 90%; height: 100%;",
|
|
"data-editor": "code-highlight",
|
|
"data-language": "css",
|
|
}
|
|
)
|
|
}
|