CDRResourceExtra   A
last analyzed

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 52
rs 10
1
# Copyright 2013 Mathias WOLFF
2
# This file is part of pyfreebilling.
3
#
4
# pyfreebilling is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
8
#
9
# pyfreebilling is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with pyfreebilling.  If not, see <http://www.gnu.org/licenses/>
16
17
from import_export import resources
18
19
from .models import CDR
20
21
22
class CDRResourceExtra(resources.ModelResource):
23
24
    class Meta:
25
        model = CDR
26
        exclude = ('id',
27
                   'country',
28
                   'uuid',
29
                   'bleg_uuid',
30
                   'chan_name',
31
                   'answered_stamp',
32
                   'end_stamp',
33
                   'duration',
34
                   'effeciv_duration',
35
                   'total_cost',
36
                   'cost_rate',
37
                   'gateway',
38
                   'ratecard_id',
39
                   'lcr_carrier_id',
40
                   'lcr_group_id',
41
                   'sip_rtp_rxstat',
42
                   'sip_rtp_txstat',
43
                   'switchname',
44
                   'switch_ipv4',
45
                   'cost_destination',
46
                   'hangup_disposition',
47
                   'sip_hangup_cause')
48
        fields = ('customer__name',
49
                  'caller_id_number',
50
                  'destination_number',
51
                  'start_stamp',
52
                  'billsec',
53
                  'prefix',
54
                  'sell_destination',
55
                  'rate',
56
                  'init_block',
57
                  'block_min_duration',
58
                  'total_sell',
59
                  'customer_ip',
60
                  'sip_user_agent')
61
        export_order = ('customer__name',
62
                        'caller_id_number',
63
                        'destination_number',
64
                        'start_stamp',
65
                        'billsec',
66
                        'prefix',
67
                        'sell_destination',
68
                        'rate',
69
                        'init_block',
70
                        'block_min_duration',
71
                        'total_sell',
72
                        'customer_ip',
73
                        'sip_user_agent')
74