Hi,
  I don't really understand what you're asking for here.  You're
putting each entity into a table row, yet you want them to list on one
line?  Could you provide a simple example of what you're wanting and
what you're actually getting?

  I'm wondering if this is not an app engine question, but more of a
general html question?



Robert




On Wed, Jan 25, 2012 at 16:53, LostMind <[email protected]> wrote:
> good evening,
> i'm working  in a experimental site, and it's my first project. I need some
> help to achieve what I intend. I'm using five classes, Processo,
> Empreiteiro, Proprietário, Requerente and Consulta, all of them in diferent
> webpages. In the first four, I have forms where I insert, edit, delete and
> show the data that I inserted. In classe Consulta I just intend to show , in
> a table, some of the inserted data in the previous classes. The problem is,
> when I open the Consulta webpage it shows me the data that I have called
> from the other classes but in diferent lines, when I want to join all of
> them in just one line. It's that possible? here's some code... Thanks for
> your help.
>
> [code]
> class Consulta(polymodel.PolyModel):
>  local_da_obra = db.StringProperty()
>  freguesia = db.StringProperty()
>  concelho = db.StringProperty()
>  codigo_postal = db.StringProperty()
>  numero_processo = db.StringProperty()
>  data_registo = db.StringProperty()
>  bi = db.StringProperty()
>  created = db.DateTimeProperty(auto_now_add=True)
>
>
> # Classe Processo - Ficha de Contacto
> class Processo(Consulta):
>  numero_conservatoria = db.StringProperty()
>  numero_registo = db.StringProperty()
>  tecnico = db.StringProperty()
>  numero_tecnico = db.StringProperty()
>  telefone_tecnico = db.StringProperty()
>
>
> class Requerente(Consulta):
>  nome_req = db.StringProperty()
>  morada_req = db.StringProperty()
>  freguesia_req = db.StringProperty()
>  concelho_req = db.StringProperty()
>  codigo_postal_req = db.StringProperty()
>  telefone_req = db.StringProperty()
>  telemovel_req = db.StringProperty()
>  nif_req = db.StringProperty()
>  bi_req = db.StringProperty()
>  email_req = db.StringProperty()
>
> class Proprietario(Consulta):
>  nome_prop = db.StringProperty()
>  morada_prop = db.StringProperty()
>  freguesia_prop = db.StringProperty()
>  concelho_prop = db.StringProperty()
>  codigo_postal_prop = db.StringProperty()
>  telefone_prop = db.StringProperty()
>  telemovel_prop = db.StringProperty()
>  nif_prop = db.StringProperty()
>  bi_prop = db.StringProperty()
>  email_prop = db.StringProperty()
>
> class Empreiteiro(Consulta):
>  empresa = db.StringProperty()
>  morada_emp = db.StringProperty()
>  freguesia_emp = db.StringProperty()
>  concelho_emp = db.StringProperty()
>  codigo_postal_emp = db.StringProperty()
>  telefone_emp = db.StringProperty()
>  telemovel_emp = db.StringProperty()
>  nif_emp = db.StringProperty()
>  alvara_emp = db.StringProperty()
>  email_emp = db.StringProperty()
>
> [/code]
>
> [code]
> class ListaConsultasPage(webapp.RequestHandler):
>  def get(self):
>   user = users.get_current_user()
>   url = users.create_login_url(self.request.uri)
>   url_linktext = 'Login'
>   # para o caso de estar logado
>   if users.get_current_user():
>    url = users.create_logout_url(self.request.uri)
>    url_linktext = 'Logout'
>
>   # seleciona os dados (neste caso todos ... +-)
>   consultas_query = Consulta.all()
>   consultas = consultas_query.fetch(99999)
>
>   # valores que carrega para a pagina
>   values = {
>    'consultas': consultas,
>    'numConsultas' : len(consultas),
>    'user': user,
>    'url': url,
>    'url_linktext': url_linktext,
>   }
>
>   path = os.path.join(os.path.dirname(__file__), 'listaConsultas.html')
>   self.response.out.write(template.render(path, values))
>
>
> [/code]
> In Consulta Webpage I have:
>
> [code]
>
> {% block main %}
>  <h3>Consulta de Processos</h3>
>  <p><a style="font-style:italic" href="/">Início</a></p>
>  <table width="900" border="1">
>   {% if numConsultas %}
>     <tr>
>    <td width="225">Número Processo</td>
>    <td width="225">Local da Obra</td>
>    <td width="225">Nome do Requerente</td>
>    <td width="225">Nome do Proprietário</td>
>    <td width="225">Empreiteiro</td>
>    <td width="225">Técnico Responsável</td>
>    <td width="225">Contactos</td>
>     </tr>
>    {% for consulta in consultas %}
>     <tr>
>    <td>{{ consulta.numero_processo }}</a></td>
>    <td>{{ consulta.local_da_obra}}</td>
>    <td>{{ consulta.nome_req }}</td>
>    <td>{{ consulta.nome_prop }}</td>
>    <td>{{ consulta.empresa }}</td>
>    <td>{{ consulta.tecnico }}</td>
>    <td>{{ consulta.telefone_req }}</td>
>
>     </tr>
>   {% endfor %}
>   {% else %}
>   <tr>
>   <td colspan="7">
>     Nao existem registos a apresentar.</td>
>   </tr>
>   {% endif %}
>  </table>
> {% endblock %}
> [/code]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/oVmxGKdjCv8J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to