Export postalcode_info
parent
5a0f32e291
commit
fb04881aa3
|
@ -83,7 +83,10 @@ class FaceshieldRequestAdmin(ModelView):
|
|||
'adapter_rd40_dar_required', 'adapter_rd40_dar_delivered',
|
||||
'adapter_secura_dar_required', 'adapter_secura_dar_delivered',
|
||||
'handling_orga',
|
||||
'created', 'ua', 'ip', 'status', 'remarks',
|
||||
'created',
|
||||
# nie dla psa x-D
|
||||
# 'ua', 'ip',
|
||||
'status', 'remarks',
|
||||
'parent_id',
|
||||
'shipping_name', 'shipping_street', 'shipping_postalcode', 'shipping_city',
|
||||
'shipping_latitude', 'shipping_longitude', 'shipping_provider', 'shipping_id',
|
||||
|
@ -124,9 +127,7 @@ class FaceshieldRequestAdmin(ModelView):
|
|||
details_modal = True
|
||||
can_set_page_size = True
|
||||
|
||||
@property
|
||||
def can_export(self):
|
||||
return not current_user.external
|
||||
can_export = True
|
||||
|
||||
@flask_admin.expose('/label/')
|
||||
def label(self):
|
||||
|
|
|
@ -27,6 +27,8 @@ class PostalCode(db.Model):
|
|||
city = db.Column(db.String, nullable=False)
|
||||
voivodeship = db.Column(db.String, nullable=False)
|
||||
county = db.Column(db.String, nullable=False)
|
||||
def __str__(self):
|
||||
return '{}/{}/{}/{}'.format(self.postalcode, self.city, self.county, self.voivodeship)
|
||||
|
||||
|
||||
class FaceshieldRequest(db.Model):
|
||||
|
|
Loading…
Reference in New Issue