tables.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import django_tables2 as tables
  2. from webservice_running.models import *
  3. from webservice_running.models import OrdersLocal
  4. class OrderList(tables.Table):
  5. id = tables.Column(attrs={"td":{"width":"5%"}})
  6. name_order = tables.Column(verbose_name=('Экскурсия'))
  7. price = tables.Column(verbose_name=('Цена'))
  8. edit = tables.LinkColumn('order_reg/edit/', verbose_name='', orderable=False, text = "E",
  9. args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"edit_col"}})
  10. delete = tables.LinkColumn('order_reg/delete/', verbose_name='', orderable=False, text = "D",
  11. args=[tables.A('pk')], attrs={'th':{'scope':'col'}, "td":{"class":"delete_col"}})
  12. class Meta:
  13. model = OrdersLocal
  14. attrs = {"class": "table table-layout-fixed"}
  15. exclude = ('rating_id',
  16. 'resource_id',
  17. 'order_synced',
  18. 'payment_transaction_id',
  19. 'attempts',
  20. 'order_place_type',
  21. 'order_place_start',
  22. #'is_with_payment_document',
  23. #'asap',
  24. 'comment',
  25. 'guide_type',
  26. 'numb_of_people',
  27. #'due_date',
  28. 'is_global',
  29. 'is_visible',
  30. 'place_start',
  31. 'place_end',
  32. 'movement_way',
  33. 'discription')