Has anyone got or know if a printer friendly css file is available fo开发者_C百科r the Django Admin site?
If you want to add in a print CSS stylesheet for the admin, add this to your admin/base_site.html
template:
{% block extrastyle %}
{{block.super}}
<link rel="stylesheet" href="/path/to/your/print.css" type="text/css" media="print" charset="utf-8">
{% endblock %}
If you're looking to output the contents of the admin site, I would suggest exporting it as a CSV file first and then printing from spreadsheet software.
I have used this in the past and recommend it: https://django-import-export.readthedocs.org/en/latest/
精彩评论