Ejemplo n.º 1
0
 def get(self):
     user = users.get_current_user()
     human = human_username(user)
     if user:
         logout_url = users.create_logout_url('/')
     else:
         login_url = users.create_login_url('/')
     rooms = ROOM_OPTIONS
     self.response.out.write(template.render('templates/new.html', locals()))
Ejemplo n.º 2
0
 def get(self):
     user = users.get_current_user()
     human = human_username(user)
     if user:
         logout_url = users.create_logout_url('/')
     else:
         login_url = users.create_login_url('/')
     rooms = ROOM_OPTIONS
     rules = memcache.get("rules")
     if(rules is None):
       rules = urlfetch.fetch("http://wiki.hackerdojo.com/api_v2/op/GetPage/page/Event+Policies/_type/html", "GET").content
       memcache.add("rules", rules, 86400)
     self.response.out.write(template.render('templates/new.html', locals()))
Ejemplo n.º 3
0
 def get(self):
     user = users.get_current_user()
     human = human_username(user)
     if user:
         logout_url = users.create_logout_url('/')
     else:
         login_url = users.create_login_url('/')
     rooms = ROOM_OPTIONS
     rules = memcache.get("rules")
     if(rules is None):
       rules = urlfetch.fetch("http://wiki.hackerdojo.com/api_v2/op/GetPage/page/Event+Policies/_type/html", "GET").content      
       memcache.add("rules", rules, 86400)
     self.response.out.write(template.render('templates/new.html', locals()))
Ejemplo n.º 4
0
 def get(self):
     user = users.get_current_user()
     human = human_username(user)
     if user:
         logout_url = users.create_logout_url('/')
     else:
         login_url = users.create_login_url('/')
     rooms = ROOM_OPTIONS
     rules = memcache.get("rules")
     if(rules is None):
       try:
         rules = urlfetch.fetch("http://wiki.hackerdojo.com/api_v2/op/GetPage/page/Event+Policies/_type/html", "GET").content
         memcache.add("rules", rules, 86400)
       except Exception, e:
         rules = "Error fetching rules.  Please report this error to [email protected]."
Ejemplo n.º 5
0
 def get(self):
     user = users.get_current_user()
     human = human_username(user)
     if user:
         logout_url = users.create_logout_url('/')
     else:
         login_url = users.create_login_url('/')
     rooms = ROOM_OPTIONS
     rules = memcache.get("rules")
     if (rules is None):
         try:
             rules = urlfetch.fetch(
                 "http://wiki.hackerdojo.com/api_v2/op/GetPage/page/Event+Policies/_type/html",
                 "GET").content
             memcache.add("rules", rules, 86400)
         except Exception, e:
             rules = "Error fetching rules.  Please report this error to [email protected]."
Ejemplo n.º 6
0
def to_name_list(aList):
    sentence = ', '.join([human_username(e) for e in aList if aList.index(e) != len(aList) -1])
    if len(aList) > 1: sentence = '%s and %s' % (sentence, human_username(aList[-1]))
    return sentence
Ejemplo n.º 7
0
 def owner(self):
     return human_username(self.member)
Ejemplo n.º 8
0
 def owner(self):
     return human_username(self.member)