Exemplo n.º 1
0
 def do_add_application_message(self,app_id,title,message):
     venue = get_venue_or_none(app_id)
     news = VenueNews(
     venue = venue,
     created_date = datetime.datetime.now(),
     title = title,
     content = message
     )
     news.put()
     redirect('/app_communication?app_id='+app_id)
Exemplo n.º 2
0
 def create_dummy_data(self):
     db.delete(VenueOwner.all())
     db.delete(Venue.all())
     db.delete(VenueNews.all())
     
     vowner = VenueOwner(name="a b c", email="[email protected]")
     vowner.put()
     
     v = Venue(
         venue_code = "TORCHYSTACOS",
         name = "Torchy's Tacos",
         icon = "6cc8c151-f06d-4207-98d8-41456347e084",
         logo = "6cc8c151-f06d-4207-98d8-41456347e084",
         background = "http://www.torchystacos.com/images/pictures/torchys_dallas.jpg",
         owner = vowner,
         front_page_icons = "DEFAULT",
         our_story = "Torchy's tacos started with some guys who loved great tacos.",
         front_page_text = "Taco of the day is RanchHand, Mmmm.",
         is_front_page_news_enabled = True,
         is_social_info_visible = False,
         is_social_info_single_source = True,
         social_info_single_source = "@torchystacos",
         social_info_tags = "#torchystacos",
         recommendation_categories = ["Tacos"])
     v.put()
     
     v = Venue(
         venue_code = "JACKS",
         name = "Jack's Cafe and Bar",
         icon = None,
         logo = None,
         background = None,
         owner = vowner,
         front_page_icons = "DEFAULT",
         our_story = "A relaxing bar to go chill with pals",
         front_page_text = "Try our irish coffee! Get your day started off right",
         is_front_page_news_enabled = False,
         is_social_info_visible = False,
         is_social_info_single_source = False,
         social_info_single_source = "",
         social_info_tags = "",
         recommendation_categories = ["Drinks"])
     v.put()
     
     return "Dummy data created!"