【发布时间】:2017-09-18 11:03:44
【问题描述】:
我已关注https://django-tables2.readthedocs.io/en/latest/pages/tutorial.html 创建表。我已经设法调整表格:
- python 版本:3.5.2
- django 版本:1.11.2
tables.py:
import django_tables2 as tables
from .models import Person
class PersonTable(tables.Table):
class Meta:
model = Person
attrs = {'class': 'paleblue','width':'300%'}
people.html:
{% load render_table from django_tables2 %}
{% load static %}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="{% static 'django_tables2/them/paleblue/css/screen.css' %}" />
</head>
<body>
{% render_table table %}
</body>
</html>
我在文档中看不到任何更改底部边框大小的选项? 或者,我尝试更改 screen.css 以删除边框,但更改没有效果。即使我重命名 screen.css,当我单击查看页面源时,该链接仍处于活动状态。
【问题讨论】:
-
这不是一个真正的 django-tables2 问题,而是如何使用 CSS 来设置表格样式和分页,但无论如何我都会尝试回答
标签: css django-tables2