Exemplo n.º 1
0
 def edit(self, id=0):
     soft_id = id
     if soft_id == 0:
         #soft_id = self.form_result.get('software_id')
         redirect(url(controller="mobile", action="index"))
     soft = Session.query(Software).filter(Software.id == soft_id).first()
     if not soft is None:
         c.soft = soft
         return render('/mobile/edit.html')
Exemplo n.º 2
0
 def edit(self, id=0):
     soft_id = id
     if soft_id == 0:
         #soft_id = self.form_result.get('software_id')
         redirect(url(controller="mobile", action="index"))        
     soft = Session.query(Software).filter(Software.id == soft_id).first()
     if not soft is None:            
         c.soft = soft
         return render('/mobile/edit.html')        
Exemplo n.º 3
0
 def login(self):
     """
     This is where the login form should be rendered.
     Without the login counter, we won't be able to tell if the user has
     tried to log in with wrong credentials
     """
     identity = request.environ.get('repoze.who.identity')
     return_url = str(request.GET.get('return_url', '')) or \
                 url(controller='member', action='welcome')
     if identity:
         redirect(url(controller='member', action='welcome'))
     else:
         c.return_url = return_url
         #c.login_counter = request.environ['repoze.who.logins'] + 1
         return render('/member/login.html')
Exemplo n.º 4
0
 def login(self):
     """
     This is where the login form should be rendered.
     Without the login counter, we won't be able to tell if the user has
     tried to log in with wrong credentials
     """
     identity = request.environ.get('repoze.who.identity')
     came_from = str(request.GET.get('came_from', '')) or \
                 url(controller='account', action='welcome')
     if identity:
         redirect(url(came_from))
     else:
         c.came_from = came_from
         c.login_counter = request.environ['repoze.who.logins'] + 1
         return render('/derived/account/login.html')
Exemplo n.º 5
0
 def doeditX(self, id=0):
     schema = NewSoftwareForm()
     try:
         c.form_result = schema.to_python(dict(request.params))
     except formencode.Invalid, error:
         c.form_result = error.value
         c.form_errors = error.error_dict or {}
         soft_id = id
         if soft_id == 0:
             redirect(url(controller="mobile", action="index"))        
         soft = Session.query(Software).filter(Software.id == soft_id).first()
         #if not soft is None:            
         c.soft = soft
         html = render('/mobile/edit.html')
         return htmlfill.render(
             html,
             defaults=c.form_result,
             errors=c.form_errors
             #auto_error_formatter=self.custom_formatter
         )
Exemplo n.º 6
0
 def doeditX(self, id=0):
     schema = NewSoftwareForm()
     try:
         c.form_result = schema.to_python(dict(request.params))
     except formencode.Invalid, error:
         c.form_result = error.value
         c.form_errors = error.error_dict or {}
         soft_id = id
         if soft_id == 0:
             redirect(url(controller="mobile", action="index"))
         soft = Session.query(Software).filter(
             Software.id == soft_id).first()
         #if not soft is None:
         c.soft = soft
         html = render('/mobile/edit.html')
         return htmlfill.render(html,
                                defaults=c.form_result,
                                errors=c.form_errors
                                #auto_error_formatter=self.custom_formatter
                                )
Exemplo n.º 7
0
Arquivo: admin.py Projeto: feilaoda/kd
 def new_software(self): 
     return render("/admin/new_software.html")
Exemplo n.º 8
0
Arquivo: admin.py Projeto: feilaoda/kd
 def index(self):
     # Return a rendered template
     #return render('/admin.mako')
     # or, return a string
     return render('/admin/index.html')
Exemplo n.º 9
0
 def _editform(self, id=0):
     return render('/mobile/editform.html')
Exemplo n.º 10
0
 def add(self):
     return render('/mobile/add.html')
Exemplo n.º 11
0
 def detail(self):
     return render('/market/detail.html')
Exemplo n.º 12
0
 def detail(self):
     return render('/market/detail.html')
Exemplo n.º 13
0
Arquivo: home.py Projeto: feilaoda/kd
 def info(self):
     return render('/home/info.html')
Exemplo n.º 14
0
 def index(self):
     # Return a rendered template
     #return render('/market.mako')
     # or, return a string
     return render('/market/index.html')
Exemplo n.º 15
0
    def category(self, what=None):

        return render('/market/category.html')
Exemplo n.º 16
0
 def new_software(self):
     return render("/admin/new_software.html")
Exemplo n.º 17
0
 def index(self):
     # Return a rendered template
     #return render('/admin.mako')
     # or, return a string
     return render('/admin/index.html')
Exemplo n.º 18
0
 def index(self):
     # Return a rendered template
     #return render('/market.mako')
     # or, return a string
     return render('/market/index.html')
Exemplo n.º 19
0
 def index(self):
     return render('/member/index.html')
Exemplo n.º 20
0
 def _editform(self, id=0):
     return render('/mobile/editform.html')   
Exemplo n.º 21
0
 def register(self):
     return render('/member/register.html')
Exemplo n.º 22
0
 def register(self):
     return render('/member/register.html')
Exemplo n.º 23
0
 def index(self):
     softq = Session.query(Software).limit(100)
     c.softs = softq       
     return render('/mobile/index.html')
Exemplo n.º 24
0
Arquivo: home.py Projeto: feilaoda/kd
 def info(self):
     return render('/home/info.html')
Exemplo n.º 25
0
 def index(self):
     softq = Session.query(Software).limit(100)
     c.softs = softq
     return render('/mobile/index.html')
Exemplo n.º 26
0
 def category(self, what=None):
     
     return render('/market/category.html')
Exemplo n.º 27
0
 def add(self):
     return render('/mobile/add.html')
Exemplo n.º 28
0
 def index(self):
     return render('/member/index.html')