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
@@ -17,11 +18,11 @@ The `source code` is saved on GitHub for later reference and support.
17
18
18
19
<br />
19
20
20
-
## Introduction
21
+
## ✅ Introduction
21
22
22
23
This section presents more insights regarding `MongoDB` and the power features compared to a `Relational Database` like MySql or PostgreSQL.
23
24
24
-
### ✅ What is MongoDB
25
+
### What is MongoDB
25
26
26
27
`MongoDB` is an open-source, document-oriented NoSQL database that was designed for scalability and high availability.
27
28
MongoDB stores data in JSON-like documents, which makes it easy for developers to work with data because it does not require a fixed schema.
@@ -30,7 +31,7 @@ This means you can store data without having to define a strict structure, which
30
31
MongoDB supports CRUD (Create, Read, Update, Delete) operations, ad-hoc queries, and indexing, making it an excellent choice for modern web and mobile applications.
31
32
It is widely used across various industries because of its flexibility, scalability, and fast performance.
32
33
33
-
### ✅ MongoDB vs Relational DBMS
34
+
### MongoDB vs Relational DBMS
34
35
35
36
> **Data Model**
36
37
@@ -54,7 +55,7 @@ Relational databases are well-suited for transactional systems, such as online b
54
55
55
56
<br />
56
57
57
-
## Install MongoDB
58
+
## ✅ Install MongoDB
58
59
59
60
For this tutorial, you need MongoDB installed on your device to get started. To install MongoDB follow the links below and follow the steps outlined to get it done.
60
61
@@ -75,7 +76,7 @@ $ sudo systemctl start mongod
75
76
76
77
<br />
77
78
78
-
## MongoDB shell
79
+
## ✅ MongoDB shell
79
80
80
81
`Mongosh`, the MongoDB shell is used to interact with the **MongoDB** server from the terminal. For Linux, it is installed with the MongoDB server.
81
82
For Windows `mongosh` is not installed with the MongoDB server, and needs to be installed from this location:
@@ -99,7 +100,7 @@ This shows that `mongosh` has successfully connected to the MongoDB server. Now
99
100
100
101
<br />
101
102
102
-
## Create a `Django` Project
103
+
## ✅ Create a `Django` Project
103
104
104
105
From the terminal run the following commands to create a new folder, change the directory into the new folder and create a new virtual environment
105
106
@@ -137,7 +138,7 @@ The project is created in the current directory because of `.` added to the comm
137
138
138
139
<br />
139
140
140
-
### ✅ Add dependencies for `MongoDB`
141
+
### Add dependencies for `MongoDB`
141
142
142
143
Django was built to integrate seamlessly with Relational Databases.
143
144
To use MongoDB with Django and still leverage features like the database modeling, admin panel and so on, we will be needing a package called `Djongo`.
@@ -151,7 +152,7 @@ The proceeding steps will help us install and configure our Django project to us
151
152
152
153
<br />
153
154
154
-
### ✅ Update Configuration for `MongoDB`
155
+
### Update Configuration for `MongoDB`
155
156
156
157
Open `core/settings.py` and make the following changes to allow Django uses `djongo` as the database engine.
157
158
@@ -169,7 +170,7 @@ DATABASES = {
169
170
170
171
<br />
171
172
172
-
### ✅ Create a Superuser
173
+
### Create a Superuser
173
174
174
175
Before creating a superuser, we need to apply the default database migration.
175
176
Run the command below to apply database migration and then create a superuser
@@ -185,11 +186,11 @@ Now you can start the application and visit the admin panel using the superuser
185
186
186
187
<br />
187
188
188
-
## Checking the information
189
+
## ✅ Checking the information
189
190
190
191
just to double check the set up, we can access the `admin` section (reserved for superusers) or use the Django CLI to inspect the information.
191
192
192
-
### ✅ Accessing the `ADMIN` Section
193
+
### Accessing the `ADMIN` Section
193
194
194
195
Run the application using the command below
195
196
@@ -212,7 +213,7 @@ This is the route to the admin section. Once you log in you will see the admin p
212
213
213
214
<br />
214
215
215
-
### ✅ Visualizing the data in `MongoDB`
216
+
### Visualizing the data in `MongoDB`
216
217
217
218
To see the data added to your database, open your terminal and run the following command
218
219
@@ -268,21 +269,21 @@ This command will return a list of all the users registered. For now, we have on
268
269
269
270
<br />
270
271
271
-
## Style the Project
272
+
## ✅ Styling the Project
272
273
273
274
This section explains how to style the project with a an open-source theme that covers the admin section but also the rest of the website.
274
275
275
276
The theme to be added is the [Django Soft Dashboard](https://github.com/app-generator/django-admin-soft-dashboard), a modern **Bootstrap 5** Design from Creative-Tim, migrated to Django.
276
277
277
278
The proceeding steps will guide you in integrating this theme with your Django project.
278
279
279
-
> ✅ `Install the theme`
280
+
> `Install the theme`
280
281
281
282
```bash
282
283
(venv) $ pip install django-admin-soft-dashboard
283
284
```
284
285
285
-
> ✅ `Update Settings`
286
+
> `Update Settings`
286
287
287
288
After installation, we need to make changes to our project files to allow the project to recognize and use the theme. Open the file `core/settings.py` and make the following changes.
0 commit comments