Example #1
0
 def limited_list(self):
     '''Returns a limited list of the entries of a form as json.'''
     form_id = int(self.request.matchdict['form_id'])
     form = FormView(self.request)._get_form_if_belongs_to_user(form_id)
     page = int(self.request.matchdict['page'])
     limit = int(self.request.matchdict['limit'])
     # Get the entries
     entries = [e.to_dict() for e in entry.pagination(form.id, page, limit)]
     return entries
Example #2
0
 def limited_list(self):
     '''Returns a limited list of the entries of a form as json.'''
     form_id = int(self.request.matchdict['form_id'])
     form = FormView(self.request)._get_form_if_belongs_to_user(form_id)
     page = int(self.request.matchdict['page'])
     limit = int(self.request.matchdict['limit'])
     # Get the entries
     entries = [e.to_dict() for e in entry.pagination(form.id, page, limit)]
     return entries
Example #3
0
    def list(self):
        '''Displays a list of the entries of a form.'''
        form_id = int(self.request.matchdict['id'])
        form = FormView(self.request)._get_form_if_belongs_to_user(form_id)

        entries = [e.to_dict() for e in entry.pagination(form_id)]
        entries_json = safe_json_dumps(entries)
        return dict(form=form, form_id=form.id, entries_json=entries_json,
                    entries=form.entries,
                    pagetitle=_('Entries for {0}').format(form.name))
Example #4
0
    def list(self):
        '''Displays a list of the entries of a form.'''
        form_id = int(self.request.matchdict['id'])
        form = FormView(self.request)._get_form_if_belongs_to_user(form_id)

        entries = [e.to_dict() for e in entry.pagination(form_id)]
        entries_json = safe_json_dumps(entries)
        return dict(form=form,
                    form_id=form.id,
                    entries_json=entries_json,
                    entries=form.entries,
                    pagetitle=_('Entries for {0}').format(form.name))