Kaynağa Gözat

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

OstwaldAnna 1 yıl önce
ebeveyn
işleme
fc86136558
2 değiştirilmiş dosya ile 9 ekleme ve 14 silme
  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%"}})