Skip to content

Commit 6efce63

Browse files
committed
linter fixes
1 parent 846c98f commit 6efce63

File tree

1 file changed

+34
-42
lines changed

1 file changed

+34
-42
lines changed

README.md

Lines changed: 34 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
# Django MongoDB Backend
22

3-
4-
5-
This backend is currently in development and is not advised for Production workflows. Backwards incompatible
3+
This backend is currently in development and is not advised for production workflows. Backwards incompatible
64
changes may be made without notice. We welcome your feedback as we continue to
75
explore and build. The best way to share this is via our [MongoDB Community Forum](https://www.mongodb.com/community/forums/tag/python).
86

97
## Install
108

11-
Use the version of django-mongodb-backend that corresponds to your version of
9+
Use the version of `django-mongodb-backend` that corresponds to your version of
1210
Django. For example, to get the latest compatible release for Django 5.0.x:
13-
14-
`pip install --pre django-mongodb-backend==5.0.*`
15-
11+
```bash
12+
$ pip install --pre django-mongodb-backend==5.0.*
13+
```
1614
(Until the package is out of beta, you must use pip's `--pre` option.)
1715

1816

1917
## Quickstart
2018

21-
### Start Project
19+
### Start project
2220

2321
From your shell, run the following command to create a new Django project
24-
called example based on a custom template. Make sure the version referenced
25-
from `django-mongodb-labs` corresponds to your version of Django similar
26-
to the install stage. For example, this command works for Django 5.0.x:
22+
called `example` based on a custom template. Make sure the zipfile referenced
23+
at the end of the template link corresponds to your
24+
version of Django. This snippet useso get the latest compatible release for Django 5.0.x:
2725

2826
```bash
2927
$ django-admin startproject example --template https://github.com/mongodb-labs/django-mongodb-project/archive/refs/heads/5.0.x.zip
@@ -32,63 +30,57 @@ $ django-admin startproject example --template https://github.com/mongodb-labs/d
3230

3331
### Connect to the database
3432

35-
Navigate to your `example/settings.py` file and find the variable named `DATABASES` Replace the `DATABASES` setting with this:
33+
Navigate to your `example/settings.py` file and find the variable named
34+
`DATABASES` Replace the `DATABASES` variable with this:
3635

3736
```python
3837
DATABASES = {
39-
"default": django_mongodb_backend.parse_uri("<CONNECTION_STRING_URI>"),
38+
"default": django_mongodb_backend.parse_uri("<CONNECTION_STRING_URI>"),
4039
}
4140
```
4241

43-
> The MongoDB connection string must also specify a database for the parse_uri function.
44-
> If not already included, make sure you provide a value for `<DATABASE_NAME>`
45-
> in your URI as shown in the example below:
46-
> `mongodb+srv://myDatabaseUser:D1fficultP%[email protected]/<DATABASE_NAME>?retryWrites=true&w=majority`
42+
The MongoDB `<CONNECTION_STRING_URI>` must also specify a database for the
43+
`parse_uri` function to work.
44+
If not already included, make sure you provide a value for `<DATABASE_NAME>`
45+
in your URI as shown in the example below:
46+
```bash
47+
mongodb+srv://myDatabaseUser:D1fficultP%[email protected]/<DATABASE_NAME>?retryWrites=true&w=majority
48+
```
4749

4850

49-
### Run the Server
51+
### Run the server
5052
To verify that you installed Django MongoDB Backend and correctly configured your project, run the following command from your project root:
5153
```bash
52-
python manage.py runserver
54+
$ python manage.py runserver
5355
```
5456
Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" message and an image of a rocket.
5557

5658

57-
## Capabilties for Django MongoDB Backend
59+
## Capabilities of Django MongoDB Backend
60+
61+
- **Model MongoDB Documents Through Django’s ORM**
5862

59-
- **Model MongoDB Documents Through Django’s ORM**
60-
6163
- Store Django model instances as MongoDB documents.
62-
- Supports field validation, data storage, updating, and deletion.
63-
- Maps Django's built-in fields to MongoDB data types.
64-
- Provides custom fields for arrays (`ArrayField`) and embedded documents (`EmbeddedModelField`).
64+
- Maps Django's built-in fields to MongoDB data types.
65+
- Provides custom fields for arrays (`ArrayField`) and embedded documents (`EmbeddedModelField`).
6566
- Supports core migration functionalities.
66-
67-
68-
- **Index Management**
67+
- **Index Management**
6968
- Create single, compound, partial, and unique indexes using Django Indexes.
70-
71-
- **Querying Data**
72-
69+
- **Querying Data**
7370
- Supports most of the Django QuerySet API.
74-
- Supports foreign key usage and executes JOIN operations.
75-
- A custom `QuerySet.raw_aggregate` method allows MQL operations like Vector Search, Atlas Search, and GeoSpatial querying to yield Django QuerySet results.
76-
77-
78-
- **Administrator Dashboard & Authentication**
79-
71+
- Supports relational field usage and executes `JOIN` operations with MQL.
72+
- A custom `QuerySet.raw_aggregate` method exposes MongoDB-specific operations like Vector Search, Atlas Search, and GeoSpatial querying to yield Django QuerySet results.
73+
- **Administrator Dashboard & Authentication**
8074
- Manage your data in Django’s admin site.
8175
- Fully integrated with Django's authentication framework.
82-
- Supports native user management features like creating users and sessions.
76+
- Supports native user management features like creating users and session management.
8377

84-
<!-- ## Known issues and limitations
85-
Check out our MongoDB Docs on library limitations here!
86-
-->
8778

8879
### Issues & Help
8980

9081
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](https://www.mongodb.com/community/forums/tag/python).
9182

83+
9284
#### Bugs / Feature Requests
9385
To report a bug or to request a new feature in Django MongoDB Backend, please open an issue in JIRA, our issue-management tool, using the following steps:
9486

@@ -100,4 +92,4 @@ To report a bug or to request a new feature in Django MongoDB Backend, please op
10092

10193
Bug reports in JIRA for the Django MongoDB Backend project can be viewed by everyone.
10294

103-
If you identify a security vulnerability in the driver or in any other MongoDB project, please report it according to the instructions found in [Create a Vulnerability Report](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report/).
95+
If you identify a security vulnerability in the driver or in any other MongoDB project, please report it according to the instructions found in [Create a Vulnerability Report](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report/).

0 commit comments

Comments
 (0)