Tables in html tag on, won't stack

已查看 7 次
跳至第一个未读帖子

Kean

未读,
2019年8月16日 13:15:202019/8/16
收件人 Django users
Hi,

Ive created a table which returns all my data in my.html template.

However, the problem is the second record tags onto the end of the first, instead of wrapping,

i.e/

pk     Name   Surname  pk  Name  Surname
1       John     Smith       2    Jane   Smith 

instead of/

PK    Name   Surname
1       John    Smith 
2       Jane    Smith 


Please advise if there is a simple way to wrap the records so they fully stack?

Best,

K

Rax Otero

未读,
2019年9月2日 09:40:142019/9/2
收件人 django...@googlegroups.com
Hi,
Can I see how you structured your table?

Best wishes,
Rax

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0703c711-63cc-4668-90c6-4606294d9148%40googlegroups.com.

Kean

未读,
2019年9月2日 10:21:552019/9/2
收件人 django...@googlegroups.com
Hi Rax,

This was an html issue for me in the end, in how the was table row and table data were coded.
I resolved by coding in this way, and then data was listed.
<tr>
<td>{{ item.name }}</td>
<td>{{ item.surname }}</td>
</tr>
Thank you for offering to help.

Best,

K
回复全部
回复作者
转发
0 个新帖子