Django - switch from sqlite3 to mysql

Assuming that we have created Django project and there is an existing sqlite3 db, if not create a sqlite3 db and do the necessary migrations

Django - Connect to MySQL Database

Django supports MySQL 8.0.11 and higher.

MySQL is implemented through mysqlclient. mysqlclient is a native driver. It’s the recommended ch…

Django - Collect Static Files

Static files in your project, like stylesheets, JavaScripts, and images, are not handled automatically by Django when DEBUG = False.

Whe…

Django - Installing WhiteNoise

Django does not have a built-in solution for serving static files, at least not in production when DEBUG has to be False.

We have to use…

Django - Add Static File

When building web applications, you probably want to add some static files like images or css files.

Start by creating a folder named st…

Deploy Django - Create requirements.txt

When you create a Django application, there are some Python packages that your project depends on.

Django itself is a Python package, an…

Django Templates

From Django, we learned that the result should be in HTML, and it should be created in a template, so let's do that.

Create a templates …

Django slug

Have you ever seen url's that look like this: http://127.0.0.1:8000/detail-view-class-based-views-django. The detail-view-class-based-views-django is…

Detail View – Class Based Views Django

Detail View refers to a view (logic) to display one instances of a table in the database.Class based views are simpler and efficient to manage tha…

List View – Class Based Views Django

List View refers to a view (logic) to display multiple instances of a table in the database. Class-based views provide an alternative way to imple…

Template View – Class Based Generic View Django

Django provides several class based generic views to accomplish common tasks. The simplest among them is TemplateView. It Renders a given template…

Creating a Django Project

Django is a Python framework that makes it easier to create web sites using Python.

Django takes care of the difficult stuff so that you…