示例#1
0
 def get(self):
     path = 'landing.html'
     template_values = {
         'is_member':
         True if 'member' in self.session else False,
         'headings': [
             'BEAGLES LOFT', 'BEAUTIFUL LOFTS', 'A GLOBAL COMMUNITY',
             'RENOWNED EXPERTS', 'FUN EVENTS'
         ],
         'sub_headings': [
             'DISCOVER YOUR INNER STARTUP', 'TO ELEVATE YOUR WORK',
             'TO TAKE PRIDE IN', 'WHO BELIEVE IN SHARING',
             'THAT MAKE WORK A BREEZE'
         ]
     }
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     template_values['services'] = Services.get_services()
     template_values['memberships'] = Memberships.get_memberships()
     template_values[
         'why_beaglesloft_centered'] = get_why_beaglesloft_centered_contents(
         )
     self.render_template(template_name=path,
                          template_values=template_values)
示例#2
0
 def get(self):
     template_values = {}
     template_values['paged_member_keys'] = Member.get_paged_member_keys()
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.render_template(template_name=None, template_values=template_values)
示例#3
0
 def get(self):
     template_values = {}
     newsletters = Newsletter.get_paged_newsletters()
     template_values['newsletters'] = newsletters
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.render_template(template_name='newsletters.html', template_values=template_values)
示例#4
0
 def get(self):
     redirect_url = self['redirect_url'] if self['redirect_url'] else '/community'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.render_template(template_name=None, template_values=template_values)
示例#5
0
 def get(self):
     template_values = {}
     experts = [expert._json for expert in Expert.all().fetch(100)]
     template_values['experts'] = experts
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.render_template(template_name='experts.html', template_values=template_values)
示例#6
0
 def get(self):
     template_values = {}
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     self.render_template(template_name='subscribe_newsletter.html',
                          template_values=template_values)
示例#7
0
 def get(self):
     path = 'create_newsletter.html'
     template_values = {}
     form_url = blobstore.create_upload_url('/api/common/save_newsletter')
     template_values['form_url'] = form_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.write(self.get_rendered_html(path, template_values), 200)
示例#8
0
 def get(self):
     template_values = {}
     upcoming_events, past_events = Event.get_paged_events()
     template_values['past_events'] = past_events
     template_values['upcoming_events'] = upcoming_events
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.render_template(template_name='events.html', template_values=template_values)
示例#9
0
 def get(self):
     redirect_url = self['redirect_url'] if self['redirect_url'] else '/experts/list'
     path = 'list_experts.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     template_values['experts'] = Expert.all().fetch(100)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#10
0
 def get(self):
     redirect_url = self['redirect_url'] if self['redirect_url'] else '/community'
     path = 'member_registration.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     template_values['managers'] = Manager.get_managers()
     self.write(self.get_rendered_html(path, template_values), 200)
示例#11
0
 def get(self):
     template_values = {}
     template_values['paged_member_keys'] = Member.get_paged_member_keys()
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     self.render_template(template_name=None,
                          template_values=template_values)
示例#12
0
 def get(self):
     redirect_url = self['redirect_url'] if self['redirect_url'] else '/experts'
     path = 'expert_registration.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     template_values['form_url'] = blobstore.create_upload_url('/api/members/experts/create')
     template_values['tracks'] = Track.all().fetch(50)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#13
0
 def get(self):
     path = 'landing.html'
     template_values = {'is_member': True if 'member' in self.session else False,
                        'headings':['BEAGLES LOFT', 'BEAUTIFUL LOFTS', 'A GLOBAL COMMUNITY', 'RENOWNED EXPERTS', 'FUN EVENTS'],
                        'sub_headings':['DISCOVER YOUR INNER STARTUP', 'TO ELEVATE YOUR WORK', 'TO TAKE PRIDE IN', 'WHO BELIEVE IN SHARING', 'THAT MAKE WORK A BREEZE']}
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     template_values['services'] = Services.get_services()
     template_values['memberships'] = Memberships.get_memberships()
     template_values['why_beaglesloft_centered'] = get_why_beaglesloft_centered_contents()
     self.render_template(template_name=path, template_values=template_values)
示例#14
0
 def get(self):
     path = 'create_newsletter.html'
     template_values = {}
     form_url = blobstore.create_upload_url('/api/common/save_newsletter')
     template_values['form_url'] = form_url
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     self.write(self.get_rendered_html(path, template_values), 200)
示例#15
0
 def get(self):
     template_values = {}
     newsletters = Newsletter.get_paged_newsletters()
     template_values['newsletters'] = newsletters
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     self.render_template(template_name='newsletters.html',
                          template_values=template_values)
示例#16
0
 def get(self):
     template_values = {}
     experts = [expert._json for expert in Expert.all().fetch(100)]
     template_values['experts'] = experts
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     self.render_template(template_name='experts.html',
                          template_values=template_values)
示例#17
0
 def get(self):
     redirect_url = self['redirect_url'] if self[
         'redirect_url'] else '/community'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     self.render_template(template_name=None,
                          template_values=template_values)
示例#18
0
 def get(self):
     redirect_url = self['redirect_url'] if self[
         'redirect_url'] else '/experts/list'
     path = 'list_experts.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     template_values['experts'] = Expert.all().fetch(100)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#19
0
 def get(self):
     redirect_url = self['redirect_url'] if self[
         'redirect_url'] else '/community'
     path = 'member_registration.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     template_values['managers'] = Manager.get_managers()
     self.write(self.get_rendered_html(path, template_values), 200)
示例#20
0
 def get(self):
     expert_id = self['id']
     expert = Expert.get_by_key_name(expert_id)
     redirect_url = self['redirect_url'] if self['redirect_url'] else '/experts/list'
     path = 'expert_edit.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     template_values['form_url'] = blobstore.create_upload_url('/api/members/update/expert')
     template_values['tracks'] = Track.all().fetch(50)
     template_values['expert'] = expert
     self.write(self.get_rendered_html(path, template_values), 200)
示例#21
0
 def get(self):
     path = 'create_event.html'
     ua = self.request.headers['User-Agent']
     b = reg_b.search(ua)
     v = reg_v.search(ua[0:4])
     template_values = {'ua' : 'non-mobile'}
     if b or v:
         template_values['ua'] = 'mobile'
     form_url = blobstore.create_upload_url('/api/events/save_event')
     template_values['form_url'] = form_url
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.write(self.get_rendered_html(path, template_values), 200)
示例#22
0
 def get(self):
     path = 'confirm_newsletter_subscription.html'
     email = self['email']
     fname = self['firstname']
     lname = self['lastname']
     template_values = {}
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     if not email:
         template_values['subscription_result'] = 'Error: Email not available'
     else:
         template_values['subscription_result'] = mailjet.subscribe(email,fname,lname)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#23
0
 def get(self):
     redirect_url = self['redirect_url'] if self[
         'redirect_url'] else '/experts'
     path = 'expert_registration.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     template_values['form_url'] = blobstore.create_upload_url(
         '/api/members/experts/create')
     template_values['tracks'] = Track.all().fetch(50)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#24
0
 def get(self):
     path = 'associate.html'
     template_values = {}
     template_values['form_url'] = '/api/common/save_association'
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     track_programs = []
     tracks = Track.all()
     for track in tracks:
         programs = Program.all().ancestor(track)
         track_programs.append((track, programs))
     template_values['track_programs'] = track_programs
     template_values['experts'] = Expert.all().fetch(50)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#25
0
 def get(self):
     path = 'search_event.html'
     ua = self.request.headers['User-Agent']
     b = reg_b.search(ua)
     v = reg_v.search(ua[0:4])
     template_values = {'ua' : 'non-mobile'}
     if b or v:
         template_values['ua'] = 'mobile'
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     event_types = {}
     event_types['VentureWednesdays'] = 'VENTURE WEDNESDAYS'
     event_types['ReDesign'] = 'RE: DESIGN'
     event_types['TechBuilders'] = 'TECH BUILDERS'
     template_values['event_types'] = event_types
     self.write(self.get_rendered_html(path, template_values), 200)
示例#26
0
 def get(self):
     path = 'associate.html'
     template_values = {}
     template_values['form_url'] = '/api/common/save_association'
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     track_programs = []
     tracks = Track.all()
     for track in tracks:
         programs = Program.all().ancestor(track)
         track_programs.append((track, programs))
     template_values['track_programs'] = track_programs
     template_values['experts'] = Expert.all().fetch(50)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#27
0
 def get(self):
     path = 'confirm_newsletter_subscription.html'
     email = self['email']
     fname = self['firstname']
     lname = self['lastname']
     template_values = {}
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     if not email:
         template_values[
             'subscription_result'] = 'Error: Email not available'
     else:
         template_values['subscription_result'] = mailjet.subscribe(
             email, fname, lname)
     self.write(self.get_rendered_html(path, template_values), 200)
示例#28
0
 def get(self):
     expert_id = self['id']
     expert = Expert.get_by_key_name(expert_id)
     redirect_url = self['redirect_url'] if self[
         'redirect_url'] else '/experts/list'
     path = 'expert_edit.html'
     template_values = {}
     template_values['redirect_url'] = redirect_url
     template_values[
         'is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(
             self.session['member'])
     template_values['form_url'] = blobstore.create_upload_url(
         '/api/members/update/expert')
     template_values['tracks'] = Track.all().fetch(50)
     template_values['expert'] = expert
     self.write(self.get_rendered_html(path, template_values), 200)
示例#29
0
 def get(self):
     template_values = {}
     template_values['is_member'] = True if 'member' in self.session else False
     if 'member' in self.session:
         template_values['member'] = Member.get_member_json(self.session['member'])
     self.render_template(template_name='subscribe_newsletter.html', template_values=template_values)