DEV.co
Open-Source Databases · doableware

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.

Source: GitHub — github.com/doableware/djongo
1.9k
GitHub stars
355
Forks
Python
Primary language
AGPL-3.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorydoableware/djongo
Ownerdoableware
Primary languagePython
LicenseAGPL-3.0 — OSI-approved
Stars1.9k
Forks355
Open issues357
Latest release1.2.23 (2018-03-19)
Last updated2026-05-28
Sourcehttps://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.

Quickstart

Get the djongo source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/doableware/djongo.gitcd djongo# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Rapid MongoDB adoption in existing Django projects

Teams with established Django codebases can integrate MongoDB without major refactoring, reducing migration effort and preserving team familiarity with Django patterns.

Document-oriented applications with Django Admin

Projects requiring flexible schema and MongoDB's native document storage, while still leveraging Django's admin GUI for CRUD operations and user management.

Prototyping and MVPs with MongoDB

Early-stage projects exploring MongoDB benefits without the overhead of building custom ORM layers or learning non-Django MongoDB drivers.

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.

SignalAssessment
MaintenanceModerate
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitPossible
Assessment confidenceMedium
Security considerations

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.

Software development agency

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.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related 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?
Yes, but AGPL-3.0 requires you to publish source code if the software is accessible over a network. If your SaaS is delivered as a service (not downloaded), you must offer source under AGPL-3.0 to users. Consult a lawyer; commercial licensing is not advertised.
Is djongo a drop-in replacement for a SQL database in Django?
Mostly yes for basic CRUD and Django Admin, but complex queries, transactions, and relational constraints may behave differently. Test your specific workload thoroughly before migration.
What MongoDB versions does djongo support?
3.4+ for basic queries, 3.6+ for nested queries and subqueries. Compatibility with newer MongoDB versions (4.4+, 5.0+) is not explicitly documented; verify against your target MongoDB release.
How actively is djongo maintained?
Repository shows recent activity, but latest stable release is from March 2018. Contact the maintainers or review recent commits for production readiness; adoption risk should be assessed.

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.