def index(): about = About.get_master_db() about_info = about.short_info galleries = Gallery.query(Gallery.is_public==True).order(-Gallery.created) images = [] for gallery in galleries: for img in gallery.images: if len(images) >= 4: break images.append(img) excursions = ExcursionType.query(ExcursionType.is_public == True).count() hotels = Region.query(Region.is_public == True).count() exhibition_info = ExhibitionInfo.get_master_db().is_public investments = InvestmentInfo.get_master_db().is_public tenancy = TenancyInfo.get_master_db().is_public coach = CoachInfo.get_master_db().is_public soc_widgets = SocWidget.query(SocWidget.is_public == True) return render_template( 'main_page/index.html', html_class='main_page', about=about_info, gallery=images, hotels=hotels, exhibition_info=exhibition_info, excursions=excursions, investments=investments, tenancy=tenancy, coach=coach, soc_widgets=soc_widgets )
def index(): investment_info = InvestmentInfo.get_master_db() form = InvestmentInfoForm(obj=investment_info) if request.method == 'POST' and form.validate_on_submit(): form.populate_obj(investment_info) investment_info.put() return redirect(url_for('investment.admin.index')) return render_template( 'investment/admin/index.html', form=form )
def index(): investment_info = InvestmentInfo.get_master_db() investments = Investment.query(Investment.is_public == True).order(Investment.order_id) tenancy_info = TenancyInfo.get_master_db() tenancies = Tenancy.query(Tenancy.is_public == True).order(Tenancy.order_id) employees = Employee.query(Employee.is_investment == True) return render_template( 'investment/index.html', html_class='services_page', investment_info=investment_info, investments=investments, tenancy_info=tenancy_info, tenancies=tenancies, employees=employees, active_element='investment' )
def get_services_side(active_element=None): excursions = ExcursionType.query(ExcursionType.is_public == True).order(ExcursionType.order_id) regions = Region.query(Region.is_public == True).order(Region.order_id) exhibition = ExhibitionInfo.get_master_db() exhibition = exhibition.description and exhibition.is_public investments = InvestmentInfo.get_master_db().is_public or TenancyInfo.get_master_db().is_public coach = CoachInfo.get_master_db().is_public return render_template( "j_env/services_side.html", excursions=excursions, regions=regions, exhibition=exhibition, investments=investments, coach=coach, active_element=active_element, )