mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	PEP cleanup
This commit is contained in:
		| @@ -177,39 +177,6 @@ class SetPasswordForm(HelperForm): | ||||
|         ] | ||||
|  | ||||
|  | ||||
| class ColorThemeSelectForm(forms.ModelForm): | ||||
|     """ Form for setting color theme """ | ||||
|  | ||||
|     name = forms.ChoiceField(choices=(), required=False) | ||||
|  | ||||
|     class Meta: | ||||
|         model = ColorTheme | ||||
|         fields = [ | ||||
|             'name' | ||||
|         ] | ||||
|  | ||||
|     def __init__(self, *args, **kwargs): | ||||
|         super(ColorThemeSelectForm, self).__init__(*args, **kwargs) | ||||
|  | ||||
|         # Populate color themes choices | ||||
|         self.fields['name'].choices = ColorTheme.get_color_themes_choices() | ||||
|  | ||||
|         self.helper = FormHelper() | ||||
|         # Form rendering | ||||
|         self.helper.form_show_labels = False | ||||
|         self.helper.layout = Layout( | ||||
|             Div( | ||||
|                 Div(Field('name'), | ||||
|                     css_class='col-sm-6', | ||||
|                     style='width: 200px;'), | ||||
|                 Div(StrictButton(_('Apply Theme'), css_class='btn btn-primary', type='submit'), | ||||
|                     css_class='col-sm-6', | ||||
|                     style='width: auto;'), | ||||
|                 css_class='row', | ||||
|             ), | ||||
|         ) | ||||
|  | ||||
|  | ||||
| class SettingCategorySelectForm(forms.ModelForm): | ||||
|     """ Form for setting category settings """ | ||||
|  | ||||
|   | ||||
| @@ -31,7 +31,7 @@ from users.models import check_user_role, RuleSet | ||||
| import InvenTree.tasks | ||||
|  | ||||
| from .forms import DeleteForm, EditUserForm, SetPasswordForm | ||||
| from .forms import ColorThemeSelectForm, SettingCategorySelectForm | ||||
| from .forms import SettingCategorySelectForm | ||||
| from .helpers import str2bool | ||||
|  | ||||
| from rest_framework import views | ||||
|   | ||||
		Reference in New Issue
	
	Block a user