def jsonify_invoices(data_dict): invoices_list = [] for invoice in data_dict['invoices']: invoices_list.append(jsonify_invoice(invoice)) return jsonify(invoices=invoices_list, access_token=data_dict['order'].access_token, states=[{'name': state['name'], 'code': state['short_code_text']} for state in sorted(indian_states, key=lambda k: k['name'])], countries=[{'name': name, 'code': code} for code, name in localized_country_list()])
def set_queries(self): self.place_supply_state_code.choices = [(0, '')] + [ (state['short_code'], state['name']) for state in sorted(indian_states, key=lambda k: k['name']) ] self.place_supply_country_code.choices = [('', '') ] + localized_country_list()
def set_queries(self): self.place_supply_state_code.choices = [(0, '')] + [ (state['short_code'], state['name']) for state in sorted(indian_states, key=lambda k: k['name']) ] self.place_supply_country_code.choices = [('', '')] + localized_country_list() self.category.query = ( Category.query.join(ItemCollection) .filter(Category.item_collection == self.edit_parent) .options(db.load_only('id', 'title')) )
def render_boxoffice_js(): return render_template( 'boxoffice.js.jinja2', base_url=request.url_root.rstrip('/'), razorpay_key_id=app.config['RAZORPAY_KEY_ID'], states=[ {'name': state['name'], 'code': state['short_code_text']} for state in sorted(indian_states, key=lambda k: k['name']) ], countries=[ {'name': name, 'code': code} for code, name in localized_country_list() ], )
def jsonify_invoices(data_dict): invoices_list = [] for invoice in data_dict['invoices']: invoices_list.append(jsonify_invoice(invoice)) return jsonify( invoices=invoices_list, access_token=data_dict['order'].access_token, states=[{ 'name': state['name'], 'code': state['short_code_text'] } for state in sorted(indian_states, key=lambda k: k['name'])], countries=[{ 'name': name, 'code': code } for code, name in localized_country_list()])
def locale_testview(): country_list = localized_country_list() return dict(country_list)['DE']
def set_queries(self): self.place_supply_country_code.choices = [('', '')] + localized_country_list()
def set_queries(self): self.place_supply_country_code.choices = [('', '')] + localized_country_list() self.category.query = Category.query.join(ItemCollection).filter( Category.item_collection == self.edit_parent).options(db.load_only('id', 'title'))