djongo
Djongo is a Python library that allows Django developers to use MongoDB as a backend database without rewriting their ORM code. It translates Django's SQL queries into MongoDB operations, preserving the familiar Django Admin interface and model system.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | doableware/djongo |
| Owner | doableware |
| Primary language | Python |
| License | AGPL-3.0 — OSI-approved |
| Stars | 1.9k |
| Forks | 355 |
| Open issues | 357 |
| Latest release | 1.2.23 (2018-03-19) |
| Last updated | 2026-05-28 |
| Source | https://github.com/doableware/djongo |
What djongo is
Djongo implements a SQL-to-MongoDB query compiler that intercepts Django ORM calls and translates them to MongoDB query documents. It supports Django contrib modules (admin, auth, sessions) and embedded models/arrays, though performance and feature parity with relational backends depend on query complexity.
Get the djongo source
Clone the repository and explore it locally.
git clone https://github.com/doableware/djongo.gitcd djongo# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Latest stable release (1.2.23) is from March 2018; verify compatibility with current Django and MongoDB versions, and assess test coverage for your specific query patterns.
- Requires Python 3.6+ and MongoDB 3.4+ (3.6+ for nested/subqueries); confirm your infrastructure meets these minimum versions before adoption.
- Initial schema setup uses Django's makemigrations/migrate to create MongoDB collections; understand how djongo maps relational migrations to document collections.
- Embedded models and arrays are supported but may require different indexing and query optimization strategies compared to traditional relational or native MongoDB approaches.
- Test complex queries, aggregations, and edge cases thoroughly; djongo's SQL-to-document translation may have limitations not evident in basic CRUD operations.
When to avoid it — and what to weigh
- Heavy relational query requirements — Applications dependent on complex joins, transactions across collections, or relational integrity constraints should use traditional SQL databases, as MongoDB and djongo's translation layer may not provide equivalent semantics.
- Performance-critical, at-scale systems — High-throughput systems requiring optimized query plans and fine-grained database tuning; djongo's abstraction may introduce performance overhead compared to native MongoDB or optimized SQL drivers.
- Strict commercial licensing requirement — Projects that cannot comply with AGPL-3.0's copyleft obligations (source code disclosure for distributed software) should avoid djongo; commercial licensing is not documented as available.
- Long-term maintenance and security guarantees — Latest stable release is from March 2018 (5+ years old); active maintenance status is unclear despite recent pushes. Production deployments require independent security and stability assessment.
License & commercial use
Licensed under AGPL-3.0 (GNU Affero General Public License v3.0), a copyleft license. Source code modifications and any software offering djongo as a network service must make source code available to all users under the same license. Internal use without distribution is permitted.
AGPL-3.0 permits commercial use, but imposes copyleft obligations: if djongo is used in a distributed or network-facing product, source code must be disclosed under AGPL-3.0. Commercial licensing alternatives are not documented. Legal review is required before production deployment in proprietary software.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Moderate |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Possible |
| Assessment confidence | Medium |
AGPL-3.0 compliance is the primary legal concern. No security audit, vulnerability disclosure policy, or authentication/encryption details are provided in the data. MongoDB connection security (TLS, auth) relies on underlying PyMongo configuration. SQL injection risk is conceptually lower due to ORM abstraction, but MongoDB injection vectors depend on djongo's query translation robustness. Conduct security testing specific to your query patterns and MongoDB deployment before production use.
Alternatives to consider
MongoEngine
Pure Python ODM for MongoDB with native document-oriented design; avoids SQL translation layer but requires learning a separate ORM abstraction and Django integration is less seamless.
Traditional Django + PostgreSQL/MySQL
Mature, production-hardened, extensive ecosystem support; trades MongoDB flexibility for ACID guarantees, proven scaling, and zero translation overhead.
Native MongoDB driver (PyMongo) + custom layer
Full control over query optimization and schema design; requires more upfront development effort but provides maximum performance and flexibility for document-oriented logic.
Build on djongo with DEV.co software developers
Before adopting djongo, verify AGPL-3.0 license compatibility, test query translation with your schema, and confirm MongoDB/Django version support. Contact our team for architecture review.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
djongo FAQ
Can I use djongo in a commercial SaaS product?
Is djongo a drop-in replacement for a SQL database in Django?
What MongoDB versions does djongo support?
How actively is djongo maintained?
Software developers & web developers for hire
Adopting djongo is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source databases software in production.
Assess Djongo for Your Stack
Before adopting djongo, verify AGPL-3.0 license compatibility, test query translation with your schema, and confirm MongoDB/Django version support. Contact our team for architecture review.