浏览代码

Дополняла поля

OstwaldAnna 1 年之前
父节点
当前提交
fc86136558
共有 2 个文件被更改,包括 9 次插入14 次删除
  1. 3 11
      SharixAdmin/forms.py
  2. 6 3
      SharixAdmin/tables.py

+ 3 - 11
SharixAdmin/forms.py

@@ -27,14 +27,10 @@ class PartnerInformationUpdateForm(forms.ModelForm):
 
     class Meta:
         model = Company
-        fields = ['legal_name', 'address', 'repr_id']
+        fields = ['legal_name', 'address', 'repr_id' ]
         widgets = {
-            # 'status': forms.TextInput(attrs={'readonly': True}),
-            # 'ticket_status': forms.TextInput(attrs={'readonly': True}),
-            
-            # 'servicetype_id': forms.Select(attrs={'class': 'form-select'}),
+            'description': forms.Select(attrs={'class': 'form-select'}),
             'repr_id': forms.Select(attrs={'class': 'form-select'}),
-            # 'resource_id': forms.Select(attrs={'class': 'form-select'}),
         }
         
 class PartnerInformationCreateForm(forms.ModelForm):
@@ -45,15 +41,11 @@ class PartnerInformationCreateForm(forms.ModelForm):
             if 'class' not in self.fields[field].widget.attrs:
                 self.fields[field].widget.attrs.update({'class':'form-control'})
                 
-    # legal_name = forms.CharField(label = "Название",
-    #     widget=forms.TextInput(attrs={'class':'form-control'}))
     class Meta:
         model = Company
         fields = ['legal_name', 'address', 'repr_id']
         
         widgets = {
-            # 'servicetype_id': forms.Select(attrs={'class': 'form-select'}),
+            'description': forms.Select(attrs={'class': 'form-select'}),
             'repr_id': forms.Select(attrs={'class': 'form-select'}),
-            # 'resource_id': forms.Select(attrs={'class': 'form-select'}),
-            # 'ticket_status': forms.Select(attrs={'class': 'form-select'}),
         }

+ 6 - 3
SharixAdmin/tables.py

@@ -29,10 +29,13 @@ class TransactionsWalletTable(tables.Table):
 class ServiceTable(tables.Table):
 
     id = tables.Column(verbose_name='ID', attrs={"td":{"width":"5%"}})
-    servicetype_id = tables.Column(verbose_name='Название тарифа', accessor = 'servicetype_id.caption',
+    servicetype_id = tables.Column(verbose_name='Описание услуги (сервиса)', accessor = 'servicetype_id.caption',
         attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
-    # servicetype_id = tables.Column(verbose_name='Название тарифа', accessor = 'servicetype_id.description',
-    #     attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
+    
+    # description = tables.Column(verbose_name='Название тарифа', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
+    # description = tables.Column(verbose_name='Описание строки тарифов', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
+    # price_type = tables.Column(verbose_name='Тип тарифа', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
+    
     price_km = tables.Column(verbose_name='Стоимость км.', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
     price_min = tables.Column(verbose_name='Стоимость мин.', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})
     price_amount = tables.Column(verbose_name='Стоимость услуги', attrs={'th':{'scope':'col'}, "td":{"width":"20%"}})