-
Notifications
You must be signed in to change notification settings - Fork 20
DOCSP-43200: Get started with Django #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
40ffb76
be878e5
704c54e
1caf1a3
4142196
aa27f12
8585730
e520bf4
123a2d5
d439dac
7bb56ea
2d3224f
0fbb2e1
735bccf
4d9999e
a14aae2
b353a24
711af57
f2b7d40
6b599a7
aa3814b
a993adf
c0c53b1
6bd451d
6f46a1c
be3b2ed
595ee65
c863134
ecff738
1c06aec
58b3541
7bf9018
7a54a24
ea02256
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ | |
|
||
DATABASES = { | ||
"default": { | ||
"ENGINE": "django_mongodb", | ||
"ENGINE": "django_mongodb_backend", | ||
"NAME": "sample_mflix", | ||
"USER": "<username>", | ||
"PASSWORD": "<password>", | ||
|
@@ -89,7 +89,7 @@ | |
|
||
python3 manage.py runserver | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this is consistent with the rest of your documentation and you want to leave it alone, but if you are working in a Python 3 virtual environment, you can write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to raise this too, but would defer to MongoDB-wide conventions. If there are no such conventions, then I prefer |
||
|
||
Then, visit http://127.0.0.1:8000/. This page displays a "Congratulations!" | ||
Check failure on line 92 in source/django-get-started/django-connect-mongodb.txt
|
||
message and an image of a rocket. | ||
|
||
After completing these steps, you have a Django project configured | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
.. note:: App Template | ||
|
||
The ``django-mongodb-app`` template ensures that your ``app.py`` file | ||
includes the line ``"default_auto_field = 'django_mongodb.fields.ObjectIdAutoField'"``. | ||
includes the line ``"default_auto_field = 'django_mongodb_backend.fields.ObjectIdAutoField'"``. | ||
|
||
.. step:: Create models for movie, awards, and viewer data | ||
|
||
|
@@ -46,7 +46,7 @@ | |
.. code-block:: python | ||
|
||
from django.db import models | ||
from django_mongodb.fields import EmbeddedModelField, ArrayField | ||
from django_mongodb_backend.fields import EmbeddedModelField, ArrayField | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: the EmbeddedModelField import and the |
||
|
||
class Movie(models.Model): | ||
title = models.CharField(max_length=200) | ||
|
@@ -243,7 +243,7 @@ | |
.. step:: Create migrations for your new models | ||
|
||
From your project root, run the following command to create | ||
migrations for the ``Movie``, ``Award``, and ``Viewer`` models and apply | ||
Check failure on line 246 in source/django-get-started/django-create-app.txt
|
||
the changes to the database: | ||
|
||
.. code-block:: bash | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ | |
|
||
.. tip:: | ||
|
||
In the preceding commands, you might need to replace | ||
Check failure on line 53 in source/django-get-started/django-install.txt
|
||
``python3`` with the command that points to your Python | ||
3.10+ interpreter. | ||
|
||
|
@@ -61,7 +61,7 @@ | |
|
||
.. code-block:: bash | ||
|
||
pip install git+https://github.com/mongodb-labs/django-mongodb | ||
pip install git+https://github.com/mongodb-labs/django-mongodb-backend | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The alpha release is now on PyPI, so maybe this should be |
||
|
||
This command also installs the following dependencies: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also those dependencies' dependencies but quite possibly not worth mentioning.
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation is incorrect throughout these documents (only 3 spaces).