django后台管理导航页HTML源码
时间: 2023-09-19 18:07:44 浏览: 155
以下是Django后台管理导航页的HTML源码示例:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Django Admin</title>
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/base.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/dashboard.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}">
</head>
<body class="{{ bodyclass }}">
<div id="djn-header">
<div class="header-inner">
<div class="branding">
<h1 id="site-name"><a href="{% url 'admin:index' %}">Django Admin</a></h1>
</div>
</div>
</div>
<div id="djn-content">
<div id="djn-nav">
<div class="nav-inner">
<div class="user-tools">
{% if user.is_active and user.is_staff %}
<strong>Welcome, {{ user.username }}</strong> |
{% if user.get_username != user.email %}
{{ user.email }} |
{% endif %}
<a href="{% url 'admin:logout' %}">Log out</a>
{% endif %}
</div>
<h2>Site Administration</h2>
<ul class="djn-apps">
{% for app in app_list %}
{% if app.models %}
<li class="djn-app">
<h3><a href="{{ app.app_url }}">{{ app.name }}</a></h3>
<ul class="djn-models">
{% for model in app.models %}
<li><a href="{{ model.admin_url }}">{{ model.name }}</a></li>
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
<div id="djn-main">
<div class="content">
{% block content %}{% endblock %}
</div>
</div>
<br class="clear">
</div>
</body>
</html>
```
请注意,这只是一个简单的示例,实际的导航页可以根据你的具体需求进行自定义和修改。
阅读全文