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: docs/developer-tools/flask-dynamic-api.mdx
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,7 @@ For newcomers, **Flask** is a leading backend framework used to code from simple
15
15
16
16
## ✅ Video Presentation
17
17
18
-
<YoutubeEmbedurl="https://user-images.githubusercontent.com/51070104/194328733-3bdf8c70-f765-4168-983d-2a51e276239b.mp4"title="Flask Dynamic API - Open-Source tool provided by AppSeed" />
19
-
18
+
<YoutubeEmbedurl="https://www.youtube.com/embed/jrdwFsNLZfw"title="Flask Dynamic API - Open-Source tool provided by AppSeed" />
Copy file name to clipboardExpand all lines: docs/technologies/django/01-getting-started.mdx
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,14 +13,14 @@ Django can help us to code from simple, one-page websites, APIs, micro-services,
13
13
It enables developers to build robust applications rapidly while helping developers to avoid security mistakes since Django takes security seriously.
14
14
Django is flexible and scalable and comes with a lot of tools prebuilt into it for example, its Object relation mapper (ORM), admin dashboard, user authentication and lots more.
15
15
16
+

17
+
16
18
Django adopts the MTV (Model Template View) architectural pattern. **Model** determines the data structure and is a handler between the database and the view.
17
19
**Template** keeps everything the browser renders, django uses a plain text template system. **View** communicates with the database using the model and sends the data to the template to be displayed.
18
20
19
21
The framework acts as a controller sending requests to the right view based on the URL configuration.
20
22
Django's MVT pattern emphasizes the separation of concerns and modularity, making it easier to develop and maintain web applications with a clear separation between business logic, data access, and presentation.
21
23
22
-

23
-
24
24
## ✅ Why Using Django
25
25
26
26
* Django enables rapid development by eliminating a lot of the hassle of web development
@@ -40,7 +40,7 @@ This can help prevent dependency issues and also help in reproducibility.
40
40
41
41
<br />
42
42
43
-
### Creating a Virtual environment
43
+
### 👉 Creating a Virtual environment
44
44
45
45
* From the terminal, type the following commands
46
46
@@ -69,7 +69,7 @@ $ venv\Scripts\activate
69
69
70
70
<br />
71
71
72
-
### Installing Django
72
+
### 👉 Installing Django
73
73
74
74
Since our virtual environment is active we can install Django and start development. In your terminal run the following commands
75
75
```bash
@@ -84,7 +84,7 @@ A Django project is a collection of settings and configurations that define the
84
84
85
85
<br />
86
86
87
-
### Creating the Project
87
+
### 👉 Creating the Project
88
88
89
89
A Django project is created using the `django-admin` command-line tool. `django-admin startproject <project-name>` is the command used to create a new Django project.
90
90
@@ -107,7 +107,7 @@ After running the command above, your directory structure will look like this. T
107
107
108
108
<br />
109
109
110
-
### Applying initial Database configuration
110
+
### 👉 Applying initial Database configuration
111
111
112
112
Django comes with some database configurations which can be found in `core/settings.py`, the default database configuration for Django is SQLite3.
113
113
Django is built to integrate with a lot of popular databases like MySQL, Postgresql, Oracle and so on.
@@ -132,26 +132,26 @@ This starts up a Django server, open `http://127.0.0.1:8000/` in your browser, y
132
132
133
133
In Django, an application is a self-contained module of code that provides specific functionality to a project. It is a collection of models, views, templates, and other related files that work together to implement a particular feature or set of features. An application is typically stored in its directory within the project's directory structure. Each application contains a set of files that define its functionality, including:
134
134
135
-
*Models: A model is a Python class that defines the structure of a database table and the relationships between tables. Models are used to define the data structure of the application.
135
+
-**Models**: A model is a Python class that defines the structure of a database table and the relationships between tables. Models are used to define the data structure of the application.
136
136
137
-
*Views: A view is a Python function that processes HTTP requests and returns HTTP responses. Views are used to define the logic for handling user requests and rendering the appropriate response.
137
+
-**Views**: A view is a Python function that processes HTTP requests and returns HTTP responses. Views are used to define the logic for handling user requests and rendering the appropriate response.
138
138
139
-
*Templates: A template is an HTML file that defines the layout and structure of the application's web pages. Templates are used to define the presentation layer of the application.
139
+
-**Templates**: A template is an HTML file that defines the layout and structure of the application's web pages. Templates are used to define the presentation layer of the application.
140
140
141
-
*URLs: A URL is a string that maps to a view function. URLs are used to define the routing for the application.
141
+
-**URLs**: A URL is a string that maps to a view function. URLs are used to define the routing for the application.
142
142
143
-
*Static files: Static files are files such as CSS, JavaScript, and images that are used to define the presentation layer of the application.
143
+
-**Static files**: Static files are files such as CSS, JavaScript, and images that are used to define the presentation layer of the application.
144
144
145
145
<br />
146
146
147
-
### Creating a Django APP
147
+
### 👉 Creating a Django APP
148
148
149
149
Using the `django-admin` command from the terminal, we will be creating a Django application inside the project directory. `django-admin startapp <app-name>` is the command used for creating new applications.
150
150
151
-
*Run the command below on your terminal to create a Django application name example
151
+
Run the command below on your terminal to create a Django application name example
152
152
153
153
```bash
154
-
(venv) $ django-admin startapp example
154
+
(venv) $ django-admin startapp example
155
155
```
156
156
157
157
With this, a new application called `example` has been created. The new folder structure for the project will become
@@ -180,7 +180,7 @@ Although we have created an application, the Django project does not recognize o
180
180
181
181
<br />
182
182
183
-
### Update Settings
183
+
### 👉 Update Settings
184
184
185
185
To connect `example` to the Django project `core`, open the file `core/settings.py` and add `example` to the `INSTALLED_APPS` list.
186
186
@@ -202,7 +202,7 @@ Now our Django project recognizes the `example` application.
202
202
203
203
<br />
204
204
205
-
### Updating Project Routes
205
+
### 👉 Updating Project Routes
206
206
207
207
Now that the Django project can recognize the `example` application, the next step is to give the application a route. By doing this we create a generic route that when visited, Django checks this application for resources to send back to the client.
208
208
@@ -223,7 +223,7 @@ If your Django server was running when this change was made, you would be having
223
223
224
224
<br />
225
225
226
-
### Serving an HTML Page
226
+
### 👉 Serving an HTML Page
227
227
228
228
* Edit the `core/settings file by adding a route to template files for Django to use in identifying resources to be sent as the response
229
229
@@ -394,7 +394,7 @@ The application just built will be deployed on [Render](https://render.com) and
394
394
395
395
<br />
396
396
397
-
### Initial setup
397
+
### 👉 Initial setup
398
398
399
399
Before we can start deploying our project, we need to make some changes to our codebase.
400
400
@@ -479,7 +479,7 @@ The changes made above combine the configuration for Docker and deploying on ren
479
479
480
480
<br />
481
481
482
-
### Deploying Django on Render
482
+
### 👉 Deploying Django on Render
483
483
484
484
* In the root directory of your application, create a file name `build.sh` and add the following line
485
485
```bash
@@ -532,7 +532,7 @@ fi
532
532
533
533
<br />
534
534
535
-
### Running Django project on Docker
535
+
### 👉 Running Django project on Docker
536
536
537
537
The following steps will help you create a docker image and start up a docker container for your Django project
- Potential denial of service vulnerability in django.utils.encoding.uri_to_iri()
19
27
20
-
## **Django 4.2.4** (August, 2023):
28
+
## ✅ **Django 4.2.4** (August, 2023):
21
29
22
30
- Fixed a regression in Django 4.2 that caused a crash of QuerySet.aggregate() with aggregates referencing window functions (#34717).
23
31
- Fixed a regression in Django 4.2 that caused a crash when grouping by a reference in a subquery (#34748).
24
32
- Fixed a regression in Django 4.2 that caused aggregation over query that uses explicit grouping by multi-valued annotations to group against the wrong columns (#34750).
25
33
26
-
## **Django 4.2.2** (June, 2023):
34
+
## ✅ **Django 4.2.2** (June, 2023):
27
35
28
36
BugFixes:
29
37
@@ -34,134 +42,134 @@ BugFixes:
34
42
- Fixed a bug in Django 4.2 where makemigrations --update didn’t respect the --name option (#34568).
35
43
- Fixed a performance regression in Django 4.2 when compiling queries without ordering (#34580).
36
44
37
-
## **Django 4.2** (April, 2023):
45
+
## ✅ **Django 4.2** (April, 2023):
38
46
39
47
- Psycopg 3 support
40
48
- Django now supports psycopg version 3.1.8 or higher. To update your code, install the psycopg library, you don`t need to change the ENGINE as django.db.backends.postgresql supports both libraries.
41
49
- Comments on columns and tables
42
50
- The new `Field.db_comment` and `Meta.db_table_comment` options allow creating comments on columns and tables, respectively.
43
51
44
-
## **Django 4.0** (December, 2021):
52
+
## ✅ **Django 4.0** (December, 2021):
45
53
46
54
- zoneinfo default timezone implementation
47
55
- scrypt password hasher
48
56
- Redis cache backend
49
57
- Template based form rendering
50
58
51
-
## **Django 3.2** (April 2021):
59
+
## ✅ **Django 3.2** (April 2021):
52
60
53
61
- Extended support for Python 3.9.
54
62
- Introduced improved speed and performance enhancements.
55
63
56
-
## **Django 3.1** (August 2020):
64
+
## ✅ **Django 3.1** (August 2020):
57
65
58
66
- Extended support for Python 3.8 and 3.9.
59
67
- Introduced stricter database constraints.
60
68
- Enhanced security features.
61
69
62
-
## **Django 3.0** (December 2019):
70
+
## ✅ **Django 3.0** (December 2019):
63
71
64
72
- Dropped support for Python 3.5.
65
73
- Added support for Python 3.8.
66
74
- Introduced path converters in URL routing.
67
75
68
-
## **Django 2.2** (April 2019):
76
+
## ✅ **Django 2.2** (April 2019):
69
77
70
78
- Extended support for Python 3.7 and 3.8.
71
79
- Included database and performance improvements.
72
80
73
-
## **Django 2.1** (August 2018):
81
+
## ✅ **Django 2.1** (August 2018):
74
82
75
83
- Added support for Python 3.7.
76
84
- Included features like multi-database support and easier handling of static files.
77
85
78
-
## **Django 2.0** (December 2017):
86
+
## ✅ **Django 2.0** (December 2017):
79
87
80
88
- Dropped support for Python 2.x.
81
89
- Required Python 3.4 or later.
82
90
- Included various improvements and updates.
83
91
84
-
## **Django 1.11** (April 2017):
92
+
## ✅ **Django 1.11** (April 2017):
85
93
86
94
- Extended support for Python 3.6.
87
95
- Introduced "subquery" expressions.
88
96
- Included an easier way to format template text.
89
97
90
-
## **Django 1.10** (August 2016):
98
+
## ✅ **Django 1.10** (August 2016):
91
99
92
100
- Introduced full support for Python 3.5.
93
101
- Added features like template-based widget rendering.
94
102
95
-
## **Django 1.9** (December 2015):
103
+
## ✅ **Django 1.9** (December 2015):
96
104
97
105
- Included support for PostgreSQL's "upsert" feature.
98
106
- Improved password hashing.
99
107
- Enhanced customizability of the admin interface.
100
108
101
-
## **Django 1.8** (April 2015):
109
+
## ✅ **Django 1.8** (April 2015):
102
110
103
111
- Added support for the "Django Rest Framework."
104
112
- Included native support for complex database types like JSON.
105
113
- Other improvements.
106
114
107
-
## **Django 1.7** (September 2014):
115
+
## ✅ **Django 1.7** (September 2014):
108
116
109
117
- Introduced the "migrations" framework as a core feature.
110
118
- Allowed database schema changes to be version-controlled.
111
119
112
-
## **Django 1.6** (November 2013):
120
+
## ✅ **Django 1.6** (November 2013):
113
121
114
122
- Brought significant improvements in testing and authentication.
115
123
- Added support for database schema migrations.
116
124
117
-
## **Django 1.5** (February 2013):
125
+
## ✅ **Django 1.5** (February 2013):
118
126
119
127
- Introduced custom user models.
120
128
- Added a new timezone support model.
121
129
- Configurable user authentication system.
122
130
123
-
## **Django 1.4** (March 2012):
131
+
## ✅ **Django 1.4** (March 2012):
124
132
125
133
- Added timezone support.
126
134
- Supported user-uploaded static files.
127
135
- Improved scalability.
128
136
129
-
## **Django 1.3** (March 2011):
137
+
## ✅ **Django 1.3** (March 2011):
130
138
131
139
- Added class-based views.
132
140
- Improved file handling.
133
141
- Better support for NoSQL databases.
134
142
135
-
## **Django 1.2** (May 2010):
143
+
## ✅ **Django 1.2** (May 2010):
136
144
137
145
- Added support for multiple database connections.
138
146
- Improved form handling.
139
147
- Enhanced internationalization features.
140
148
141
-
## **Django 1.1** (July 2009):
149
+
## ✅ **Django 1.1** (July 2009):
142
150
143
151
- Introduced features like aggregation and transaction-based testing.
144
152
- Improved support for PostgreSQL.
145
153
146
-
## **Django 1.0** (September 2008):
154
+
## ✅ **Django 1.0** (September 2008):
147
155
148
156
- First official stable release.
149
157
- Included the admin interface, authentication, and many core features.
150
158
151
-
## **Django 0.96** (March 2006):
159
+
## ✅ **Django 0.96** (March 2006):
152
160
153
161
- Focused on code quality and compatibility, laying the groundwork for future versions.
154
162
155
-
## **Django 0.95** (January 2006):
163
+
## ✅ **Django 0.95** (January 2006):
156
164
157
165
- Added support for database migrations.
158
166
- Improved documentation and template support.
159
167
160
-
## **Django 0.91** (October 2005):
168
+
## ✅ **Django 0.91** (October 2005):
161
169
162
170
- Introduced features like the automatic admin interface and template inheritance.
0 commit comments