Django
Part of the Django path, Django Tutorial digs into Django Introduction in detail.
Django is a back-end server side web framework.
Django is a Python framework that makes it easier to create web sites using Python.
To install Django, you must have Python installed, and a package manager like PIP .
It is suggested to have a dedicated virtual environment for each Django project, and one way to manage a virtual environment is venv , which is included in Python.
Now, that we have created a virtual environment, we are ready to install Django.
Once you have come up with a suitable name for your Django project, like mine: my_tennis_club , navigate to where in the file system you want to store the code (in the virtual environment), I will…
An app is a web application that has a specific meaning in your project, like a home page, a contact form, or a members database.
Django views are Python functions that take http requests and return http response, like HTML documents.
Create a file named urls.py in the same folder as the views.py file, and type this code in it:
In the Django Intro page, we learned that the result should be in HTML, and it should be created in a template, so let's do that.
A Django model is a table in your database.
The Members table created in the previous chapter is empty.
To update records that are already in the database, we first have to get the record we want to update:
To delete a record in a table, start by getting the record you want to delete:
To add a field to a table after it is created, open the models.py file, and make your changes: