46 lines
1.0 KiB
Python
46 lines
1.0 KiB
Python
from __future__ import absolute_import
|
|
|
|
import logging
|
|
|
|
from django import forms
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from common.forms import DetailForm
|
|
|
|
from .models import BootstrapSetup
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class BootstrapSetupForm(forms.ModelForm):
|
|
class Meta:
|
|
model = BootstrapSetup
|
|
widgets = {
|
|
'description': forms.widgets.Textarea(attrs={
|
|
'rows': 5, 'cols': 80,
|
|
}
|
|
)
|
|
}
|
|
|
|
|
|
class BootstrapSetupForm_view(DetailForm):
|
|
class Meta:
|
|
model = BootstrapSetup
|
|
widgets = {
|
|
'description': forms.widgets.Textarea(attrs={
|
|
'rows': 5, 'cols': 80,
|
|
}
|
|
)
|
|
}
|
|
|
|
class BootstrapSetupForm_edit(BootstrapSetupForm):
|
|
class Meta(BootstrapSetupForm.Meta):
|
|
model = BootstrapSetup
|
|
exclude = ('type',)
|
|
|
|
|
|
class BootstrapSetupForm_dump(BootstrapSetupForm):
|
|
class Meta(BootstrapSetupForm.Meta):
|
|
model = BootstrapSetup
|
|
exclude = ('fixture',)
|