Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (4 - 6 of 121)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket Resolution Summary Owner Reporter
#168 invalid Appengine query models xi martinhoarantes@…

Reported by martinhoarantes@…, 4 years ago.

Description

Hi, I´m using Google Appengine, language Python. I´d like to know how to query a model.

I´m using this code, but the output is miserable:

class GerarYAML(webapp.RequestHandler):
    def post(self):
        user = users.get_current_user() 
        if user: 
            formacaos = models.Formacao().all()
            experiencias = models.Experiencia().all()
            investigacaos = models.Investigacao().all() 
            distribuicaos = models.Distribuicao().all()
            
            docentes = models.Docente.all()
            docentes.filter('user =', users.get_current_user())
            
            for docente in docentes:
                for formacao in formacaos:
                    for experiencia in experiencias:
                        for investigacao in investigacaos:
                            for distribuicao in distribuicaos:
                                formacao.docente = docente.key()
    
                                'Nome: %s' % (docente.nome)
                                'Apelido: %s' % (docente.apelido)
                                'Unidade: %s' % (docente.unidade)
                                'Categoria: %s' % (docente.categoria)
                                'Regime: %s' % (docente.regime)
                                  
                                'Formacao: %s' % (formacao.formAno)
                                'Grau de Formacao: %s' % (formacao.formGrau)
                                'Area de Formacao: %s' % (formacao.formArea)
                                'Instituicao Academica: %s' % (formacao.formInstituicao)
                                'Classificacao Final: %s' % (formacao.formClassificacao)
                        
                                yaml.dump(docente, sys.stdout)
                                yaml.dump(formacao, sys.stdout)  
                                yaml.dump(experiencia, sys.stdout)
                                yaml.dump(investigacao, sys.stdout)
                                yaml.dump(distribuicao, sys.stdout)  
    
    
                                self.response.headers['Content-Type'] = 'application/yaml'
                                self.response.headers['Content-Disposition'] = 'filename = my.yaml'

Can someone point out, how can i solve this issue?

I´d like to download a file automatically when user submit a button with .yaml format and more or less formatted.

#122 wontfix Bool tag doesn't accept all defined variants xi anonymous

Reported by anonymous, 6 years ago.

Description

One of the examples listed at  http://yaml.org/type/bool.html will fail:

>>> yaml.load('!!bool y')
Traceback (most recent call last):
 ...
KeyError: u'y'
#94 fixed Can't install pyyaml with easy_install on Mac OS X xi Stephen.Pascoe@…

Reported by Stephen.Pascoe@…, 6 years ago.

Description

Just thought I'd try out YAML on my Mac and did

$ easy_install PyYaml
...
unable to execute gcc: No such file or directory
libyaml appears not to be installed
(if libyaml is installed, you may need to specify
 the option --include-dirs or uncomment and modify
 the parameter include_dirs in setup.cfg)

If I want to use YAML in my projects easy_install is pretty much essential.

I don't know whether it works if gcc or libyaml is installed.

1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.