You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+62-20Lines changed: 62 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,7 @@ explore and build. The best way to share this is via our [MongoDB Community Foru
8
8
9
9
The development version of this package supports Django 5.0.x. To install it:
10
10
11
-
`pip install django-mongodb-backend`
12
-
13
-
### Resources
14
-
15
-
Check back soon as we aim to provide more links that will dive deeper into our library!
16
-
17
-
*[Developer Notes](DEV_NOTES.md)
11
+
`pip install django-mongodb-backend~=5.0.0`
18
12
19
13
20
14
## Quickstart
@@ -52,12 +46,6 @@ Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" mess
52
46
53
47
## Capabilities of Django Backend for MongoDB
54
48
55
-
-**Database Connectivity**
56
-
57
-
- Directly tune MongoDB connection settings within your Django configuration\!
58
-
- Work against a persisted cloud instance of MongoDB for free\!
59
-
60
-
61
49
-**Model MongoDB Documents Through Django’s ORM**
62
50
63
51
- Translate Django model instances to MongoDB documents.
@@ -75,12 +63,11 @@ Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" mess
75
63
76
64
77
65
-**Querying Data**
78
-
79
-
- Querying API powered through the amazing MongoDB Aggregation Pipeline
66
+
80
67
- Supports most functions of the Django QuerySet API
81
68
- Support Query Annotations and common SQL AGGREGATE operators
82
-
- We support foreign keys and execute JOIN operations all in 1 database call
83
-
- Through our custom raw\_aggregate call, MQL operations like Vector Search, Atlas Search, and GeoSpatial querying still yield Django QuerySet results\!
69
+
Support foreign key usage and execute JOIN operations
70
+
- Through our custom raw\_aggregate call, MQL operations like Vector Search, Atlas Search, and GeoSpatial querying still yield Django QuerySet resutts,
84
71
85
72
86
73
-**Administrator Dashboard & Authentication**
@@ -89,10 +76,64 @@ Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" mess
89
76
- Fully integrated with Django's authentication framework.
90
77
- Supports native user management features like creating users and sessions.
91
78
79
+
## Limitations of django-mongodb-backend
92
80
93
-
-**Management Commands**
94
-
95
-
- Use commands like `migrate`, `makemigrations`, `flush`, `sqlmigrate`, many more.
81
+
- Database Variables `ATOMIC_REQUESTS`, `AUTOCOMMIT`, `CONN_HEALTH_CHECKS`, `TIME_ZONE` not supported
82
+
- No support for GeoDjango
83
+
- Functions such as `Chr`, `ExtractQuarter`, `MD5`, `Now`, `Ord`, `Pad`, `Repeat`, `Reverse`, `Right`, `SHA1`, `SHA224`, `SHA256`, `SHA384`, `SHA512`, and `Sign`.
84
+
- The `tzinfo` parameter of the `Trunc` database functions does not work properly because MongoDB converts the result back to UTC.
85
+
- Schema Validation is not enforced. Refer to MongoDB documentation for how to enforce schema validation.
86
+
- Django DDL Transactions are not supported.
87
+
- The `migrate --fake-initial` command is not supported due to the inability to introspect MongoDB collection schema.
88
+
- The asynchronous functionality of the Django API has not yet been tested.
89
+
-`BSONRegExp` has no custom field class. It is best represented as a `CharField`.
90
+
91
+
92
+
#### **Model Limitations**
93
+
94
+
-`$vectorSearch` and `$search` and Geospatial index creation through the Django Indexes API is not yet available.
95
+
- Updating indexes in `EmbeddedModels` do not work after the first table creation.
96
+
97
+
-**ArrayField**
98
+
- Does not support `EmbeddedModel` within `ArrayField`.
99
+
100
+
-**EmbeddedModel**
101
+
- Limited schema change support (no changing of embedded models).
102
+
- Embedded documents cannot take Django ForeignKeys.
103
+
- Arbitrary or untyped `EmbeddedModelField` is not supported. All fields must derive from an `EmbeddedModel` class.
104
+
105
+
-**JSONField**
106
+
- There is no way to distinguish between a JSON "null" and a SQL null in specific queries.
107
+
- Some queries with Q objects, e.g., `Q(value__foo="bar")`, don't work properly, particularly with `QuerySet.exclude()`.
108
+
- Filtering for a `None` key, e.g., `QuerySet.filter(value__j=None)`, incorrectly returns objects where the key doesn't exist.
109
+
110
+
-**DateTimeField**
111
+
- No support for microsecond granularity.
112
+
113
+
-**DurationField**:
114
+
- Stores milliseconds rather than microseconds.
115
+
116
+
-**Unavailable Fields**:
117
+
-`GeneratedField`
118
+
-`ImageField`
119
+
120
+
121
+
-**These QuerySet API methods do not work**
122
+
123
+
-`distinct()`
124
+
-`dates()`
125
+
-`datetimes()`
126
+
-`prefetch_related()`
127
+
-`extra()`
128
+
-`QuerySet.delete()` and `update()` do not support queries that span multiple collections.
129
+
130
+
131
+
-**Django Management Commands that do not work**
132
+
-`createcachetable`
133
+
-`inspectdb`
134
+
-`optimizemigration`
135
+
-`sqlflush`
136
+
-`sqlsequencereset`
96
137
97
138
98
139
## Future Commitments of Django Backend for MongoDB
@@ -133,6 +174,7 @@ Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" mess
133
174
134
175
These future capabilities are intended to enhance the functionality of the Django Backend for MongoDB as it progresses towards a General Availability (GA) release. If you have any more specific questions or need further details, feel free to ask\!
135
176
177
+
136
178
### Issues & Help
137
179
138
180
We're glad to have such a vibrant community of users of Django MongoDB Backend. We recommend seeking support for general questions through the MongoDB Community Forums.
0 commit comments