Skip to main content

An extensible Django admin framework. Feels like Django. Barely any learning.

Project description

Pinmok Pinmok

English | 简体中文

Python Django License


English

Feels like Django. Barely any learning.

What is Pinmok

Django Admin has a fundamental constraint: the admin interface is built around your models. Navigation derives from your data structure, and the moment your business logic outgrows basic CRUD, you end up spending more time fighting the framework than building your product.

Pinmok removes that constraint. The admin is no longer a reflection of your database schema — it's organized around your business. Menu structure, page entries, and navigation hierarchy are all yours to define. A single business section can span multiple models, or none at all. If a feature has no model behind it, it can still have its own place in the admin. The way your backend is organized follows how your product works, not how your tables are laid out. Add a new business module and the admin grows with it — the same way adding a Django app adds a new set of routes, at no extra cost.

None of this replaces what Django Admin already does. Registration, permissions, URL structure — all untouched. Pinmok works from the inside, not on top.

If you know Django, you already know Pinmok.


What it does

  • Admin organized around your business, not your models

    Menu structure, page entries, and navigation depth are all defined by you. A business section can span multiple models or share one across sections. Features with no model at all can still have a dedicated admin page. Your backend is shaped by what your product does, not by what your database looks like.

  • Internationalization built in

    The admin interface ships with full i18n support. No extra configuration needed to serve users in different languages.

  • Menus and access control in one place

    Each app defines its own menu items, which merge automatically with Django Admin's native navigation. You control the order. Defining a menu entry also defines the access rule — menu visibility and URL-level permissions share the same definition, set once and enforced everywhere.

  • Site configuration that lives in the admin

    Site name, logo, feature flags, and similar settings can be changed directly in the admin interface. Save and it takes effect immediately — no code changes, no redeployment.

  • A modern interface built on tools you already know

    The UI is rebuilt on Bootstrap 5 / Tabler. Business pages use standard HTML and CSS components. No new frontend framework to learn.

  • Modular by design

    The core and admin modules are independent. Install what you need, combine as you like. Each piece works on its own, and removing one doesn't break the others.

  • Extension points for developers

    Common customization hooks and utilities are built in, covering most admin extension scenarios without requiring you to reimplement the same patterns from scratch.


Requirements

  • Python >= 3.12
  • Django >= 5.2

Dependencies

  • pillow >= 10.0
  • filetype >= 1.0.10
  • polib >= 1.1.0 (msgid deduplication for i18n — install only if needed)

Installation

pip

pip install pinmok

Source integration

If you need to modify the framework itself, you can bring the source directly into your project:

git clone https://github.com/pinmok/pinmok.git

Copy the pinmok/ directory into your project. Do not add an __init__.py under pinmok/ — this is intentional and required for the namespace package mechanism to work correctly.

For full setup instructions, see the documentation.


Documentation & Resources


Contributing

Pinmok is still early. A lot will become clearer as it gets used in the real world. If you find it useful, PRs and issues are welcome. If you don't have anything specific to contribute right now, a Star goes a long way — it helps other people find the project.


License

MIT License


简体中文

像Django一样,一学就会。

Pinmok 是什么

Django Admin 有一个根本性的约束:后台界面围绕 Model 定义生成,菜单结构与数据模型绑定,导航逻辑自动派生。业务复杂度一旦超出 CRUD 范畴,开发者便需要投入大量精力与框架的默认实现进行博弈。

Pinmok 改变了这一局面,解开了这一耦合。后台不再作为 Model 层的映射存在,而是回归业务本身,由业务逻辑主导。菜单结构可以按业务需求自由编排——既可以沿用 ModelAdmin,也可以完全自定义,甚至某个功能没有对应的 Model,同样可以在 Admin 中占据独立入口。后台的组织方式由业务需求驱动,而非由数据表结构决定。每新增一个业务模块, Admin 即自动扩展对应的功能区域,如同 Django 中添加一个 app 即新增一条路由,机制一致且无额外成本。

同时,原有的 Admin 注册方式、权限体系、URL 结构完全保留。Pinmok 做的是内部赋能,而非上层替换。

因此,Django 的使用者,即 Pinmok 的使用者。


它能做什么

  • 后台由业务定义,而非由 Model 定义

    菜单结构、页面入口、导航层级,全部按业务逻辑自由编排。一个业务模块可以跨多个 Model,多个业务模块也可以共享同一个 Model;即便某个功能完全没有对应的 Model,同样可以在 Admin 中拥有独立页面。后台的组织方式由业务需求驱动,而非由数据表结构决定。

  • 原生多语言支持

    后台界面内置多语言机制,无需额外配置即可适配不同语言环境。

  • 菜单与权限统一配置

    每个应用独立定义自己的菜单项,与 Django Admin 原生菜单自动融合,顺序由你控制。菜单定义的同时即完成访问控制配置——菜单可见性与 URL 权限基于同一份定义,一处设定,全局生效。

  • 站点配置在后台实时修改

    站点名称、Logo、功能开关等配置项,直接在后台界面修改,保存即生效,无需改动代码,无需重新部署。

  • 现代化界面,复用前端知识

    UI 基于 Bootstrap 5 / Tabler 重写,编写业务页面时使用标准 HTML 与 CSS 组件,无新增前端框架学习成本。

  • 模块化设计,按需组合

    核心模块与后台功能模块相互独立,可单独安装,按需组合。装上即用,移除不影响其他模块运行。

  • 面向开发者提供标准扩展接口

    预留常用扩展点与实用接口,覆盖多数后台定制场景,减少重复实现,保持代码整洁。


环境要求

  • Python >= 3.12
  • Django >= 5.2

依赖

  • pillow >= 10.0
  • filetype >= 1.0.10
  • polib >= 1.1.0(i18n msgid 去重,按需安装)

安装

pip 安装

pip install pinmok

源码集成

如果需要修改框架本身,可以将源码直接集成进项目:

git clone https://github.com/pinmok/pinmok.git

pinmok/ 目录复制到项目中,不要pinmok/ 下添加 __init__.py,这是命名空间包的标准用法。

完整配置说明请参阅文档。


文档与资源


参与贡献

Pinmok 还处于早期阶段,很多事情会在实际使用中逐渐明朗。如果你觉得这个项目有价值,欢迎提交 PR 或 Issue, 如果暂时没什么好说的,点个 Star 也不错——至少能让这个项目更容易被其他人找到。


许可证

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pinmok-1.0.1.tar.gz (3.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinmok-1.0.1-py3-none-any.whl (3.8 MB view details)

Uploaded Python 3

File details

Details for the file pinmok-1.0.1.tar.gz.

File metadata

  • Download URL: pinmok-1.0.1.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pinmok-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dbd76f0dc67b0ecf2746559abc246ee45b639a0615cdb7447b93782ce2a58f9a
MD5 0e7f1a218156437cfc312e4550864717
BLAKE2b-256 2021120407f27dcbc6545b8881ade7a77bc6baf701b43e85530766ec706d47b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pinmok-1.0.1.tar.gz:

Publisher: publish.yml on pinmok/pinmok

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pinmok-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pinmok-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pinmok-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29770f7ac9f14919f1a0fdb72da76f38db5d3caccb0404ff53708351e286ef00
MD5 4d9b99962d8a3c49a4a2ddae0b88952a
BLAKE2b-256 7f34670cb820f05468236dc6b4cb1a472addf494bd8ced16c5ba289d57e1a5e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pinmok-1.0.1-py3-none-any.whl:

Publisher: publish.yml on pinmok/pinmok

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page