예제 #1
0
파일: main.py 프로젝트: edrijver/sps
 def post(self):
     try:
         domain_id = self.request.get('domain')
         title = self.request.get('title')
     except (TypeError, ValueError):
         self.error(403)
         return
     user = api.get_user()
     domain = api.create_domain(domain_id, title, user)
     if not domain:
         self.response.out.write("Could not create domain")
         return
     self.response.out.write("Created domain '%s'" % domain.key().name())
예제 #2
0
파일: main.py 프로젝트: edrijver/sps
 def post(self):
     try:
         domain_id = self.request.get('domain')
         title = self.request.get('title')
     except (TypeError, ValueError):
         self.error(403)
         return
     user = api.get_user()
     domain = api.create_domain(domain_id, title, user)
     if not domain:
         self.response.out.write("Could not create domain")
         return
     self.response.out.write("Created domain '%s'" % domain.key().name())
예제 #3
0
파일: main.py 프로젝트: edrijver/sps
 def post(self):
     try:
         domain_id = self.request.get('domain')
         title = self.request.get('title')
     except (TypeError, ValueError):
         self.error(403)
         return
     user = api.get_user()
     domain = api.create_domain(domain_id, title, user)
     if not domain:
         self.response.out.write("Could not create domain")
         return
     session = Session(writer='cookie',
                       wsgiref_headers=self.response.headers)
     add_message(session, "Created domain '%s'" % domain.key().name())
     self.redirect('/d/%s/' % domain.key().name())
예제 #4
0
파일: main.py 프로젝트: troberti/sps
 def post(self):
     try:
         domain_id = self.request.get('domain')
         title = self.request.get('title')
     except (TypeError, ValueError):
         self.error(403)
         return
     user = api.get_logged_in_user()
     domain = api.create_domain(domain_id, title, user)
     if not domain:
         self.response.out.write("Could not create domain")
         return
     session = Session(writer='cookie',
                       wsgiref_headers=self.response.headers)
     add_message(session, "Created domain '%s'" % domain.key().name())
     self.redirect('/d/%s/' % domain.key().name())