发布于 2026-01-05 3 阅读
0

The Best GitHub Repositories For Django Developers. Xadmin Django JET Django Suit Welcome to django-controlcenter! django-admin-tools Welcome to django-allauth! Django OAuth Toolkit Deprecated djoser Django Two-Factor Authentication Dj-Rest-Auth Authomatic django CMS Django Filer CMS django-page-cms Django Debug Toolbar Django Debug Panel Template-Timings Django Debug Toolbar MongoDB Panel django-debug-toolbar-user-panel Django-Merchant django-SHOP eCommerce Code Django-Merchant Django E-commerce Tutorial Series PayPal package for django-oscar django-crispy-forms django-bootstrap3 Django Smart Selects django-bootstrap 4 Django Bootstrap Modal Forms django-formtools django-remote-forms django-betterforms django-bootstrap5 django mongodbforms Django Countries django-places ipapi Python Library ~ ipapi.co by Kloudend, Inc. Django with GeoLocation Django Ip Geolocation Installing Usage Django-schedule Django RQ Scheduler django-user-streams Singular News Installation Contribution Guidelines Location-based-news-reccomendation django-model-utils Cacheops django-money Modeltranslation Cache Machine Django ORM Standalone django-guardian rules django-role-permissions Django REST Framework API Key dry-rest-permissions django-authority Django REST framework Funding Overview django-tastypie Django Oscar API DjangoQL django-watson INSTALL ELASTICSEARCH VERSION COMPATIBILITY django-cms-search django-jenkins django-nose django-test-plus django-autofixture Django-Experiments

最适合 Django 开发者的 GitHub 代码库。

Xadmin构建状态

Django JET

Django 套装

欢迎使用 django-controlcenter!

django-admin-tools

欢迎来到 django-allauth!

Django OAuth 工具包

已弃用

乔瑟

Django 双因素身份验证

Dj-Rest-Auth

自主

鹡鸰

Django CMS

Django 文件管理器

内容管理系统

django-page-cms

Django 调试工具栏PyPI 上的最新版本

Django调试面板

模板计时

Django 调试工具栏 MongoDB 面板

django-debug-toolbar-user-panel

Django-Merchant

django-SHOP

电子商务

代码

Django-Merchant

Django电子商务教程系列

django-oscar 的 PayPal 套餐

django-crispy-forms

django-bootstrap3

Django 智能选择

django-bootstrap 4

Django Bootstrap 模态表单

django-formtools

django-remote-forms

django-betterforms

django-bootstrap5

Django MongoDB 表单

Django 国家

django-places

ipapi Python 库 ~ ipapi.co由 Kloudend, Inc. 提供。

Django 与地理定位

Django IP 地理位置

安装

用法

Django-schedule

Django RQ 调度器

django-user-streams

奇异新闻

安装

投稿指南

基于位置的新闻推荐

django-model-utils

锦葵构建状态

django-money

模型翻译

缓存机

Django ORM 独立版

django-guardian

规则

django角色权限

Django REST Framework API 密钥

干休许可

django-authority

Django REST框架

资金

概述

django-tastypie

Django Oscar API

DjangoQL

django-watson

安装

Elasticsearch 版本兼容性

django-cms-search

django-jenkins

django-nose

django-test-plus

django-autofixture

Django-Experiments

在这篇文章中,我整理了一份GitHub上最有用的Django代码库列表。该列表按星标数量排序。

目录(TOC)。

👉 管理面板。

xadmin ⭐ 4.7k+ 🍴 1.4k+

GitHub 标志 sshwsfc / xadmin

这款 Django 管理后台的即插即用替代品功能丰富,支持插件扩展,界面美观,基于 Twitter Bootstrap。

Xadmin构建状态

这款 Django 管理后台的即插即用替代品功能丰富,支持插件扩展,界面美观,基于 Twitter Bootstrap。

在线演示

http://demo.xadmin.io

  • 用户:管理员
  • 密码:admin

特征

  • 可直接替换 Django 管理后台
  • 基于 Twitter Bootstrap 的 UI,支持主题
  • 可通过插件扩展
  • 更好的筛选条件,例如日期范围、数字范围等。
  • 内置数据导出功能,支持xls、csv、xml和json格式。
  • 支持小部件的仪表盘页面
  • 网站内书签
  • 完整的 CRUD 方法

屏幕截图

行动
筛选
图表
导出数据
内联编辑

开始使用

安装

Xadmin 最好通过 PyPI 安装。要安装最新版本,请运行:

pip install xadmin
Enter fullscreen mode Exit fullscreen mode

或者从 GitHub 源代码安装:

pip install git+git://github.com/sshwsfc/xadmin.git
Enter fullscreen mode Exit fullscreen mode

从 GitHub 源代码安装 Django 2.0:

pip install git+git://github.com/sshwsfc/xadmin.git@django2
Enter fullscreen mode Exit fullscreen mode

安装需要

django-jet ⭐ 3.3k+ 🍴 700+

GitHub 标志 geex-arts / django-jet

全新升级的Django后台管理界面模板——Jet,功能更加强大,响应式设计。我们荣幸地推出全新Jet模板。欢迎查看在线演示。

Django JET

https://travis-ci.org/geex-arts/django-jet.svg?branch=master

具有改进功能的现代化 Django 管理界面模板

注意!新喷气式飞机

我们荣幸地宣布推出全新Jet版本。请观看在线演示。

Django Jet 新功能的开发将暂停,只会修复关键错误。

在线演示

Django JET 提供两种许可:开源许可 (AGPLv3) 和商业许可。请注意,在您的程序中使用 AGPLv3 代码也会使其与 AGPL 兼容。如果您不想遵守 AGPLv3 的规定,我们可以为您提供商业许可(请访问主页)。商业许可专为在商业产品和应用程序中使用 Django JET 而设计,无需遵守 AGPLv3 的条款。

标识

为什么选择 Django JET?

  • 全新面貌
  • 响应式移动界面
  • 实用的管理员主页
  • 最小模板覆盖
  • 易于集成
  • 主题支持
  • 自动补全
  • 便利…

django-suit ⭐ 2.2k+ 🍴 600+

GitHub 标志 darklow / django-suit

Django 管理界面的现代主题

Django 套装

Django 管理界面现代主题

Django Suit 是Django管理界面的替代主题/皮肤/扩展。

执照

文档与支持

更新日志

注意: Django Suite v2.0 仍在积极开发中,尚未准备好用于生产环境。

更多信息请点击此处:待办事项:添加问题参考

贡献

请参阅贡献文档

构建状态

Django Suite 使用 Travis CI 对不同的 Django 和 Python 版本进行测试。

已使用 Python 2.7-3.4 和 PyPy、Django 1.9+ 和 Django Suite v2.0 alpha 版本进行测试。

构建状态 - v2 分支 构建状态 - 开发分支

预览

https://cloud.githubusercontent.com/assets/445304/12699480/3eee898e-c7c5-11e5-931c-ba1b0cabdecb.png

替代: Django Suit 预览:目标:http://v2.djangosuit.com/admin/



哇哦 ⭐ 1.8k+ 🍴 100+

GitHub 标志 呜呜/呜呜

一个使用 Django 为 Python 脚本自动创建 Web 用户界面的应用程序。

哇哦!

构建状态 部署到 PyPI 部署到 Docker 代码发现 加入聊天:https://gitter.im/wooey/Wooey

Wooey 是一个简单的 Web 界面,用于运行命令行 Python 脚本。您可以把它想象成一种轻松将脚本部署到 Web 上,用于日常数据分析、文件处理或其他任何用途的方法。

Wooey 的设计初衷是为数据分析师提供一个能够轻松执行以下操作的系统:

1. Autodocument workflows for data analysis
    (simple model saving).
2. Enable fellow co-workers with no command line
    experience to utilize python scripts.
3. Enable the easy wrapping of any program in simple
   python instead of having to use language specific
   to existing tools such as Galaxy.

有关安装和其他说明,请查看我们的文档或在我们的演示服务器上试用 Wooey




django-controlcenter ⭐ 900+ 🍴 10+

GitHub 标志 byashimov / django 控制中心

用于构建 Django 项目仪表盘的小部件集

欢迎使用 django-controlcenter!

将所有项目模型集中在一个页面上,并配以图表和各种提示。

django-controlcenter

注意力!

很抱歉,我没有时间添加新功能。如果您需要添加新功能,请提交 PR:

  • 从主分支创建分支
  • 提供测试
  • 添加文档
  • 更新日志

就是这样。

理由

Django-admin是一个很棒的项目管理工具:新订单、评论、回复、用户、反馈——所有信息都在这里。唯一的不足之处在于,需要不断切换页面才能查看新条目。

借助 django-controlcenter,您可以将所有模型放在一个页面上,并使用Chartist.js构建漂亮的图表。实际上,它们甚至不必是 Django 模型,您可以从任何位置获取数据:关系型数据库、NoSQL 数据库、文本文件,甚至是外部网页,都无关紧要。

快速入门

安装 django-controlcenter:

pip install -U django-controlcenter
Enter fullscreen mode Exit fullscreen mode

创建一个包含无限数量小部件的仪表盘文件……

django-admin-tools ⭐ 700+ 🍴 100+

GitHub 标志 django-admin-tools / django-admin-tools

扩展 Django 管理后台,使其包含可扩展的仪表盘和导航菜单。

django-admin-tools

特拉维斯建造 codecov-image 文档状态 PyPI 版本 Python 版本

概述

django-admin-tools 是一组用于 Django 默认管理界面的扩展/工具,其中包括:

  • 功能齐全且可定制的控制面板;
  • 可自定义的菜单栏;
  • 让后台管理主题更轻松的工具。

代码托管在Github上。

Django-admin-tools 的文档非常详尽,您可以在线浏览文档。建议先阅读快速入门指南

该项目由David Jean Louis创建,之前托管在Bitbucket上。

如果您想讨论 django-admin-tools 的未来,请加入邮件列表。

要求

django-admin-tools 与 Django 1.11 LTS 到 Django 4.0 以及 Python 2.7、3.5+ 兼容。

对于较旧的 python 和 django 版本,请使用 Pypi 上提供的 django-admin-tools 0.8.1 版本。

安装

要安装 django-admin-tools,请在此目录下运行以下命令:

python setup.py 安装

如果您安装了 Python easy_install工具,您还可以……

👉 身份验证。

🔝返回目录

django-allauth ⭐ 7.4k+ 🍴 2.6k

GitHub 标志 pennersr / django-allauth

一套集成的 Django 应用,涵盖身份验证、注册、账户管理以及第三方(社交)账户身份验证。🔁 镜像自 https://codeberg.org/allauth/django-allauth/

欢迎来到 django-allauth!

django-allauth 标志

ci pypi 覆盖范围状态 比特币 liberapay pystyle jsstyle 编辑 i18n PyPI - 下载 查看 Django 演示 查看 React SPA 演示

一套集成的 Django 应用程序,用于处理身份验证注册、帐户管理以及第三方(社交)帐户身份验证。

首页
https://allauth.org/
源代码
https://codeberg.org/allauth/django-allauth
问题跟踪器
https://codeberg.org/allauth/django-allauth/issues
文档
https://docs.allauth.org/en/latest/
Stack Overflow
https://stackoverflow.com/questions/tagged/django-allauth
演示
https://django.demo.allauth.orghttps://react.demo.allauth.org
翻译
https://hosted.weblate.org/projects/allauth/django-allauth/

理由

现有的大多数 Django 应用在解决社交认证问题时,不幸地只关注了社交这一维度。大多数开发者最终不得不集成其他应用来支持本地生成的认证流程。

这种方法造成了本地身份验证流程和社交身份验证流程之间的发展差距。尽管许多常见场景都需要这两种流程,但这个问题依然存在。例如,OpenID 提供商传递的电子邮件地址可能未经验证。因此,在将 OpenID 帐户关联到本地帐户之前,必须验证电子邮件地址。这实际上是众多需要进行电子邮件验证的用例之一……

django-oauth-工具包 ⭐ 2.6k+ 🍴 700+

GitHub 标志 爵士乐队/ django-oauth-工具包

为 Djangonauts 提供 OAuth2 好东西!

Django OAuth 工具包

爵士乐队

为 Djangonauts 提供 OAuth2 好东西!

GitHub Actions 覆盖范围 支持的 Python 版本 支持的 Django 版本
如果您遇到以下一种或多种情况:
  • 您的 Django 应用公开了一个 Web API,您希望使用 OAuth2 身份验证来保护它。
  • 您需要实现一个 OAuth2 授权服务器,以便为您的基础架构提供令牌管理。

Django OAuth Toolkit 可以帮助您开箱即用地提供所有必要的端点、数据和逻辑,从而为您的 Django 项目添加 OAuth2 功能。Django OAuth Toolkit 广泛使用了优秀的OAuthLib,因此所有内容都符合 RFC 标准

报告安全问题

如有任何安全问题,请发送邮件至 < security@jazzband.co >联系 JazzBand 安全团队。请勿在问题跟踪器上提交问题。

要求

  • Python 3.8+
  • Django 4.2、5.0 或 5.1
  • oauthlib 3.2.2+

安装

使用 pip 安装:

使用 pip 安装 django-oauth-toolkit

添加oauth2_provider到您的INSTALLED_APPS

INSTALLED_APPS = (
    ...
    'oauth2_provider',
)
Enter fullscreen mode Exit fullscreen mode

如果您需要 OAuth2 提供商……

django-rest-auth ⭐ 2.3k+ 🍴 600+

GitHub 标志 Tivix / django-rest-auth

该应用程序可以极其轻松地构建基于 Django 的 SPA(单页应用程序)或移动应用程序,并将所有注册和身份验证相关功能以 CBV(类基视图)和 REST(JSON)的形式公开。




djoser ⭐ 2.2k+ 🍴 400+

GitHub 标志 摩天大楼/乔瑟

Django身份验证系统的REST实现。

乔瑟

构建状态 https://img.shields.io/pypi/dm/djoser 文档

djoser库是Django身份验证系统的 REST 实现,它提供了一组Django REST Framework视图来处理注册、登录、注销、密码重置和帐户激活等基本操作。它支持自定义用户模型

支持的功能包括:

  • 基于令牌的身份验证
  • JWT 身份验证
  • 社交认证
  • WebAuthn 支持

我们没有重用 Django 代码(例如PasswordResetForm),而是重新实现了一些功能,以更好地适应单页应用程序架构。

SUNSCRAPERS倾注热情与耐心打造。

https://asciinema.org/a/94J4eG2tSBD2iEfF30a6vGtXw.png

要求

要运行djoser,您必须满足以下要求:

  • Python 版本 >= 3.9,< 4.0(包括 3.10、3.11 和 3.12)
  • Django>=3.0.0(支持Django 3.2至5.1)
  • Django REST Framework>=3.12

安装

只需使用以下命令安装pip

$ pip install djoser
Enter fullscreen mode Exit fullscreen mode

然后继续按照配置指南中的步骤进行操作

文档

文档可在https://djoser.readthedocs.iodocs目录中查阅。

贡献与发展

要开始使用djoser进行开发,请克隆该代码库:

$ git
Enter fullscreen mode Exit fullscreen mode

正品 ⭐ 2.2k+ 🍴 100+

GitHub 标志 goauthentik / authentik

你需要的认证粘合剂。

Authentik 标志


加入 Discord GitHub 工作流状态 GitHub 工作流状态 GitHub 工作流状态 代码覆盖率 Docker拉取 最新版本

什么是authentik?

authentik 是一个开源身份提供商,强调灵活性和多功能性,支持多种协议。

我们的企业级产品还可以作为 Okta/Auth0、Entra ID、Ping Identity 或其他传统身份提供商的大规模部署的自托管替代方案,适用于员工和 B2B2C 应用。

安装

对于小型/测试环境,建议使用 Docker Compose;请参阅相关文档

对于规模较大的部署,这里提供了一个 Helm Chart 。相关文档请参见此处

屏幕截图

黑暗的

发展

请参阅开发者文档

安全

请参阅SECURITY.md 文件。

收养和贡献

您的组织正在使用 authentik 吗?我们非常乐意将您的徽标添加到 README 文件和我们的网站上!请发送电子邮件至hello@goauthentik.io或在 GitHub 上提交 Issue/PR!有关如何为 authentik 做贡献的更多信息,请参阅我们的贡献指南




django-two-factor-auth ⭐ 1.3k+ 🍴 300+

GitHub 标志 jazzband / django 双因素身份验证

为 Django 提供完整的双因素身份验证,可轻松集成到大多数 Django 项目中。

Django 双因素身份验证

爵士乐队 构建状态 测试覆盖率 PyPI

适用于 Django 的完整双因素身份验证方案。它基于一次性密码框架django-otp和 Django 内置的身份验证框架构建django.contrib.auth,可轻松集成到大多数 Django 项目中。其设计灵感源自 Google 的两步身份验证用户体验,允许用户通过通话、短信 (SMS)、使用 Google Authenticator 等令牌生成应用或YubiKey硬件令牌生成器(可选)进行身份验证。

如果您遇到问题,请在 GitHub 上提交 issue,或者通过 fork 仓库并提交 pull request 来为项目做贡献。该软件包已翻译成英语、荷兰语和其他语言。请使用Transifex贡献您自己的语言。

通过示例应用试用此应用。它演示了除 Twilio 集成之外的大部分功能。示例还包含django-user-sessions,用于为 Django 会话提供指向用户的外键。虽然该软件包是可选的,但它可以改进帐户管理……

dj-rest-auth ⭐ 1k+ 🍴 100+

GitHub 标志 iMerica / dj-rest-auth

Django Rest Framework 的身份验证

Dj-Rest-Auth

<iMerica>

用于在 Django Rest Framework 中安全处理身份验证的即插即用型 API 端点。尤其适用于单页应用程序(例如 React、Vue、Angular)和移动应用程序。

要求

  • Django >= 4.2(参见 CI 中的单元测试覆盖率)
  • Python 版本 >= 3.8

快速设置

安装包

pip install dj-rest-auth

将应用添加dj_rest_auth到 django settings.py 文件中的 INSTALLED_APPS 列表中:

INSTALLED_APPS = (
    ...,
    'rest_framework',
    'rest_framework.authtoken',
    ...,
    'dj_rest_auth'
)
Enter fullscreen mode Exit fullscreen mode

添加 URL 模式

urlpatterns = [
    path('dj-rest-auth/', include('dj_rest_auth.urls')),
]
Enter fullscreen mode Exit fullscreen mode

(可选)使用仅限 HTTP 的 Cookie

REST_AUTH = {
    'USE_JWT': True,
    'JWT_AUTH_COOKIE': 'jwt-auth',
}
Enter fullscreen mode Exit fullscreen mode

测试

使用以下命令安装所需模块pip install -r dj_rest_auth/tests/requirements.txt

要在虚拟环境中运行测试,请python runtests.py从仓库目录运行。运行测试覆盖率的最简单方法是使用coverage,它会针对所有受支持的 Django 安装运行测试。要在虚拟环境中运行测试覆盖率,请运行coverage run ./runtests.py……

自动 ⭐ 900+ 🍴 300+

GitHub 标志 自动/自动

一个简单而强大的Python Web应用程序授权/认证客户端库。

自主

https://travis-ci.org/authomatic/authomatic.svg?branch=master

Authomatic是一个与框架无关的Python Web 应用程序库,它具有简洁强大的接口,可以通过OAuthOpenID等标准简化FacebookTwitter等第三方提供商的用户身份验证

有关更多信息,请访问项目页面:http://authomatic.github.io/authomatic

维护者

Authomatic已从 Peter Hudec 的个人项目迁移到社区管理项目。非常感谢 Peter Hudec 为创建和维护Authomatic所付出的辛勤努力!我们现在是一个由志愿者组成的小团队,所有工作均为义务性质。任何帮助都将不胜感激!

特征

  • 松散耦合。
  • 小巧但功能强大的界面。
  • python -openid库是唯一可选的依赖项。
  • 由于适配器的存在,它与框架无关,开箱即用地支持DjangoFlaskPyramidWebapp2
  • 已做好适应未来授权/认证协议的准备。
  • 让调用提供商 API 变得轻而易举。
  • 异步请求。
  • 附赠 JavaScript 库。
  • 出去…

👉 内容管理系统。

🔝返回目录

鹡鸰 ⭐ 12.7k+ 🍴 2.7k+

GitHub 标志 鹡鸰/鹡鸰

一个专注于灵活性和用户体验的 Django 内容管理系统

鹡鸰


构建状态 执照 版本 每月下载量 请关注 @wagtail@fosstodon.org

Wagtail 是一个基于 Django 构建的开源内容管理系统,拥有强大的社区和商业支持。它专注于用户体验,并为设计师和开发者提供精准的控制。

鹡鸰截图

🔥 功能

  • 一个快速、美观的作者界面
  • 对前端设计和结构拥有完全控制权
  • 可扩展至数百万页和数千名编辑
  • 开箱即用,速度快,需要时支持缓存
  • 适用于具有解耦前端的“无头”网站的内容 API
  • 可在树莓派或多数据中心云平台上运行
  • StreamField鼓励灵活的内容创作,同时又不损害结构。
  • 功能强大的集成搜索,使用 Elasticsearch 或 PostgreSQL。
  • 对图像和嵌入式内容提供了极佳的支持
  • 支持多站点和多语言
  • 拥抱并扩展了 Django

了解更多信息,请访问wagtail.org

👉 入门指南

Wagtail 可与Python 3配合使用,适用于任何平台。

要开始使用 Wagtail,请在虚拟环境中运行以下命令:

安装 Wagtail

pip install wagtail
wagtail start mysite
Enter fullscreen mode Exit fullscreen mode

django-cms ⭐ 8.9k+ 🍴 2.8k+

GitHub 标志 django-cms / django-cms

由 Django 提供支持的易于使用且对开发者友好的企业级 CMS

Django CMS

气候代码

基于 Django 框架的开源企业内容管理系统,由非营利组织 Django CMS 协会提供支持(赞助我们!)。

参与本项目,赢取奖励

由于 django CMS 是一个社区驱动的项目,我们欢迎所有人参与其中。加入我们这个优秀的社区,帮助我们把 django CMS 打造成世界上最好的开源 CMS。

注意力!

请将此main分支作为持续开发过程中提交 pull request 的目标分支。

核心团队会酌情将安全修复程序移植到较早的分支。

特征

  • 层级页面
  • 内置对多语言网站的广泛支持
  • 多站点支持
  • 草稿/发布工作流程
  • 版本控制
  • 一种复杂的发布架构,也可在您自己的应用程序中使用。
  • 前端内容编辑
  • 用于嵌套插件的层级内容结构
  • 一个可扩展的导航系统,您的应用程序可以接入该系统。
  • 有利于搜索引擎优化的网址
  • 旨在整合……

django-filer ⭐ 1.6k+ 🍴 500+

GitHub 标志 django-cms / django-filer

用于 Django 的文件和图像管理应用程序

Django 文件管理器

pypi Python Django 覆盖范围

django Filer是一个用于 django 的文件管理应用程序,它使文件和图像的处理变得轻而易举。

笔记

该项目已获得django CMS 协会的认可。这意味着它已被 dCA 正式接受,符合我们的路线图愿景和开发/插件政策。加入我们的Slack频道。

https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/filer_2.png https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/filer_3.png
https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/detail_image.png https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/detail_file.png
https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/file_picker_1.png https://raw.githubusercontent.com/django-cms/django-filer/master/docs/_static/file_picker_3.png

参与本项目,赢取奖励

由于这是一个开源项目,我们欢迎所有人参与其中,并为他们的贡献提供奖励。加入我们这个优秀的社区,帮助我们把 Django CMS 打造成世界上最好的 CMS。

我们非常欢迎您以问题报告和拉取请求的形式提供反馈。提交拉取请求前,请先阅读我们的贡献指南

我们衷心感谢所有为创建和维护此软件包做出贡献的人。贡献者名单请见贡献者列表……

cms ⭐ 400+ 🍴 10+

GitHub 标志 amfoss / cms

此项目已过时,已被root项目取代。存档仅供历史参考。amFOSS俱乐部管理系统,由CMS驱动。

amfoss-cms-cover

内容管理系统

观察者 观星者 叉子

特拉维斯CI 版本 0.5 GNU 警报总数 加入聊天:https://gitter.im/amfoss/cms 未解决的问题 公关人员 贡献者

俱乐部管理系统 (CMS) 是一个基于 django 的 Web 应用程序,它为 amfoss 网站、amfoss Web 应用程序和 amfoss 应用程序奠定了基础。

该门户网站主要基于 Django 框架,因此需要预先安装 Django 及其他项目依赖项,并具备相应的 Python 环境。虽然无需虚拟环境也能运行该项目,但为了避免与其他项目冲突,建议使用虚拟环境。

  1. Make sure that you have Python 3, python-3-devel, gcc, virtualenv, and pip installed.

  2. Clone the repository

        $ git clone https://github.com/amfoss/cms.git
        $ cd cms
    
  3. Create a python 3 virtualenv, and activate the environment.

        $ virtualenv -p python3 .
        $ source bin/activate
    Enter fullscreen mode Exit fullscreen mode
  4. Install the project dependencies from requirements.txt

        $ pip install -r requirements.txt
    

You have now successfully set up the project on your environment. If you encounter any problems during installation, you…

django-page-cms ⭐ 200+ 🍴 100+

GitHub 标志 batiste / django-page-cms

Official Django page CMS git repository

django-page-cms

https://readthedocs.org/projects/django-page-cms/badge/?version=latest 气候代码 审查员代码质量

This Django CMS enables you to create and administrate hierarchical pages in a simple and powerful way.

For a quick demo.

$ pip3 install "django-page-cms[full]"; gerbi --create mywebsite
Enter fullscreen mode Exit fullscreen mode

Or with docker

docker compose up web
Enter fullscreen mode Exit fullscreen mode

To create a super user account

docker compose run web python example/manage.py createsuperuser
Enter fullscreen mode Exit fullscreen mode

To create a demo website

docker compose run web python example/manage.py pages_demo
Enter fullscreen mode Exit fullscreen mode

To run tests with docker

docker compose run run-test
Enter fullscreen mode Exit fullscreen mode

More informations

Django page CMS is based around a placeholders concept. Placeholder is a special template tag that you use in your page templates. Every time you add a placeholder in your template such field dynamically appears in the page admin interface.

Each page can have a different template with different placeholders.

https://github.com/batiste/django-page-cms/raw/master/doc/images/admin-screenshot-1.png

Those placeholder can also be edited inline

https://github.com/batiste/django-page-cms/raw/master/doc/images/inline-edit.png




jbt_blog ⭐ 100+ 🍴 10+

GitHub 标志 leeyis / jbt_blog

一个基于 Django 5.2.2 和 Python 3.x 的现代化博客系统,支持 Markdown 编辑和美观的管理界面。

简介 Introduction

一个基于 Django 5.2.2Python 3.x 的现代化博客系统,支持 Markdown 编辑和美观的管理界面。

A modern blog system based on Django 5.2.2 and Python 3.x, featuring Markdown editing and beautiful admin interface.

Python Django 执照

技术栈 Tech Stack

技术 Technology 版本 Version 用途 Purpose
Django 5.2.2+ Web框架 / Web Framework
django-mdeditor 0.1.20+ Markdown编辑器 / Markdown Editor
django-admin-interface 0.30.0+ 管理界面美化 / Admin UI Enhancement
Pygments 2.19.1+ 代码高亮 / Code Highlighting
Markdown 3.8+ 内容渲染 / Content Rendering

项目截图 Screenshots

前台页面 Frontend

首页 博客首页 - Blog Homepage


文章详情 文章详情页 - Article Detail Page

后台管理 Admin Backend

文章管理 后台文章管理 - Article Management


文章编辑 文章编辑页面 - Article Edit

快速开始 Quick Start

环境要求 Requirements

  • Python 3.8+
  • Django 5.2.2+
  • SQLite3 (默认) / MySQL / PostgreSQL

安装步骤 Installation

# 1. 克隆项目 Clone repository
git clone https://github.com/leeyis/jbt_blog.git
cd jbt_blog
# 2. 创建虚拟环境 Create virtual environment
conda create -n blog python=3.10 -y

# 激活虚拟环境 Activate virtual environment
conda activate blog
# 停用虚拟环境 Deactivate virtual environment (when needed)
# conda
Enter fullscreen mode Exit fullscreen mode

django-leonardo ⭐ 90+ 🍴 10+

GitHub 标志 django-leonardo / django-leonardo

CMS for everyone, easy to deploy and scale, robust modular system with many packages. https://packages.leonardo-cms.org/

Pypi版本 医生徽章 特拉维斯 Pypi

Django-Leonardo

Full featured platform for fast and easy building extensible web applications.

Don't waste your time searching stable solution for daily problems.

Deploy and Enjoy ! No skills required !

For Users

  • CMS, Page, Responsive, Layouts, Themes, Color Variations
  • Widgets, Plugins, 3rd party app integrations
  • Frontend Edit, Install/Uninstall modules in one click !
  • Store, Form Designer, Blog, News, Folio, Links, Navigations, ..
  • Media, Folders, Files, Images, Documents, Import - Export, ..
  • LIVE settings, Auto loading modules, editable templates, ..
  • Authentification, 3rd party backends, SAML standard, ..

For Developers

  • Python, Django, FeinCMS, OpenStack Horizon
  • AngularJS, React, Bootstrap, Compress, Bootswatch
  • Crispy forms, Floppy forms, Select2
  • Filer, DbTemplates, Reversion, Constance
  • Haystack, Oscar, Django Admin Bootstrap
  • and tons of other apps bundled as modules

Further reading:

👉 Debugging Tools.

🔝 Go To TOC

django-debug-toolbar ⭐ 7.2k+ 🍴 900+

GitHub 标志 django-commons / django-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.

Django Debug Toolbar PyPI 上的最新版本

构建状态 测试覆盖率状态 文档状态 支持的 Python 版本 支持的 Django 版本

The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content.

Here's a screenshot of the toolbar in action:

Django 调试工具栏截图

In addition to the built-in panels, a number of third-party panels are contributed by the community.

The current stable version of the Debug Toolbar is 5.2.0. It works on Django ≥ 4.2.0.

The Debug Toolbar has experimental support for Django's asynchronous views. Please note that the Debug Toolbar still lacks the capability for handling concurrent requests If you find any issues, please report them on the issue tracker.

Documentation, including installation and configuration instructions, is available at https://django-debug-toolbar.readthedocs.io/.

The Django Debug Toolbar is released under the BSD license, like Django itself. If you like it, please consider contributing!

The Django Debug Toolbar was originally created by Rob…

django-devserver ⭐ 1.3k+ 🍴 100+

GitHub 标志 dcramer / django-devserver

A drop-in replacement for Django's runserver.

About

A drop in replacement for Django's built-in runserver command. Features include:

  • An extendable interface for handling things such as real-time logging.
  • Integration with the werkzeug interactive debugger.
  • Threaded (default) and multi-process development servers.
  • Ability to specify a WSGI application as your target environment.

Note

django-devserver works on Django 1.3 and newer

Installation

To install the latest stable version:

pip install git+git://github.com/dcramer/django-devserver#egg=django-devserver

django-devserver has some optional dependancies, which we highly recommend installing.

  • pip install sqlparse -- pretty SQL formatting
  • pip install werkzeug -- interactive debugger
  • pip install guppy -- tracks memory usage (required for MemoryUseModule)
  • pip install line_profiler -- does line-by-line profiling (required for LineProfilerModule)

You will need to include devserver in your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'devserver',
)

If you're using django.contrib.staticfiles or any other apps with management command runserver, make sure to put devserver above any of them (or below for Django<1.7). Otherwise …

django-debug-panel ⭐ 300+ 🍴 10+

GitHub 标志 recamshak / django-debug-panel

django-debug-toolbar in WebKit DevTools. Works fine with background Ajax requests and non-HTML responses.

Django Debug Panel

Django Debug Toolbar inside WebKit DevTools. Works fine with background AJAX requests and non-HTML responses Great for single-page applications and other AJAX intensive web applications.

Installation

  1. Install and configure Django Debug Toolbar

  2. Install Django Debug Panel:

    pip install django-debug-panel
    Enter fullscreen mode Exit fullscreen mode
  3. Add debug_panel to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
        # ...
        'debug_panel',
    )
    Enter fullscreen mode Exit fullscreen mode
  4. Replace the Django Debug Toolbar middleware with the Django Debug Panel one. Replace:

    MIDDLEWARE_CLASSES = (
        ...
        'debug_toolbar.middleware.DebugToolbarMiddleware',
        ...
    )
    Enter fullscreen mode Exit fullscreen mode

    with:

    MIDDLEWARE_CLASSES = (
        ...
        'debug_panel.middleware.DebugPanelMiddleware',
        ...
    )
    Enter fullscreen mode Exit fullscreen mode
  5. (Optional) Configure your cache All the debug data of a request are stored into the cache backend debug-panel if available. Otherwise, the default backend is used, and finally if no caches are defined it will fallback to a local memory cache. You might want to configure the debug-panel cache in your settings:

    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache'
            'LOCATION'
    Enter fullscreen mode Exit fullscreen mode

django-debug-toolbar-template-timings ⭐ 200+ 🍴 10+

GitHub 标志 orf / django-debug-toolbar-template-timings

A django-debug-toolbar panel that displays template rendering times for your Django application

Template-Timings

Template-timings is a panel for Django Debug Toolbar that gives an in-dept breakdown of the time it takes to render your Django templates (including templates included via {% extends %} and {% include %}).

Template-timings supports Django 1.11 and below, Django 2.0 and above do not work at the moment.

Install

Install via pip (pip install django-debug-toolbar-template-timings) then add 'template_timings_panel.panels.TemplateTimings.TemplateTimings' to your DEBUG_TOOLBAR_PANELS setting, and add 'template_timings_panel' to your INSTALLED_APPS:

# http://django-debug-toolbar.readthedocs.org/en/latest/configuration.html#debug-toolbar-panels
DEBUG_TOOLBAR_PANELS = [
    ...
    'template_timings_panel.panels.TemplateTimings.TemplateTimings',
]

INSTALLED_APPS = [
    ...
    'template_timings_panel'
]
Enter fullscreen mode Exit fullscreen mode

Screenshot

http://i.imgur.com/H2D48Uy.png

Frequently asked questions

How much overhead does this add?

In my experience this panel adds about 10% overhead. The panel uses the standard SQLPanel that ships with debug-toolbar to handle the SQL timings, so if you disable that the overhead will decrease and you can still see the render times.

The SQL count is different from the SQLPanel?

SQLPanel…

django-debug-toolbar-mongo ⭐ 10+ 🍴 10+

GitHub 标志 hmarr / django-debug-toolbar-mongo

MongoDB panel for the Django Debug Toolbar

Django Debug Toolbar MongoDB Panel

Info: An extension panel for Rob Hudson's Django Debug Toolbar that adds MongoDB debugging information
Author: Harry Marr (http://github.com/hmarr, http://twitter.com/harrymarr)

Setup

Add the following lines to your settings.py:

INSTALLED_APPS = (
    ...
    'debug_toolbar_mongo',
    ...
)

DEBUG_TOOLBAR_PANELS = (
    ...
    'debug_toolbar_mongo.panel.MongoDebugPanel',
    ...
)

An extra panel titled "MongoDB" should appear in your debug toolbar.

Note that this should work with any Django application that uses PyMongo.

Obtaining stack traces can slow down queries significantly. To turn them off add the following lines to your settings.py:

DEBUG_TOOLBAR_MONGO_STACKTRACES = False

Disclaimer: only tested in latest Chrome, may fall to pieces in other browers. If you feel like fixing it, contributions are welcome!




django-debug-toolbar-user-panel ⭐ 10+ 🍴 10+

GitHub 标志 playfire / django-debug-toolbar-user-panel

Panel for the Django Debug toolbar to quickly switch between users




👉 E-commerce.

🔝 Go To TOC

saleor ⭐ 16.8k+ 🍴 4.7k+

GitHub 标志 agiliq / merchant

A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant

TravisCI

Django-Merchant is a django application that enables you to use multiple payment processors from a single API.

Gateways

Following gateways are supported:

  • Authorize.net
  • Paypal
  • Eway
  • Braintree Payments (Server to Server)
  • Stripe
  • Paylane
  • WePay
  • Beanstream
  • Chargebee
  • Global Iris

Off-Site Processing

  • Paypal
  • RBS WorldPay
  • Amazon FPS
  • Braintree Payments (Transparent Redirect)
  • Stripe.js
  • eWAY
  • Authorize.net Direct Post Method
  • Global Iris RealMPI

Other

  • Bitcoin

Documentation

Documentation is automatically built and published online at:

http://readthedocs.org/docs/django-merchant/en/latest/

Support

There is a mailing list where discussion regarding the development and usage of merchant happens:

http://groups.google.com/group/django-merchant/




django-oscar ⭐ 5.4k+ 🍴 2.0k+

GitHub 标志 django-oscar / django-oscar

Domain-driven e-commerce for Django

https://github.com/django-oscar/django-oscar/raw/master/docs/images/logos/oscar.png

Domain-driven e-commerce for Django

Oscar is an e-commerce framework for Django designed for building domain-driven sites. It is structured such that any part of the core functionality can be customised to suit the needs of your project. This allows a wide range of e-commerce requirements to be handled, from large-scale B2C sites to complex B2B sites rich in domain-specific business logic.

Contents:

https://github.com/django-oscar/django-oscar/raw/master/docs/images/screenshots/oscarcommerce.thumb.png https://github.com/django-oscar/django-oscar/raw/master/docs/images/screenshots/readthedocs.thumb.png

Further reading:

Continuous integration status:

覆盖范围 需求状态

PyPI status:

Docs status:

文档状态

Core team:

django-shop ⭐ 2.9k+ 🍴 900k+

GitHub 标志 awesto / django-shop

A Django based shop system

django-SHOP

Django-SHOP aims to be a the easy, fun and fast e-commerce counterpart to django-CMS.

构建状态 PyPI 版本 Python 版本 加入聊天:https://gitter.im/awesto/django-shop 软件许可 Twitter关注

Here you can find the full documentation for django-SHOP.

Build the database model out of the product's properties – not vice versa

Most e-commerce systems are shipped with a predefined database model for products. But products can vary a lot, and it simply is impossible to create a model which fits for all of them. This is esspecially true for products with a hierarchy of variants. In many popular e-commerce platforms you either have far too many attributes per product, and/or the really required attributes are missing.

In django-SHOP implementations, the product models reflect their pysical properties making it possible to create complete and deep hierarchies of variations, but without having to fiddle with unneeded properties. It furthermore avoids the need for an Entity Attribute Value Model, which is considered a database…

shuup ⭐ 1.9k+ 🍴 900+

GitHub 标志 shuup / shuup

E-Commerce Platform

https://travis-ci.org/shuup/shuup.svg?branch=master https://coveralls.io/repos/github/shuup/shuup/badge.svg?branch=master PyPI 已知漏洞

Shuup

Shuup is an Open Source E-Commerce Platform based on Django and Python.

https://shuup.com/

Copyright

Copyright (c) 2012-2021 by Shuup Commerce Inc. <support@shuup.com>

Shuup is International Registered Trademark & Property of Shuup Commerce Inc., Business ID: BC1126729, Business Address: 1500 West Georgia Suite 1300, Vancouver, BC, V6G-2Z6, Canada.

CLA

Contributor License Agreement is required for any contribution to this project. Agreement is signed as a part of pull request process. See the CLA.rst file distributed with Shuup.

License

Shuup is published under Open Software License version 3.0 (OSL-3.0). See the LICENSE file distributed with Shuup.

Some external libraries and contributions bundled with Shuup may be published under other compatible licenses. For these, please refer to VENDOR-LICENSES.md file in the source code tree or the licenses included within each package.

Chat

We have a Gitter chat room for Shuup. Come chat with us! 加入聊天

Docker quick start

Fastest way to…

eCommerce ⭐ 1.3k+ 🍴 700+

GitHub 标志 codingforentrepreneurs / eCommerce

We're going to take you step-by-step to build a modern, fully open-source, eCommerce web application using Python, Django, Bootstrap, Javascript, and more.

eCommerce

电子商务标志

This course will teach you step-by-step to build a eCommerce site from scratch. We'll be using open-source software to create each aspect of a fully functioning eCommerce business.

Full Course is here: https://www.joincfe.com/courses/ecommerce/

Below you'll find the related lecture code to any given section and lesson. Enjoy!

Code

Section - Hello World

Intial Commit

Section - Products Component

1 - Your first app Module

2 - Understanding CRUD

3 - Product Model

4 - Django Admin

5 - List View

6 - Detail View

7 - ImageField & FileField

8 - Understanding Lookups

9 - Custom Model Managers

10 - Featured & Custom QuerySets

11 - SlugField & Signals

12 - Products URLs

Section: Templates

1 Base Template

2 - Include Tag

3 Pass Arguments with Include

4 - Reusable List View Snippets

5 - Reverse for URLs

6 - Navbar

7 - Template Filters

8 - ForLoop Counter

merchant ⭐ 900+ 🍴 100k+

GitHub 标志 agiliq / merchant

A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant

TravisCI

Django-Merchant is a django application that enables you to use multiple payment processors from a single API.

Gateways

Following gateways are supported:

  • Authorize.net
  • Paypal
  • Eway
  • Braintree Payments (Server to Server)
  • Stripe
  • Paylane
  • WePay
  • Beanstream
  • Chargebee
  • Global Iris

Off-Site Processing

  • Paypal
  • RBS WorldPay
  • Amazon FPS
  • Braintree Payments (Transparent Redirect)
  • Stripe.js
  • eWAY
  • Authorize.net Direct Post Method
  • Global Iris RealMPI

Other

  • Bitcoin

Documentation

Documentation is automatically built and published online at:

http://readthedocs.org/docs/django-merchant/en/latest/

Support

There is a mailing list where discussion regarding the development and usage of merchant happens:

http://groups.google.com/group/django-merchant/




django-lfs ⭐ 500+ 🍴 200+

GitHub 标志 diefenbach / django-lfs

An online-shop based on Django

What is it?

LFS is an online shop based on Python, Django and jQuery.

Information

For more information please visit:

Documentation

For the latest documentation please visit:

Demo shop

A demo shop can be tried here:

Development

For development environment please visit:

Changes

0.11.0 (2017-03-09)

  • Adds Django 1.10 support
  • Excludes variants from sitemap
  • Add appending slash to all urls
  • Use F() expressions to update stock amount (#203)
  • Use F() expression to increase use_amount for vouchers (#202)
  • Removes django-pagination (use Django's default one instead)
  • remove STATIC_URL (user static_url tag instead)
  • fix saving properties and variant prices [pigletto]

0.10.2 (2015-04-25)

  • Updates lfs-paypal to 1.3
  • Fixes all tests

0.10.1 (2015-04-23)

  • Fixes MANIFEST.in
  • Fixes adding and display of reviews when L10N is turned on

0.10.0 (2015-04-22)

  • Adds Django 1.8 support
  • Moves static files to lfs.manage
  • Moves manage templates to lfs.manage

HISTORY

For the complete history please look into HISTORY.txt




django-ecommerce-project ⭐ 200+ 🍴 200+

GitHub 标志 veryacademy / django-ecommerce-project

The Django-Ecommerce is an open-source project initiative and tutorial series built with Python and the Django Framework.

非常学院

Django E-commerce Tutorial Series

Learn Python and the Django Framework by building a e-commerce website
The Django E-commerce project is an open-source initiative and tutorial series. Learn from a beginner level how to build an e-commerce website

Please join our active, growing community:
Website (Coming Soon) | Twitter | YouTube

Aims of this course

The aims of this course is to:

  • learn the Django framework
  • learn how to build, test and deploy a Django application

Course Introduction

The Django E-commerce Tutorial Series is designed for students who wants to learn the Django Framework by building an e-commerce application. This course is a great way to start learning Python and the Django Framework. We start from a beginners level slowly moving into more advanced topics. I have tried to design this course to be modular so that you could also focus in on particular subjects, tutorials or aspects of Django should…

django-oscar-paypal ⭐ 100+ 🍴 200+

GitHub 标志 django-oscar / django-oscar-paypal

PayPal integration for django-oscar. Can be used without Oscar too.

PayPal package for django-oscar

This package provides integration between django-oscar and both PayPal REST API, PayPal Express (NVP) and PayPal Payflow Pro.

These payment options can be used individually or together. Further, the package is structured so that it can be used without Oscar if you so wish.

License

The package is released under the New BSD license.

Support

Having problems or got a question?

  • Have a look at the sandbox site as this is a sample Oscar project integrated with both PayPal options. See the contributing guide within the docs for instructions on how to set up the sandbox locally.
  • Ping @django_oscar with quick queries.
  • Ask more detailed questions on the Oscar mailing list: django-oscar@googlegroups.com
  • Use Github for submitting issues and pull requests.

Tests

覆盖范围

Changelog

2.0.0 (released December 20th, 2019)

  • Add support for Oscar 2.0 and Django 2.2.
  • Drop support for Oscar 1.6 and…

👉 Forms.

🔝 Go To TOC

django-crispy-forms ⭐ 4.5k+ 🍴 700+

GitHub 标志 django-crispy-forms / django-crispy-forms

The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.

django-crispy-forms

http://codecov.io/github/django-crispy-forms/django-crispy-forms/coverage.svg?branch=main

The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered HTML without writing HTML in templates. All this without breaking the standard way of doing things in Django, so it plays nice with any other form application.

django-crispy-forms supports Django 4.2+ with Python 3.8+.

Looking for Bootstrap 5 support? See the crispy-bootstrap5 package.

The application mainly provides:

  • A filter named |crispy that will render elegant div based forms. Think of it as the built-in methods: as_table, as_ul and as_p. You cannot tune up the output, but it is easy to start using it.
  • A tag named {% crispy %} that will render a form based on your configuration and specific layout setup. This gives you amazing power without much hassle, helping you save tons of time.

Django-crispy-forms supports several frontend frameworks, such as Twitter Bootstrap

django-bootstrap3 ⭐ 2.3k+ 🍴 600+

GitHub 标志 zostera / django-bootstrap3

Bootstrap 3 integration with Django.

django-bootstrap3

置信区间 覆盖范围状态 最新 PyPI 版本

Bootstrap 3 for Django.

Goal

The goal of this project is to seamlessly blend Django and Bootstrap 3.

Maintenance Mode

Bootstrap 3 has been superseded by Bootstrap 4, which has since been superseded by Bootstrap 5. As a result, this package is now in maintenance mode and will only receive bug fixes and security updates. No new features or enhancements will be added. We recommend that new projects use Bootstrap 5 and encourage existing projects to consider migrating when feasible.

For Bootstrap 4, please refer to our dedicated package: django-bootstrap4.

For Bootstrap 5, please refer to our dedicated package: django-bootstrap5.

For icons, we recommend our dedicated package: django-icons.

Requirements

This package requires a combination of Python and Django that is currently supported.

See "Supported Versions" on https://www.djangoproject.com/download/.

Documentation

The full documentation is at https://django-bootstrap3.readthedocs.io/

Installation

  1. Install using pip:

    pip install django-bootstrap3
    Enter fullscreen mode Exit fullscreen mode

    Alternatively, you can install…

django-smart-selects ⭐ 1k+ 🍴 300+

GitHub 标志 jazzband / django-smart-selects

chained and grouped selects for django forms

Django Smart Selects

爵士乐队 构建状态 覆盖范围状态 PyPI

This package allows you to quickly filter or group "chained" models by adding a custom foreign key or many to many field to your models. This will use an AJAX query to load only the applicable chained objects.

Works with Django version 3.2 to 5.0.

Warning: The AJAX endpoint enforces no permissions by default. This means that any model with a chained field will be world readable. If you would like more control over this permission, the django-autocomplete-light package is a great, high-quality package that enables the same functionality with permission checks.

Documentation

For more information on installation and configuration see the documentation at:

https://django-smart-selects.readthedocs.io/

Reporting issues / sending PRs

You can try the test_app example using:

python manage.py migrate
python manage.py loaddata test_app/fixtures/*
python manage.py runserver
Enter fullscreen mode Exit fullscreen mode

Then login with admin/admin at http://127.0.0.1:8000/admin/

TODO

  • Add permission checks to enable users to restrict who can…

django-bootstrap4 ⭐ 900+ 🍴 200+

GitHub 标志 zostera / django-bootstrap4

Bootstrap 4 integration with Django.

django-bootstrap 4

测试 覆盖范围状态 最新 PyPI 版本

Bootstrap 4 for Django.

Goal

The goal of this project is to seamlessly blend Django and Bootstrap 4.

Maintenance Mode

Bootstrap 4 has been superseded by Bootstrap 5. As a result, this package is now in maintenance mode and will only receive bug fixes and security updates. No new features or enhancements will be added. We recommend that new projects use Bootstrap 5 and encourage existing projects to consider migrating when feasible.

For Bootstrap 5, please refer to our dedicated package: django-bootstrap5.

Requirements

This package requires a combination of Python and Django that is currently supported.

See "Supported Versions" on https://www.djangoproject.com/download/.

Documentation

The full documentation is at https://django-bootstrap4.readthedocs.io/

Installation

  1. Install using pip:
pip install django-bootstrap4
Enter fullscreen mode Exit fullscreen mode

Alternatively, you can install download or clone this repo and call pip install -e ..

  1. Add to INSTALLED_APPS in your settings.py:
INSTALLED_APPS = (
  # ...
  "bootstrap4"
  #
Enter fullscreen mode Exit fullscreen mode

django-bootstrap-modal-forms ⭐ 300+ 🍴 100+

GitHub 标志 trco / django-bootstrap-modal-forms

A Django plugin for creating AJAX driven forms in Bootstrap modal.

django-forms-builder ⭐ 600+ 🍴 200+

GitHub 标志 stephenmcd / django-forms-builder

Let users build forms in Django admin

https://secure.travis-ci.org/stephenmcd/django-forms-builder.png?branch=master

django-forms-builder

Created by Stephen McDonald

A Django reusable app providing the ability for admin users to create their own forms within the admin interface, drawing from a range of field widgets such as regular text fields, drop-down lists and file uploads. Options are also provided for controlling who gets sent email notifications when a form is submitted. All form entries are made available in the admin via filterable reporting with CSV/XLS export.

Form builder:

https://raw.githubusercontent.com/stephenmcd/django-forms-builder/master/docs/img/fields.png

Data reporting:

https://raw.githubusercontent.com/stephenmcd/django-forms-builder/master/docs/img/report.png

HTML5 Features

The following HTML5 form features are supported.

  • placeholder attributes
  • required attributes
  • email fields
  • date fields
  • datetime fields
  • number fields
  • url fields

Installation

The easiest way to install django-forms-builder is directly from PyPi using pip by running the command below:

$ pip install -U django-forms-builder
Enter fullscreen mode Exit fullscreen mode

Otherwise you can download django-forms-builder and install it directly from source:

$ python setup.py install
Enter fullscreen mode Exit fullscreen mode

Once installed you can configure your project to use django-forms-builder with the following…

django-formtools ⭐ 500+ 🍴 100+

GitHub 标志 jazzband / django-formtools

A set of high-level abstractions for Django forms

django-formtools

爵士乐队 PyPI 版本 支持的 Python 版本 GitHub Actions 测试覆盖率

Django's "formtools" is a set of high-level abstractions for Django forms Currently for form previews and multi-step forms.

This code used to live in Django proper -- in django.contrib.formtools -- but was separated into a standalone package in Django 1.8 to keep the framework's core clean.

For a full list of available formtools, see https://django-formtools.readthedocs.io/

django-formtools can also be found on and installed from the Python Package Index: https://pypi.python.org/pypi/django-formtools

To get more help:

Contributing to django-formtools

See CONTRIBUTING.rst for information about contributing patches to django-formtools.

Running tests is as simple as installing Tox and running it in the root Git clone directory:

$ git clone https://github.com/jazzband/django-formtools
[..]
$ cd django-formtools
$ tox
[..]
  congratulations :)

The previous command will run the tests in…

django-remote-forms ⭐ 200+ 🍴 100+

GitHub 标志 WiserTogether / django-remote-forms

A platform independent django form serializer

django-remote-forms

A package that allows you to serialize django forms, including fields and widgets into Python dictionary for easy conversion into JSON and expose over API

Please go through my djangocon US 2012 talk to understand the problem sphere, motivations, challenges and implementation of Remote Forms

Sample Implementation

If you don't mind digging around a little bit to learn about different the components that might be necessary for an implementation of django-remote-forms, check out django Remote Admin django-remote-admin

Usage

Minimal Example

from django_remote_forms.forms import RemoteForm

form = LoginForm()
remote_form = RemoteForm(form)
remote_form_dict = remote_form.as_dict()
Enter fullscreen mode Exit fullscreen mode

Upon converting the dictionary into JSON, it looks like this:

{
    "is_bound": false
    "non_field_errors": [],
    "errors": {},
    "title": "LoginForm",
    "fields": {
        "username": {
            "title": "CharField",
            "required": true,
            "label": "Username
Enter fullscreen mode Exit fullscreen mode

django-betterforms ⭐ 100+ 🍴 10+

GitHub 标志 fusionbox / django-betterforms

Making forms suck less

django-betterforms

构建状态 构建状态

django-betterforms builds on the built-in django forms.

Installation

  1. Install the package:

    $ pip install django-betterforms
    
  2. Add betterforms to your INSTALLED_APPS.




django-bootstrap5 ⭐ 100+ 🍴 10+

GitHub 标志 zostera / django-bootstrap5

Bootstrap 5 for Django

django-bootstrap5

测试 覆盖范围状态 最新 PyPI 版本

Bootstrap 5 for Django.

Goal

The goal of this project is to seamlessly blend Django and Bootstrap 5.

Status

Ready for production. Issues and pull requests welcome, see CONTRIBUTING.md.

Requirements

This package requires a combination of Python and Django that is currently supported.

See "Supported Versions" on https://www.djangoproject.com/download/.

This package uses uv and just for local development.

Documentation

The full documentation is at https://django-bootstrap5.readthedocs.io/

Installation

  1. Install using pip:

    pip install django-bootstrap5
    Enter fullscreen mode Exit fullscreen mode
  2. Add to INSTALLED_APPS in your settings.py:

    INSTALLED_APPS = (
        # ...
        "django_bootstrap5",
        # ...
    )
    Enter fullscreen mode Exit fullscreen mode
  3. In your templates, load the django_bootstrap5 library and use the bootstrap_* tags. See example below.

Example template

{% load django_bootstrap5 %}
<form action="/url/to/submit/" method="post" class="form">
    {% csrf_token %}

    {% bootstrap_form form %}

    {% bootstrap_button button_type="submit" content="OK" %}
    {% bootstrap_button button_type
Enter fullscreen mode Exit fullscreen mode

django-form-fun ⭐ 100+ 🍴 200+




django-mongodbforms ⭐ 10+ 🍴 10+

GitHub 标志 jschrewe / django-mongodbforms

Django forms for mongodb documents

django mongodbforms

This is an implementation of django's model forms for mongoengine documents.

Requirements

Supported field types

Mongodbforms supports all the fields that have a simple representation in Django's formfields (IntField, TextField, etc). In addition it also supports ListFields and MapFields.

File fields

Mongodbforms handles file uploads just like the normal Django forms. Uploaded files are stored in GridFS using the mongoengine fields. Because GridFS has no directories and stores files in a flat space an uploaded file whose name already exists gets a unique filename with the form <filename>_<unique_number>.<extension>.

Container fields

For container fields like ListFields and MapFields a very simple widget is used. The widget renders the container content in the appropriate field plus one empty field. This is mainly done to not introduce any Javascript dependencies, the backend code will happily handle any kind of dynamic form, as long…

👉 Geolocation.

🔝 Go To TOC

django-countries ⭐ 1.2k+ 🍴 200+

GitHub 标志 SmileyChris / django-countries

A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries

PyPI 版本 构建状态

A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Country names are translated using Django's standard gettext. If you would like to help by adding a translation, please visit https://www.transifex.com/smileychris/django-countries/

Installation

  1. pip install django-countries

    For more accurate sorting of translated country names, install it with the optional pyuca package:

    pip install django-countries[pyuca]

  2. Add django_countries to INSTALLED_APPS

CountryField

A country field for Django models that provides all ISO 3166-1 countries as choices.

CountryField is based on Django's CharField, providing choices corresponding to the…

django-places ⭐ 10+ 🍴 10+

GitHub 标志 oscarmcm / django-places

A django app for store places with autocomplete

PyPI

A Django app for store places with autocomplete function and a related map to the selected place.

Quickstart


Install dj-places and add it to your installed apps:

$ pip install dj-places
    INSTALLED_APPS = (
        ...
        'places',
        ...
    )

Add the following settings and maps api key (read more here):

PLACES_MAPS_API_KEY='YourAwesomeUltraSecretKey'
PLACES_MAP_WIDGET_HEIGHT=480
PLACES_MAP_OPTIONS='{"center": { "lat": 38.971584, "lng": -95.235072 }, "zoom": 10}'
PLACES_MARKER_OPTIONS='{"draggable": true}'
Enter fullscreen mode Exit fullscreen mode

Usage


Then use it in a project:

from django.db import models
from places.fields import PlacesField


class MyLocationModel(models.Model):
    location = PlacesField()
Enter fullscreen mode Exit fullscreen mode

This enables the following API:

    >>> from myapp.models import ModelName
    >>> poi = ModelName.objects.get(id=1)
    >>> poi.position
    Place('Metrocentro, Managua, Nicaragua', 52.522906, 13.41156)
    >>> poi.position
Enter fullscreen mode Exit fullscreen mode

geodjango ⭐ 10+ 🍴 1+

GitHub 标志 paulsmith / geodjango

GeoDjango provides geospatial extensions to the Django web dev framework

Django is a high-level Python Web framework that encourages rapid development
and clean, pragmatic design
All documentation is in the "docs" directory and online at
http://www.djangoproject.com/documentation/.  If you're just getting started
here's how we recommend you read the docs
    * First, read docs/install.txt for instructions on installing Django.

    * Next, work through the tutorials in order (docs/tutorial01.txt,
      docs/tutorial02.txt, etc.).

    * If you want to set up an actual deployment server, read docs/modpython.txt
      for instructions on running Django under mod_python.

    * The rest of the documentation is of the reference-manual variety.
      Read it -- and the FAQ -- as you run into problems.

Docs are updated rigorously. If you find any problems in the docs, or think they
should be clarified in any way, please take 30 seconds to fill out a ticket
here:

http://code.djangoproject.com/newticket

To get more help:

    * Join the #django channel on irc.freenode.net. Lots of helpful people

ipapi-python ⭐ 10+ 🍴 10+

GitHub 标志 ipapi-co / ipapi-python

Python bindings for https://ipapi.co (IP Address Location) - Use with python / django / flask for IP address location lookup

ipapi Python Library ~ ipapi.co by Kloudend, Inc.

IP Address Location | IP Lookup | IP Geolocation API

The ipapi Python library provides convenient access to the IP address location service from applications written in the Python language. It makes it easy to harness the potential of the IP geolocation API.

Details on free IP lookup and ipapi pricing plans

Documentation

See the ipapi API docs

Installation

pip install --upgrade ipapi

or Install from source with:

python setup.py install

Requirements

Python 2.7+ or Python 3.4+

QuickStart

>>> import ipapi

>>> ipapi.location()
{
  "ip": "8.8.8.8",
  "city": "Mountain View",
  "country": "US",
  "timezone": "America/Los_Angeles",
  ...
}
Enter fullscreen mode Exit fullscreen mode

Usage : As an IP Location library

import ipapi

ipapi.location(ip, key, output)
Enter fullscreen mode Exit fullscreen mode
Argument Description
ip IP Address (IPv4 or IPv6) that you wish to locate.
If

Django-with-Geolocation ⭐ 10+ 🍴 10+

GitHub 标志 pyplane / Django-with-Geolocation

GeoLocation and Folium Project with Django.

Django with GeoLocation

GeoLocation and Folium Project with Django.

Calculate and visualize the distance between the current location and the destination.

替代文字




django-ip-geolocation ⭐ 10+ 🍴 1+

GitHub 标志 rednaks / django-ip-geolocation

IP Geolocation Hooks for django

PyPI 版本 下载 构建状态

Django Ip Geolocation

Django request/response hooks to geolocate visitors by their ip address.

Installing

python -m pip install django-ip-geolocation

Usage

Decorator

Use decorators to decorate views:

from django_ip_geolocation.decorators import with_ip_geolocation

@with_ip_geolocation
def api_view(request):
   location = request.geolocation
   ...
Enter fullscreen mode Exit fullscreen mode

Middleware

First you need to add the middleware into your settings.py.

MIDDLEWARE = [
    ...
    'django_ip_geolocation.middleware.IpGeolocationMiddleware',
    ...
]
Enter fullscreen mode Exit fullscreen mode

Then the location is available to all views in request and response:

def api_view(request):
   location = request.geolocation
   ...
   
def other_view(request):
  location = request.geolocation
  ...
Enter fullscreen mode Exit fullscreen mode

Cookie

Geolocation data stored in the Response cookie lacks the raw_data and is base64 encoded.

User consent

Developers must implement a helper function to check if the user consented or not and configure it in the settings.py.

By default if the developer didn't provide a validation function, we consider it…

👉 Job Scheduler.

🔝 Go To TOC

django-schedule ⭐ 800+ 🍴 200+

GitHub 标志 thauber / django-schedule

A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Django-schedule

A calendaring/scheduling application, featuring:

  • one-time and recurring events
  • calendar exceptions (occurrences changed or cancelled)
  • occurrences accessible through Event API and Period API
  • relations of events to generic objects
  • ready to use, nice user interface
  • view day, week, month, three months and year
  • project sample which can be launched immediately and reused in your project

See see wiki page for more.

Installation

Download the code; put in into your project’s directory or run

python setup.py install
to install system-wide

REQUIREMENTS: python-vobject (comes with most distribution as a package).

Settings.py

REQUIRED

INSTALLED_APPS – add:
‘schedule’

TEMPLATE_CONTEXT_PROCESSORS – add:
“django.core.context_processors.request”

Optional

FIRST_DAY_OF_WEEK

This setting determines which day of the week your calendar begins on if your locale doesn’t already set it. Default is 0, which is Sunday.

OCCURRENCE_CANCEL_REDIRECT

This setting controls the behavior of :func:`Views.get_next_url`. If set, all calendar modifications will redirect here (unless there is a `next` set in the…

django-crontab ⭐ 700+ 🍴 100+

GitHub 标志 kraiz / django-crontab

dead simple crontab powered job scheduling for django.

about

dead simple crontab powered job scheduling for django (1.8-2.0).

setup

install via pip:

pip install django-crontab
Enter fullscreen mode Exit fullscreen mode

add it to installed apps in django settings.py:

INSTALLED_APPS = (
    'django_crontab',
    ...
)
Enter fullscreen mode Exit fullscreen mode

now create a new method that should be executed by cron every 5 minutes, f.e. in myapp/cron.py:

def my_scheduled_job():
  pass
Enter fullscreen mode Exit fullscreen mode

now add this to your settings.py:

CRONJOBS = [
    ('*/5 * * * *', 'myapp.cron.my_scheduled_job')
]
Enter fullscreen mode Exit fullscreen mode

you can also define positional and keyword arguments which let you call django management commands:

CRONJOBS = [
    ('*/5 * * * *', 'myapp.cron.other_scheduled_job', ['arg1', 'arg2'], {'verbose': 0}),
    ('0   4 * * *', 'django.core.management.call_command', ['clearsessions']),
]
Enter fullscreen mode Exit fullscreen mode

finally, run this command to add all defined jobs from CRONJOBS to crontab (of the user which you are running this command with):

python manage.py crontab add
Enter fullscreen mode Exit fullscreen mode

show…

django-rq-scheduler ⭐ 10+ 🍴 10+

GitHub 标志 islco / django-rq-scheduler

A database backed job scheduler for Django RQ and RQ Scheduler

Django RQ Scheduler

A database backed job scheduler for Django RQ.

Requirements

Currently, when you pip install Django RQ Scheduler the following packages are also installed.

  • django >= 1.9
  • django-model-utils >= 2.4
  • django-rq >= 0.9.3 (Django RQ requires RQ >= 0.5.5)
  • rq-scheduler >= 0.6.0
  • pytz >= 2015.7
  • croniter >= 0.3.24

Testing also requires:

  • factory_boy >= 2.6.1
  • psycopg2 >= 2.6.1

Usage

Install

Use pip to install:

pip install django-rq-scheduler

Update Django Settings

  1. In settings.py, add django_rq and scheduler to INSTALLED_APPS:

    
    INSTALLED_APPS = [
        ...
        'django_rq',
        'scheduler',
        ...
    ]
    
    
    
  2. Configure Django RQ. See https://github.com/ui/django-rq#installation

Migrate

The last step is migrate the database:

./manage.py migrate

Creating a Job

See http://python-rq.org/docs/jobs/ or https://github.com/ui/django-rq#job-decorator

An example:

myapp.jobs.py

@job
def count():
    return 1 + 1

Scheduling a Job

Scheduled Job

  1. Sign into the Django Admin site, http://localhost:8000/admin/ and locate the Django RQ Scheduler section.

  2. Click on the Add link for Scheduled Job.

  3. Enter a…

django-future ⭐ 10+ 🍴 10+

GitHub 标志 shrubberysoft / django-future

Scheduled jobs in Django

-----
About
-----
**django-future** is a Django application for scheduling jobs on specified
times
**django-future** allows you to schedule invocation of callables at a given
time.  The job queue is stored in the database and can be managed through the
admin interface.  Queued jobs are run by invoking an external django management
command
-----
Usage
-----

You need to have **django-future** installed. A recent version should be
available from PyPI.

To schedule jobs from your code, use the ``schedule_job`` function::

    >>> from django_future import schedule_job
    >>> import datetime

    >>> schedule_job(datetime.datetime(2010, 10, 10),
    ...              'myproject.myapp.handlers.dosomething')

------------
Running jobs
------------

Scheduled jobs will not start automagically.  The job queue must regularly
be processed by invoking the Django management command
``runscheduledjobs``.  You will probably want to run this command regularly,
perhaps in a cron job, to ensure that scheduled jobs are run in a timely
manner.

When the job processor is started, it

django-rq-jobs ⭐ 10+ 🍴 10+

GitHub 标志 Koed00 / django-rq-jobs

Provides scheduled jobs management from the Django Admin using Django-RQ

#Django RQ Jobs

Provides scheduled jobs management from the Django Admin using Django-RQ

管理员截图

##Requirements

##Installation

  • Make sure you have Django-RQ up and running before you do anything This app is just a simple admin plugin to manage your scheduled tasks and management commands.

  • Install the package with pip install django-rq-jobs

  • Add django_rq_jobs to INSTALLED_APPS in settings.py:

INSTALLED_APPS = (
    # other apps
    "django_rq",
    "django_rq_jobs",
)
Enter fullscreen mode Exit fullscreen mode
  • Add RQ_JOBS_MODULE in settings.py. A string or a tuple of strings designating all modules where you keep your jobs. Anything marked with the Django RQ's @job decorator will show up in the admin.
# A singe module:
RQ_JOBS_MODULE = 'myapp.tasks'

# or with multiple modules:
RQ_JOBS_MODULE = (
    'myapp.tasks',
    'anotherapp.tasks',
)
Enter fullscreen mode Exit fullscreen mode
  • Run python manage.py migrate to create the job model.

  • Open your Django admin and find the RQ Jobs scheduled job section and schedule something.

  • Schedule the heartbeat…

👉 News Feed.

🔝 Go To TOC

django-activity-stream ⭐ 2.1k+ 🍴 400+

GitHub 标志 justquick / django-activity-stream

Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams.

Django Activity Stream

加入聊天:https://gitter.im/django-activity-stream/Lobby https://coveralls.io/repos/github/justquick/django-activity-stream/badge.svg?branch=master https://scrutinizer-ci.com/g/justquick/django-activity-stream/badges/quality-score.png?b=master

What is Django Activity Stream?

Django Activity Stream is a way of creating activities generated by the actions on your site.

It is designed for generating and displaying streams of interesting actions and can handle following and unfollowing of different activity sources. For example, it could be used to emulate the Github dashboard in which a user sees changes to projects they are watching and the actions of users they are following.

Action events are categorized by four main components.

  • Actor. The object that performed the activity.
  • Verb. The verb phrase that identifies the action of the activity.
  • Action Object. (Optional) The object linked to the action itself.
  • Target. (Optional) The object to which the activity was performed.

Actor, Action Object and Target are GenericForeignKeys to any arbitrary Django object and so can represent any Django model in your project An action…

stream-django ⭐ 400+ 🍴 10+

GitHub 标志 GetStream / stream-django

Django Client - Build Activity Feeds & Streams with GetStream.io

Stream Django

建造 PyPI 版本

stream-django is a Django client for Stream, it supports Django from 1.11 up to and including 4.0 using Python 2.7 and 3.4, 3.5, 3.6+.

You can sign up for a Stream account at https://getstream.io/get_started.

Note there is also a lower level Python - Stream integration library which is suitable for all Python applications.

💡 This is a library for the Feeds product. The Chat SDKs can be found here.

Build activity streams & news feeds

Examples of what you can build

You can build:

  • Activity streams such as seen on Github
  • A twitter style newsfeed
  • A feed like instagram/ pinterest
  • Facebook style newsfeeds
  • A notification system

Example apps

You can check out our example apps built using this library (you can deploy them directly to Heroku with 1 click):

Table of Contents

django-user-streams ⭐ 10+ 🍴 10+

GitHub logo dabapps / django-user-streams

DEPRECATED: Simple, fast user news feeds for Django

django-user-streams

Simple, fast user news feeds for Django

Author: Jamie Matthews. Follow me on Twitter.

build-status-image

Requirements

  • Django 1.3, 1.4, 1.5

Overview

An app for creating news feeds (also known as activity streams) for users, notifying them of activity happening around your site. Optimised for speed, pluggability and simplicity.

News feed items are stored as a string and a timestamp. You can't store any additional metadata about the stream items, such as generic foreign keys to and Actor or a Target. You just store the item content as plain text (or HTML). If you need links to other objects, just insert an <a> tag.

DEPRECATED

PLEASE NOTE: This repository is no longer actively maintained or regularly used by DabApps and therefore should be considered deprecated. Please find alternative packages for your needs or feel free to create and maintain your own fork.

Installation

You can install django-user-streams from…

Singular-New ⭐ 1+ 🍴 10+

GitHub logo ExpressHermes / Singular-News

A Django news app powered with machine learning to provide personalised feed to the users based on their interactions on the app.

Singular News

Gitter

A news app powered with machine learning to provide personalized feed to the users based on their interactions on the app.

Installation

Prerequsites

  • Python
  • Django
  • PostgreSQL

How to set up locally

  • Fork and clone repo on your machine.

    git clone https://github.com/ExpressHermes/Singular-News.git
    
  • Create a virtual environment. Activate it. Make sure it is in the same directory as the cloned repo.

    # for linux users
    python -m venv <env-name>
    source venv/bin/activate 
    
  • Install all requirements.

    pip install -r requirements.txt
    
  • In settings.py inside Indus, replace email settings with your email address and password to allow email verification. Remember to remove these when committing to github.

    EMAIL_HOST_USER = os.environ.get('EMAIL_HOST_USER') # relpace with your email
    EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD') # replace with email password
    
  • Inside the project folder, create migrations for the apps users and feeds

    python manage.py makemigrations
    python manage.py migrate
    
  • Run the project

    python manage.py runserver
    

Contribution Guidelines

  • Fork and star the repo.

Location-based-news-recommendation ⭐ 1+ 🍴 1+

GitHub logo AselSiriwardena / Location-based-news-recommendation

A news recommendation system uses RSS news feeds in major Sri Lankan news sources and suggests them to users based on user's interests and the location.

Location-based-news-reccomendation

Our problem is that now a days people getting various news feeds and for them they act like garbage Because most of them are useless for users. So it is better if we can arrange news feed according to users preference and categorize them So in arranging it is better to organize based on location or user related feeds. So as a result we decide to create user friendly system without wasting their valuable time and their related areas, locations.

In this project we are trying to get users preferences about their news choices and as a result of hectic life pattern of people we are going to recommend our users what they only wish to watch. Another feature of this is that this is according to location. So technologies we are wishing to use are ML, NLP, Web Crowling etc

when publisher upload some articles into their system…

👉 ORM.

🔝 Go To TOC

django-model-utils ⭐ 2.3k+ 🍴 300+

GitHub logo jazzband / django-model-utils

Django model mixins and utilities.




django-cacheops ⭐ 1.7k+ 🍴 200+

GitHub logo Suor / django-cacheops

A slick ORM cache with automatic granular event-driven invalidation.

Cacheops Build Status

A slick app that supports automatic or manual queryset caching and automatic granular event-driven invalidation.

It uses redis as backend for ORM cache and redis or filesystem for simple time-invalidated one.

And there is more to it:

  • decorators to cache any user function or view as a queryset or by time
  • extensions for django and jinja2 templates
  • transparent transaction support
  • dog-pile prevention mechanism
  • a couple of hacks to make django faster

Python 3.8+, Django 3.2+ and Redis 4.0+.

Using pip:

$ pip install django-cacheops

# Or from github directly
$ pip install git+https://github.com/Suor/django-cacheops.git@master
Enter fullscreen mode Exit fullscreen mode

Add cacheops to your INSTALLED_APPS

django-money ⭐ 1.3k+ 🍴 200+

GitHub logo django-money / django-money

Money fields for Django forms and models.

django-money

Build Status Coverage Status Documentation Status PyPI

A little Django app that uses py-moneyed to add support for Money fields in your models and forms.

  • Django versions supported: 2.2, 3.2, 4.0, 4.1, 4.2
  • Python versions supported: 3.7, 3.8, 3.9, 3.10, 3.11
  • PyPy versions supported: PyPy3 (for Django <= 4.0)

If you need support for older versions of Django and Python, please refer to older releases mentioned in the release notes.

Through the dependency py-moneyed, django-money gets:

  • Support for proper Money value handling (using the standard Money design pattern)
  • A currency class and definitions for all currencies in circulation
  • Formatting of most currencies with correct currency sign

Installation

Using pip:

$ pip install django-money
Enter fullscreen mode Exit fullscreen mode

This automatically installs py-moneyed v1.2 (or later).

Add djmoney to your INSTALLED_APPS. This is required so that money field are displayed correctly in the admin.

INSTALLED_APPS = [
   ...,
   'djmoney',
   ...
]
Enter fullscreen mode Exit fullscreen mode

Model usage

Use as normal model fields:

Enter fullscreen mode Exit fullscreen mode

django-modeltranslation ⭐ 1.1k+ 🍴 200+

GitHub logo deschler / django-modeltranslation

Translates Django models using a registration approach.

Modeltranslation

Stand With Ukraine
http://img.shields.io/coveralls/deschler/django-modeltranslation.svg?style=flat-square Latest PyPI version Supported Python versions Join the chat at https://gitter.im/django-modeltranslation/community

The modeltranslation application is used to translate dynamic content of existing Django models to an arbitrary number of languages without having to change the original model classes. It uses a registration approach (comparable to Django's admin app) to be able to add translations to existing or new projects and is fully integrated into the Django admin backend.

The advantage of a registration approach is the ability to add translations to models on a per-app basis. You can use the same app in different projects, may they use translations or not, and you never have to touch the original model class.

Features

  • Add translations without changing existing models or views
  • Translation fields are stored in the same table (no expensive joins)
  • Supports inherited models (abstract and multi-table inheritance)
  • Handle more than just text fields
  • Django admin integration
  • Flexible fallbacks, auto-population and more!

For the latest documentation, visit https://django-modeltranslation.readthedocs.io/en/latest/.




django-cache-machine ⭐ 800+ 🍴 100+

GitHub logo django-cache-machine / django-cache-machine

Automatic caching and invalidation for Django models through the ORM.

Cache Machine

Cache Machine provides automatic caching and invalidation for Django models through the ORM.

For full docs, see https://cache-machine.readthedocs.org/en/latest/.

Requirements

Cache Machine currently works with:

  • Django 2.2, 3.0, 3.1, 3.2, and 4.0
  • Python 3.6, 3.7, 3.8, 3.9, and 3.10

The last version to support Python 2.7 and Django 1.11 is django-cache-machine==1.1.0.

Installation

Get it from pypi:

pip install django-cache-machine

Running Tests

Get it from github:

git clone git://github.com/django-cache-machine/django-cache-machine.git
cd django-cache-machine
pip install -r dev-requirements.txt
python run_tests.py



Django-ORM ⭐ 200+ 🍴 10+

GitHub logo dancaron / Django-ORM

Django-ORM-Standalone Template - Use the power of Django's database functionality in regular python scripts.

Django ORM Standalone

Django Python

Use the database components of Django without having to use the rest of Django (i.e. running a web server)! 🎉 A typical use case for using this template would be if you are writing a python script and you would like the database functionality provided by Django, but have no need for the request/response functionalty of a client/server web application that Django also provides.

With this project template you can write regular python scripts and use Django's excellent ORM functionality with the database backend of your choice. This makes it convienient for Djangonauts to write database driven python applications with the familiar and well polished Django ORM. Enjoy.

⚙️ Requirements

  • Last tested successfully with Python 3.10.4 and Django 5.0.6
  • Create venv and pip install django to import the required modules.

📂 File Structure

django-orm/
├── db/
│   ├── __init__.py
│   └── models.py
├── main.py
├── manage.py
├──

👉 Permissions.

🔝 Go To TOC

django-guardian ⭐ 3.3k+ 🍴 500+

GitHub logo django-guardian / django-guardian

Per object permissions for Django

django-guardian

Tests PyPI version Python versions

django-guardian is an implementation of per-object permissions on top of Django’s authorization backend. Read an introduction to per-object permissions on djangoadvent articles.

Documentation

Online documentation is available at https://django-guardian.readthedocs.io/.

Installation

To install django-guardian into your project run:

uv add django-guardian
Enter fullscreen mode Exit fullscreen mode

TIP: Not using a package manager like uv or poetry for your django project? You probably should try them :). In the meantime, pip install django-guardian works just fine too.

Configuration

We need to hook django-guardian into our project.

  1. Put guardian into your INSTALLED_APPS at settings module:
INSTALLED_APPS = (
    ...
    'guardian',
)
Enter fullscreen mode Exit fullscreen mode
  1. Add extra authorization backend to your settings.py:
AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'guardian.backends.ObjectPermissionBackend',
)
Enter fullscreen mode Exit fullscreen mode
  1. Create guardian database tables by running:
python manage.py migrate

Usage

After installation and project hooks we can finally use object permissions with Django.

Lets start really quickly:

>>> from django.contrib.auth.
Enter fullscreen mode Exit fullscreen mode

django-rules ⭐ 1.5k+ 🍴 100+

GitHub logo dfunckt / django-rules

Awesome Django authorization, without the database

rules

rules is a tiny but powerful app providing object-level permissions to Django, without requiring a database. At its core, it is a generic framework for building rule-based systems, similar to decision trees. It can also be used as a standalone library in other contexts and frameworks.

https://img.shields.io/github/workflow/status/dfunckt/django-rules/CI/master https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white

Features

rules has got you covered. rules is:

  • Documented, tested, reliable and easy to use.
  • Versatile. Decorate callables to build complex graphs of predicates Predicates can be any type of callable -- simple functions, lambdas, methods, callable class objects, partial functions, decorated functions, anything really.
  • A good Django citizen. Seamless integration with Django views, templates and the Admin for testing for object-level permissions.
  • Efficient and smart. No need to mess around with a database to figure out whether John really wrote that book.
  • Simple. Dive in the code. You'll need 10 minutes to figure out…

django-role-permissions ⭐ 500+ 🍴 100+

GitHub logo vintasoftware / django-role-permissions

A django app for role based permissions.

django-role-permissions

Build Status Coverage Status Current version at PyPI Supported Python Versions

django-role-permissions is a django app for role based permissions. It's built on top of django contrib.auth user Group and Permission functionalities and it does not add any other models to your project.

django-role-permissions supports Django versions from 1.5 until the latest.

Version 2.x now supports multiple roles!

Documentation

Documentation is available at:

http://django-role-permissions.readthedocs.org/

If you are still using the 1.x version the old documentation is at:

http://django-role-permissions.readthedocs.io/en/1.x/

Running tests

This packages uses tox to run tests on multiple evironments, please make sure they are passing before submitting a pull request. To run tests, install tox and run it in the command line from this project's folder:

$ tox

Maintainers

How to Release:

Pre release:

  • Include the changes in CHANGELOG
  • Update the version in rolepermissions/__init__.py
  • Update the classifiers in setup.py

Release:

Post release:

Help

If you have…

djangorestframework-api-key ⭐ 400+ 🍴 10+

GitHub logo florimondmanca / djangorestframework-api-key

🔐 API key permissions for Django REST Framework

Django REST Framework API Key

API key permissions for the Django REST Framework.

python versions django versions drf versions

Introduction

Django REST Framework API Key is a library for allowing server-side clients to safely use your API. These clients are typically third-party backends and services (i.e. machines) which do not have a user account but still need to interact with your API in a secure way.

Features

  • ✌️ Simple to use: create, view and revoke API keys via the admin site, or use built-in helpers to create API keys programmatically.
  • 🔒 As secure as possible: API keys are treated with the same level of care as user passwords. They are only visible at creation and hashed before storing in the database.
  • 🎨 Customizable: satisfy specific business requirements by building your own customized API key models, permission classes and admin panels.

Should I use API keys?

There are important security aspects you…

dry-rest-permissions ⭐ 300+ 🍴 10+

GitHub logo dbkaplan / dry-rest-permissions

Rules based permissions for the Django Rest Framework

dry-rest-permissions

Overview

Rules based permissions for the Django Rest Framework.

This framework is a perfect fit for apps that have many tables and relationships between them. It provides a framework that allows you to define, for each action or groups of actions, what users have permission for based on existing data in your database.

What does DRY Rest Permissions provide?

  1. A framework for defining global and object level permissions per action.
  2. Support for broadly defining permissions by grouping actions into safe and unsafe types.
  3. Support for defining only global (table level) permissions or only object (row level) permissions.
  4. Support for custom list and detail actions.
  5. A serializer field that will return permissions for an object to your client app. This is DRY and works with your existing permission definitions.
  6. A framework for limiting list requests based on permissions
  7. Support for custom list actions

Why is DRY Rest Permissions different than

django-authority ⭐ 200+ 🍴 10+

GitHub logo jazzband / django-authority

A Django app that provides generic per-object-permissions for Django's auth app and helpers to create custom permission checks.

django-authority

Jazzband GitHub Actions

This is a Django app for per-object-permissions that includes a bunch of helpers to create custom permission checks.

The main website for django-authority is django-authority.readthedocs.org. You can also install the in-development version of django-authority with pip install django-authority==dev or easy_install django-authority==dev.

Example

To get the example project running do:

  • Bootstrap the environment by running in a virtualenv:

    pip install Django
    pip install -e .
    
  • Sync the database:

    python example/manage.py migrate
    
  • Run the development server and visit the admin at http://127.0.0.1:8000/admin/:

    python example/manage.py runserver
    

Now create a flatage and open it to see some of the templatetags in action. Don't hesitate to use the admin to edit the permission objects.

Please use https://github.com/jazzband/django-authority/issues/ for issues and bug reports.

Documentation

The documenation is currently in development. You can create a nice looking html version using the setup.py:

python setup.py build_sphinx

Changelog:

0.15 (unreleased):

  • Moved CI to GitHub Actions.

👉 RESTful API.

🔝 Go To TOC

django-rest-framework ⭐ 24.1k+ 🍴 6.3k+

GitHub logo encode / django-rest-framework

Web APIs for Django. 🎸

build-status-image coverage-status-image pypi-version

Awesome web-browsable Web APIs.

Full documentation for the project is available at https://www.django-rest-framework.org/.


Funding

REST framework is a collaboratively funded project. If you use REST framework commercially we strongly encourage you to invest in its continued development by signing up for a paid plan.

The initial aim is to provide a single full-time position on REST framework Every single sign-up makes a significant impact towards making that possible.

Many thanks to all our wonderful sponsors, and in particular to our premium backers, Sentry, Stream, Spacinov, Retool, bit.io, PostHog, CryptAPI, FEZTO, Svix, and Zuplo.


Overview

Django REST framework is a powerful and flexible toolkit for building Web APIs.

Some reasons you might want to use REST framework:

  • The Web browsable API is a huge usability win for your developers.
  • Authentication policies including optional packages…

django-tastypie ⭐ 3.8k+ 🍴 1.2k+

GitHub logo django-tastypie / django-tastypie

Creating delicious APIs for Django apps since 2010.

django-tastypie

Docs CI Code Coverage Version Downloads

Creating delicious APIs for Django apps since 2010.

Currently in beta but being used actively in production on several sites.

Requirements

Core

  • Python 3.8+ (Whatever is supported by your version of Django)
  • Django 4.2 (LTS releases) or Django 4.0+ (intermediate releases, including 5.0 and 5.1)
  • dateutil (http://labix.org/python-dateutil) >= 2.1

Format Support

Optional

What's It Look Like?

A basic example looks like:

# myapp/api.py
# ============
from tastypie.resources import ModelResource
from myapp.models import Entry
class EntryResource(ModelResource):
    class Meta:
        queryset = Entry.objects.all()


# urls.py
# =======
from django.urls.conf import re_path, include
from tastypie.api import Api
from myapp.api import
Enter fullscreen mode Exit fullscreen mode

django-oscar-api ⭐ 300+ 🍴 100+

GitHub logo django-oscar / django-oscar-api

RESTful JSON API for django-oscar

Django Oscar API

This package provides a RESTful API for django-oscar.

https://travis-ci.org/django-oscar/django-oscar-api.svg?branch=master Coverage Documentation Status Latest PyPi release

Usage

To use the Oscar API application in an Oscar E-commerce site, follow these steps:

  1. Install the django-oscar-api package (pip install django-oscar-api).

  2. Add rest_framework and oscarapi to INSTALLED_APPS

    INSTALLED_APPS = [
     ...
     'rest_framework',
     'oscarapi',
    ]
    Enter fullscreen mode Exit fullscreen mode
  3. Add the application's urls to your urlconf

    from django.urls import include
    
    urlpatterns = (
        # all the things you already have
        path("api/", include("oscarapi.urls")),
    )
    Enter fullscreen mode Exit fullscreen mode
  4. Apply migrations:

    python manage.py migrate
    

See the Documentation for more information and the Changelog for release notes.




channels-api ⭐ 300+ 🍴 10+

GitHub logo linuxlewis / channels-api

RESTful Websocket APIs with Django Rest Framework and Channels

Channels API

https://travis-ci.org/linuxlewis/channels-api.svg?branch=master

Channels API exposes a RESTful Streaming API over WebSockets using channels. It provides a ResourceBinding which is comparable to Django Rest Framework's ModelViewSet. It is based on DRF serializer classes.

It requires Python 2.7 or 3.x, Channels <=1.1.8.1, Django <=1.11, and Django Rest Framework 3.x

You can learn more about channels-api from my talk at the SF Django Meetup or PyBay 2016

Table of Contents

How does it work?

The API builds on top of channels' WebsocketBinding class. It works by having the client send a stream and payload parameters. This allows us to route messages to different streams (or resources) for a particular action. So POST /user would have a message that looks like the following

var msg = {
  stream: "users",
  payload: {
    action: "create",
    data: {
      email: "test@example.com",
      password
Enter fullscreen mode Exit fullscreen mode

👉 Search.

🔝 Go To TOC

django-haystack ⭐ 3.3k+ 🍴 1.3k+

GitHub logo django-haystack / django-haystack

Modular search for Django

https://readthedocs.org/projects/django-haystack/badge/ https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336

Haystack

author: Daniel Lindsley
date: 2013/07/28

Haystack provides modular search for Django. It features a unified, familiar API that allows you to plug in different search backends (such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify your code.

Haystack is BSD licensed, plays nicely with third-party app without needing to modify the source and supports advanced features like faceting, More Like This, highlighting, spatial search and spelling suggestions.

You can find more information at http://haystacksearch.org/.

Getting Help

There is a mailing list (http://groups.google.com/group/django-haystack/) available for general discussion and an IRC channel (#haystack on irc.freenode.net).

Documentation

See the changelog

Requirements

Haystack has a relatively easily-met set of requirements.

  • Python 3.8+
  • Django 3-5

Additionally, each backend has its own requirements. You should refer to https://django-haystack.readthedocs.io/en/latest/installing_search_engines.html for more details.




djangoql ⭐ 700+ 🍴 10+

GitHub logo ivelum / djangoql

Advanced search language for Django

DjangoQL

Advanced search language for Django, with auto-completion. Supports logical operators, parenthesis, table joins, and works with any Django model. Tested on Python 2.7, 3.6–3.13, Django 1.8–5.1. The auto-completion feature has been tested in Chrome, Firefox, Safari, IE9+.

See a video: DjangoQL demo

https://raw.githubusercontent.com/ivelum/djangoql/master/djangoql/static/djangoql/img/completion_example_scaled.png

DjangoQL is used by:

logo1 logo2 logo3 logo4

Is your project using DjangoQL? Please submit a PR and let us know!

Contents

Installation

$ pip install djangoql
Enter fullscreen mode Exit fullscreen mode

Add 'djangoql' to INSTALLED_APPS in your settings.py:

INSTALLED_APPS = [
    ...
    'djangoql',
    ...
]
Enter fullscreen mode Exit fullscreen mode

Add it to your Django admin

Adding DjangoQLSearchMixin to your model admin will replace the standard Django search functionality with DjangoQL search. Example:

from django.contrib import admin
from djangoql
Enter fullscreen mode Exit fullscreen mode

django-watson ⭐ 1k+ 🍴 100+

GitHub logo etianen / django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.

django-watson

Django CI PyPI GitHub license

django-watson is a fast multi-model full-text search plugin for Django.

It is easy to install and use, and provides high quality search results.

Features

  • Search across multiple models.
  • Order results by relevance.
  • No need to install additional third-party modules or services.
  • Fast and scaleable enough for most use cases.
  • Supports Django 2+, Python 3.6+.

Documentation

Please read the Getting Started guide for more information.

Download instructions, bug reporting and links to full documentation can be found at the main project website.

You can keep up to date with the latest announcements by joining the django-watson discussion group.

Contributing

Bug reports, bug fixes, and new features are always welcome. Please raise issues on the django-watson github repository, and submit pull requests for any new code.

You can run the test suite yourself from within a virtual environment with the following commands.

    pip install psycopg2 mysqlclient -e .

django-sphinx ⭐ 300+ 🍴 100+

GitHub logo dcramer / django-sphinx

A transparent layer for full-text search using Sphinx and Django

This project is no longer maintained

This is a layer that functions much like the Django ORM does except it works on top of the Sphinx (http://www.sphinxsearch.com) full-text search engine.

Please Note: You will need to create your own sphinx indexes and install sphinx on your server to use this app.

There will no longer be release packages available. Please use SVN to checkout the latest trunk version, as it should always be stable and current.

Installation

To install the latest stable version:

sudo easy_install django-sphinx

To install the latest development version (updated quite often):

git clone git://github.com/dcramer/django-sphinx.git
cd django-sphinx
sudo python setup.py install

Note: You will need to install the sphinxapi.py package into your Python Path or use one of the included versions. To use the included version, you must specify the following in your settings.py file:

# Sphinx 0.9.9
SPHINX_API_VERSION = 0x116
# Sphinx 0.9.8
SPHINX_API_VERSION

django-sphinx ⭐ 200+ 🍴 100+

GitHub logo willhardy / django-seo

Provides a set of tools for managing Search Engine Optimisation (SEO) for Django sites.

================
Django SEO tools
================

This is a set of SEO tools for Django.
It allows you to associate metadata with:

* absolute paths
* model instances
* model classes
* views

Metadata can be edited in the admin in a centralised place, but also alongside any associated models.

This is however a framework, not an app. You therefore have
complete control over the data you store. 
Here is an example of a definition::

    from rollyourown import seo

    class BasicMetadata(seo.Metadata):
        title          = seo.Tag(max_length=68, head=True)
        keywords       = seo.KeywordTag()
        description    = seo.MetaTag(max_length=155)
        heading        = seo.Tag(name="h1")
        subheading     = seo.Tag(name="h2")
        extra          = seo.Raw(head=True)
    
        # Adding some fields for facebook (opengraph)
        og_title       = seo.MetaTag(name="og:title", populate_from="title", verbose_name="facebook title")
        og_description = seo.MetaTag(name="og:description", populate_from="description", verbose_name='facebook description')

As you can see it is very flexible, but there is much more than this simple example.

The full documentation can be read online at http://django-seo.readthedocs.org/.



django-elasticsearch ⭐ 200+ 🍴 10+

GitHub logo liberation / django-elasticsearch

Simple wrapper around elasticsearch-py to index/search a django Model.

django_elasticsearch is a wrapper around py-elasticsearch that automates the indexation and search of django models.
Note: if your elasticsearch documents/mappings are not close to django models, this package is probably not for you.

INSTALL

  • Install and launch elasticsearch if it's not done already.

  • Install py-elasticsearch

    pip install elasticsearch
    Enter fullscreen mode Exit fullscreen mode
  • Install django_elasticsearch

    pip install git+https://github.com/liberation/django_elasticsearch.git
    Enter fullscreen mode Exit fullscreen mode

    Note: no pypy package yet

ELASTICSEARCH VERSION COMPATIBILITY

As stated in the python elasticsearch module documentation:

There are two branches for development - master and 0.4. Master branch is used to track all the changes for Elasticsearch 1.0 and beyond whereas 0.4 tracks Elasticsearch 0.90.

Releases with major version 1 (1.X.Y) are to be used with Elasticsearch 1.* and later, 0.4 releases are meant to work with Elasticsearch 0.90.*.

django_elasticsearch has only been tested with Elasticsearch 1.3.9 and it's corresponding python interface version 1.2.0, but since the API hasn't change i'm quite positive that newer…

django-cms-search ⭐ 10+ 🍴 10+

GitHub logo beniwohli / django-cms-search

This package provides multilingual search indexes for easy Haystack integration with django CMS

django-cms-search

Warning

This package is deprecated. Please use its successor, aldryn-search

This package provides multilingual search indexes for easy Haystack integration with django CMS.

Usage

After installing django-cms-search through your package manager of choice, add cms_search to your INSTALLED_APPS. That's it.

For setting up Haystack, please refer to their documentation.

For more docs, see the docs folder or the online documentation.

Warning

Since version 0.5, the HaystackSearchApphook is not registered automatically anymore. If you want do use the default app hook provided by django-cms-search, add this (e.g. in models.py):

from cms_search.cms_app import HaystackSearchApphook
apphook_pool.register(HaystackSearchApphook)



👉 Testing.

🔝 Go To TOC

django-jenkins ⭐ 900+ 🍴 200+

GitHub logo kmmbvnr / django-jenkins

Plug and play continuous integration with django and jenkins

django-jenkins

Plug and play continuous integration with Django and Jenkins

https://requires.io/github/kmmbvnr/django-jenkins/requirements.png?branch=master

Installation

From PyPI:

$ pip install django-jenkins

Or by downloading the source and running:

$ python setup.py install

Latest git version:

$ pip install -e git+git://github.com/kmmbvnr/django-jenkins.git#egg=django-jenkins
$ pip install coverage

Installation for Python 3:

Works out of the box

Usage

Add 'django_jenkins' to your INSTALLED_APPS list. Configure Jenkins to run the following command:

$ ./manage.py jenkins --enable-coverage

This will create reports/ directory with junit xml, Coverage and Pylint reports.

For more details see the generic tutorial: https://sites.google.com/site/kmmbvnr/home/django-jenkins-tutorial

Settings

  • PROJECT_APPS

    If present, it is supposed to be a list/tuple of django apps for Jenkins to run Tests, reports, and coverage are generated only for the apps from this list.

  • JENKINS_TASKS

    List of Jenkins reporters executed by ./manage.py jenkins command.

    Default value:

    JENKINS_TASKS = ()
    
  • JENKINS_TEST_RUNNER

    The name of the class to use for starting the test suite for jenkins command Class…

django-nose ⭐ 800+ 🍴 200+

GitHub logo jazzband / django-nose

Django test runner using nose

django-nose

The PyPI package GitHub Actions Coverage Jazzband

django-nose provides all the goodness of nose in your Django tests, like:

  • Testing just your apps by default, not all the standard ones that happen to be in INSTALLED_APPS
  • Running the tests in one or more specific modules (or apps, or classes, or folders, or just running a specific test)
  • Obviating the need to import all your tests into tests/__init__.py This not only saves busy-work but also eliminates the possibility of accidentally shadowing test classes.
  • Taking advantage of all the useful nose plugins

It also provides:

  • Fixture bundling, an optional feature which speeds up your fixture-based tests by a factor of 4
  • Reuse of previously created test DBs, cutting 10 seconds off startup time
  • Hygienic TransactionTestCases, which can save you a DB flush per test
  • Support for various databases. Tested with MySQL, PostgreSQL, and SQLite Others should work as well.

django-nose requires nose 1.2.1 or later, and the…

django-test-plus ⭐ 500+ 🍴 10+

GitHub logo revsys / django-test-plus

Useful additions to Django's default TestCase

django-test-plus

Useful additions to Django's default TestCase from REVSYS

pypi build matrix demo

Rationale

Let's face it, writing tests isn't always fun. Part of the reason for that is all of the boilerplate you end up writing. django-test-plus is an attempt to cut down on some of that when writing Django tests. We guarantee it will increase the time before you get carpal tunnel by at least 3 weeks!

If you would like to get started testing your Django apps or improve how your team is testing we offer TestStart to help your team dramatically improve your productivity.

Support

Supports: Python 3.8, 3.9, 3.10, 3.11, and 3.12.

Supports Django Versions: 3.2, 4.2, 5.0, and 5.1.

Documentation

Full documentation is available at http://django-test-plus.readthedocs.org

Installation

$ pip install django-test-plus
Enter fullscreen mode Exit fullscreen mode

Usage

To use django-test-plus, have your tests inherit from test_plus.test.TestCase rather than the normal django.test.TestCase::

from test_plus.test import TestCase

class MyViewTests(TestCase):
    ...
Enter fullscreen mode Exit fullscreen mode

django-autofixture ⭐ 400+ 🍴 100+

GitHub logo gregmuellegger / django-autofixture

Can create auto-generated test data.

django-autofixture

Build Status Package Version

This app aims to provide a simple way of loading masses of randomly generated test data into your development database. You can use a management command to load test data through command line.

It is named autofixture because it is based on django's fixtures. Without autofixture you add test data through the admin to see how the non-static pages on your site look. You export data by using dumpdata to send it to your colleagues or to preserve it before you make a manage.py reset app and so on. As your site grows in complexity the process of adding and re-adding data becomes more and more annoying.

This is where autofixtures will help!

Requirements

  • We require and support Django 1.4 to 1.9

Installation

您必须将该autofixture软件包添加到 Python 路径中。您可以将其放入项目目录,或者从 Python 包索引安装……

django-experiments ⭐ 300+ 🍴 10+

GitHub logo mixcloud / django-experiments

Django AB 测试模块

Django-Experiments

Django-Experiments 是一个用于 Django 的 AB 测试框架。

仅通过模板标签即可设置实验。通过 Django 管理后台,您可以监控和控制实验进度。

如果你不知道什么是A/B测试,请查阅维基百科

安装

Django-Experiments 最好通过 pip 安装:

pip install django-experiments
Enter fullscreen mode Exit fullscreen mode

这将下载 django-experiments 及其所有依赖项。如果从仓库下载,仍然推荐使用 pip 安装依赖项:

pip install -e .
Enter fullscreen mode Exit fullscreen mode

依赖关系

(详细列表请参见 setup.py)

它还要求 'django.contrib.humanize' 位于 INSTALLED_APPS 中。

用法

示例项目是入门和实践的好地方。结果存储在 Redis 中,并在 Django 管理后台显示。该框架的关键组件包括:实验、替代方案和目标。

配置

在开始配置 django-experiments 之前,您必须确保 Redis 服务器已启动……

django-test-utils ⭐ 300+ 🍴 10+

GitHub logo ericholscher / django-test-utils

用于测试 Django 应用程序的实用程序

欢迎使用 django-test-utils。该项目的文档位于https://django-test-utils.readthedocs.org/en/latest/

在 Devmason 上,每次提交都会运行测试:http://devmason.com/pony_server/django-test-utils

邮件列表位于 Google 群组:http://groups.google.com/group/django-testing

感谢您使用测试工具!



结论

🔝返回目录

我希望这份列表能够帮助所有对了解 Django 及其最佳库和工具感兴趣的人。

文章来源:https://dev.to/wiseai/the-best-github-repositories-for-django-developers-451l