VueDjangoAdmin dashboard

seal — Vue Admin dashboard Template

By hequan2017

Seal is a Django-based backend development template that supports both template rendering and separated frontend-backend modes, with built-in examples for K8s management and SQL auditing execution.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

1 previews
Author preview
Author-provided preview

Preview provided in the project README.

One original preview is available. Open the full image to inspect the design.

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-01View source

What stands out

A quick read of the recorded project description.

01

Supports both Django template rendering and RESTful / GraphQL separated frontend-backend development modes

02

The assets module provides complete CRUD examples based on CBV, serving as a reference for business module development

03

Built-in K8s management pages, including Node / Service / Pod lists and Pod WebSSH

04

Integrates goInception and soar, providing SQL detection execution and syntax optimization suggestions

05

Asynchronous tasks offer two solutions, Celery and dramatiq, with permission control and simpleui backend

Template Details

Seal is an open-source Django basic development platform template by author hequan2017, written using the MVC pattern and CBV (Class-Based View) approach. It supports both non-separated frontend-backend (Django template rendering) and separated frontend-backend (RESTful / GraphQL API) development methods, and can be used as a reference for building your own Django backend project.

The template includes a base web template and system platform pages (home, login, change password). The assets module provides complete CRUD examples; the interface layer offers DRF-based RESTful API examples (with Token authentication and two sets of API documentation) as well as graphene-django-based GraphQL Query / Mutation examples. Additionally, it includes two built-in operations scenarios: K8s Web Console (Node / Service / Pod lists and Pod WebSSH) and SQL auditing execution (integrating goInception and soar).

Before use, note: the project is based on Python 3.6 and Django 2.2, depends on MySQL 5.7 or SQLite and Redis; the K8s module requires configuring Token and APISERVER in settings.py, and the SQL module requires starting goInception and configuring a backup server. The author states in the README that the project is developed and updated on a weekend schedule, the fourth phase of frontend refactoring is still in progress, and if used directly in a production project, the SECRET_KEY must be regenerated.

VueDjangoAdmin backend

Is it right for your project?

Use Cases

  • Reference for building the basic template and directory structure of a Django backend project
  • Learn CBV writing, DRF RESTful API, and GraphQL interface examples
  • Serve as a starting point for developing a K8s cluster web management interface
  • Build a database operations backend with SQL auditing execution capabilities

Suitable For

  • Developers learning or using Django for backend development
  • Teams needing to evaluate both template rendering and separated frontend-backend approaches
  • Backend engineers looking for references on K8s management and SQL auditing implementation

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Environment requires Python 3.6, MySQL 5.7 (or SQLite), Redis; after installing dependencies, run makemigrations, migrate, and createsuperuser

  2. 2

    The K8s module requires configuring Token and APISERVER in seal/settings.py; see the repository documentation for how to obtain the Token

  3. 3

    The SQL module requires adding executable permissions to sql/bin/soar and sql/bin/goInception, and configuring the backup server according to config.toml

  4. 4

    Start asynchronous tasks as needed: for scheduled tasks use celery -B -A seal worker; for regular asynchronous tasks use dramatiq

  5. 5

    If used in a production project, regenerate the SECRET_KEY in settings, and note that timezone is stored as UTC

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of this version and does not imply that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as-is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • If this project is used directly in a production environment, the SECRET_KEY in settings must be regenerated; otherwise, there is a security risk.
  • Using the K8s management module requires obtaining and configuring a k8s admin Token and APISERVER address, which are external service credential requirements.
  • The SQL auditing module depends on an external goInception service and requires configuring a backup server in config.toml to use backup functionality.
  • Running requires providing external dependencies such as Python 3.6, MySQL 5.7 or SQLite, and Redis.
  • The WebSocket channel for asynchronous tasks and Pod WebSSH depends on Redis as broker and backend, requiring additional deployment.
  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's MIT license.
  • External services such as domain names, hosting, databases, payments, or AI may incur additional charges.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

如果想直接拿来做生产项目,请重新生成一个 settings 文件里面的 SECRET_KEY

Original README

修改 `seal/settings.py` 中 k8s 相关设置(Token 获取方法见 `k8s/k8sApi/获取k8s admin token的方法.md`)

Original README

`sql/bin/config/config.toml` 里面可以设置备份服务器,详情可以 GitHub 搜索 goInception

Original README

环境要求:Python 3.6、MySQL 5.7(或 SQLite)、Redis。

Original README

Redis(celery / dramatiq / channels 的 broker 与 backend)

Original README
https://github.com/hequan2017/seal/blob/master/LICENSEhttps://github.com/hequan2017/seal/blob/master/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-01. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 96 / 100
Technologies
Vue · Django
Website type
Admin dashboard
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-09-28
Screenshot last checked
2026-10-01

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Vue as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Automatically checked against source and license rules; no manual editorial review.

Inspect the recorded source material

SHA-256: bb7c3d137e533be685374259df243db4d4d22556241df12f8d62972bdacb136e

2026-10-01T02:38:31.342Z

Source file / repository
[简体中文](README.md) | [English](README.en.md)

# 海豹 seal

> django-base-templates —— 主要为 Django 开发 DEMO,支持非前后端分离和前后端分离模式

![版本](https://img.shields.io/badge/release-0.3-blue.svg)
![语言](https://img.shields.io/badge/language-python3.6-blue.svg)
![语言](https://img.shields.io/badge/env-django2.2-red.svg)
![bootstrap3](https://img.shields.io/badge/model-bootstrap3-mauve.svg)
![RESTful](https://img.shields.io/badge/api-RESTful-blue.svg)
![GraphQL](https://img.shields.io/badge/api-GraphQL-blue.svg)

> 因本项目开始时间为 3 月 1 日,是国际海豹日,故项目起名为 海豹 seal。

## 项目介绍

海豹(seal)是一个 Django 基础开发平台模板,采用 MVC 模式开发,同时支持 **非前后端分离**(Django 模板渲染)和 **前后端分离**(RESTful / GraphQL API)两种开发方式,可以直接拿来参考开发自己的 Django 项目。

项目基于 Django 2.2 + Python 3.6 + Celery 4 异步任务,前端模板使用 inspinia 2.7(Bootstrap3),全部采用 CBV(Class-Based View)方式开发,并附带 DRF RESTful API 示例、GraphQL 示例、Kubernetes 管理和 SQL 审核执行等实战模块。

除了作为基础模板,项目还内置了两个运维场景的完整实现:**K8s Web Console**(Node / Service / Pod 列表 + Pod WebSSH,通过调用 k8s api 执行命令)和 **SQL 审核执行引擎**(goInception / soar)。

作者会在周末进行开发、更新。

## ✨ 功能特性

- **基础开发模板**:base 网页基本模板 + system 平台基本网页(首页 / 登录 / 修改密码),前端模板 inspinia 2.7(Bootstrap3)
- **资产管理示例**:assets 模块提供完整的增删改查(CBV)范例,可作业务模块开发参考
- **RESTful API**:基于 DRF 的接口示例,支持 Token 认证(`/api/token`),自带两套 API 文档(`/api/docs/` 与 Swagger 风格的 `/api/docs2/`)
- **GraphQL**:基于 graphene-django 的 Query / Mutation 示例(用户列表、单查、增删改),内置 GraphiQL 调试页面(`/graphql/`)
- **K8s 管理**:Node / Service / Pod 列表、Pod 详情,**Pod WebSSH**(django-channels + WebSocket,通过调用 k8s api 在 Pod 内执行命令)
- **SQL 审核执行**:集成 goInception 做 SQL 检测 / 执行(支持备份),集成 soar 输出语法优化建议,支持多环境数据库配置
- **异步任务双方案**:Celery(推荐用于定时任务,配合 django-celery-beat / django-celery-results / flower)与 dramatiq(普通异步任务)
- **权限控制**:登录认证 + Django Permission 页面级权限校验,后台管理使用 django-simpleui 美化

## 开发计划

* 一期:基础模板(已完成)
* 二期:k8s 管理平台(开发中)
    * node/service/pod 列表(已完成)
    * pod webssh(已完成,通过调用 k8s api 进行执行命令)
* 三期:mysql sql 语句审核(已完成)
    * sql 检测执行
* 四期:正在开发中,重构前端 <https://github.com/hequan2017/seal-d2-admin>

## 🛠 技术栈

**后端**

- Python 3.6 / Django 2.2.4(CBV 开发方式)
- Django REST framework 3.9.2 + django-rest-swagger(API 与文档)
- graphene-django 2.2.0(GraphQL)
- celery 4.1.1 + django-celery-beat + django-celery-results + flower;dramatiq 1.5.0(异步任务)
- django-channels 2.2.0 + channels-redis(Pod WebSSH 的 WebSocket 通道)
- kubernetes 9.0.0(官方 k8s python client)、PyMySQL / mysqlclient、paramiko、psutil

**前端**

- Bootstrap3 + inspinia 2.7 模板(非前后端分离模式)
- Vue 版本前端:<https://github.com/hequan2017/seal-vue>、<https://github.com/hequan2017/seal-d2-admin>

**存储与依赖服务**

- MySQL 5.7 / SQLite
- Redis(celery / dramatiq / channels 的 broker 与 backend)

**SQL 审核工具**

- goInception / soar(可执行文件已随仓库提供,位于 `sql/bin/`)

## 🚀 快速开始

环境要求:Python 3.6、MySQL 5.7(或 SQLite)、Redis。

```bash
yum install python-devel mysql-devel python36-devel.x86_64 -y

git clone https://github.com/hequan2017/seal
cd seal

## django 2.2 不支持低版本的 sqlite,如果想使用 sqlite 存储数据,
## 请根据这个博客 https://www.jianshu.com/p/cdacf4b74646 进行升级

python36 -m pip install -r requirements.txt
python36 manage.py makemigrations
python36 manage.py migrate
python36 manage.py createsuperuser

python36 manage.py runserver 0.0.0.0:8001

// 后台运行
// nohup python36 manage.py runserver 0.0.0.0:8001 >> /tmp/http.log 2>&1 &
```

### K8s 模块

修改 `seal/settings.py` 中 k8s 相关设置(Token 获取方法见 `k8s/k8sApi/获取k8s admin token的方法.md`):

```python
## K8S
Token = "<dashboard-admin-token>"
APISERVER = 'https://192.168.100.111:6443'
```

### SQL 模块

进入项目目录 `cd seal`,`sql/bin/config/config.toml` 里面可以设置备份服务器,详情可以 GitHub 搜索 goInception:

```bash
chmod +x sql/bin/soar
chmod +x sql/bin/goInception

./sql/bin/goInception -config=sql/bin/config/config.toml
```

### 异步任务

* 扩展功能-异步1:推荐定时任务用 celery

```bash
cd seal
celery -B -A seal worker -l info
```

* 扩展功能-异步2:普通异步任务用 dramatiq

```bash
cd system/decorator/asynchronous/
dramatiq asynchronous --watch . --log-file /tmp/dramatiq.log
```

### 注意

* 如果想直接拿来做生产项目,请重新生成一个 settings 文件里面的 SECRET_KEY
* 时区问题(因为开启了时区,Django 在数据库里面保存的是 UTC 时间,调用的时候会帮你转为东八区,celery 会自动识别时间):

```python
from django.utils import timezone
for i in Users.objects.all():
    print(i.last_login)  ## 直接读取时间,会是 utc 时间,未转换,如果需要处理请注意
    print(timezone.localtime(i.last_login).strftime("%Y-%m-%d %H:%M:%S"))  ## 时间格式化为正常时间

## 2019-03-05 06:41:18.040809+00:00
## 2019-03-05 14:41:18
```

## 📁 目录结构

```
seal/
├── assets/      # 资产管理(增删改查示例)
├── k8s/         # K8s 管理(node/service/pod 列表、Pod 详情、webssh)
├── sql/         # SQL 审核执行(goInception / soar,bin 目录含可执行文件)
├── system/      # 系统模块(登录/用户/密码/异步任务示例)
├── document/    # demo 截图、sql 说明、代码规范
├── templates/   # 页面模板(base/system/assets/k8s/sql)
├── static/      # 静态资源(inspinia、ace、echarts、ueditor 等)
└── seal/        # 项目配置(settings / urls / schema / routing / celery)
```

## 📸 DEMO / 截图

> DEMO:<http://129.28.156.219:8001>

> 账户 admin 密码 1qaz.2wsx

> API 文档地址:<http://129.28.156.219:8001/api/docs/>

![列表](document/demo/1.jpg)
![添加](document/demo/2.jpg)
![API](document/demo/3.jpg)
![API](document/demo/4.jpg)
![API](document/demo/5.jpg)
![K8S](document/demo/6.jpg)
![K8S](document/demo/7.jpg)
![SQL](document/demo/8.jpg)

## 🔗 相关项目

* **seal-vue**:Vue 版本前端(持续开发中):<https://github.com/hequan2017/seal-vue>
* **seal-d2-admin**:四期重构前端(D2Admin):<https://github.com/hequan2017/seal-d2-admin>

## GraphQL 使用示例

具体代码请参考 `seal/schema.py`,请求地址:<http://localhost/graphql>

GraphQL 请求参数:

```
query{
  users{
    id,
    username,
    email
  }
}

query{
  singleUser(pk: 1){
    username,
    email
  }
}

mutation createUser {
 createUser (username: "test1") {
     info {
         id,
     },
     ok
 }
}

mutation updateUser {
 updateUser (pk:2,username: "test2") {
     info {
         id,
     },
     ok
 }
}

mutation deleteUser {
 deleteUser (pk:2) {
     ok
 }
}
```

## 📄 License

[MIT](LICENSE) © 2019 何全

## 售后服务

* cbv 中文文档 <http://ccbv.co.uk/projects/Django/2.1/django.views.generic.edit/>
* GraphQL 中文参考文档 <https://passwo.gitbook.io/graphql/index/drf>

### 交流

* 有问题可以加 QQ 群:620176501 <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=bbe5716e8bd2075cb27029bd5dd97e22fc4d83c0f61291f47ed3ed6a4195b024"><img border="0" src="https://github.com/hequan2017/cmdb/blob/master/static/img/group.png"  alt="django开发讨论群" title="django开发讨论群"></a>
* 欢迎提出你的需求和意见,或者来加入到本项目中一起开发。

### 作者

* 何全
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.