예제 #1
0
파일: mobile.py 프로젝트: feilaoda/kd
 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')
예제 #2
0
파일: mobile.py 프로젝트: feilaoda/kd
 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')        
예제 #3
0
파일: member.py 프로젝트: feilaoda/kd
 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')
예제 #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')
예제 #5
0
파일: mobile.py 프로젝트: feilaoda/kd
 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
         )
예제 #6
0
파일: mobile.py 프로젝트: feilaoda/kd
 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
                                )
예제 #7
0
파일: admin.py 프로젝트: feilaoda/kd
 def new_software(self): 
     return render("/admin/new_software.html")
예제 #8
0
파일: admin.py 프로젝트: feilaoda/kd
 def index(self):
     # Return a rendered template
     #return render('/admin.mako')
     # or, return a string
     return render('/admin/index.html')
예제 #9
0
파일: mobile.py 프로젝트: feilaoda/kd
 def _editform(self, id=0):
     return render('/mobile/editform.html')
예제 #10
0
파일: mobile.py 프로젝트: feilaoda/kd
 def add(self):
     return render('/mobile/add.html')
예제 #11
0
파일: market.py 프로젝트: feilaoda/kd
 def detail(self):
     return render('/market/detail.html')
예제 #12
0
 def detail(self):
     return render('/market/detail.html')
예제 #13
0
파일: home.py 프로젝트: feilaoda/kd
 def info(self):
     return render('/home/info.html')
예제 #14
0
 def index(self):
     # Return a rendered template
     #return render('/market.mako')
     # or, return a string
     return render('/market/index.html')
예제 #15
0
    def category(self, what=None):

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