Visit to our website!
For Update and Delete (filter through 'mid')
List of Period table
For Update and Delete Period Table(filter through 'id')
Note: In manage.py directory run
$ pip3 install -r requirement.txt
$ python3 manage.py makemigrations
$ python3 manage.py migrate
$ python3 manage.py runserver
The generic class-based-views was introduced to address the common use cases in a Web application, such as creating new objects, form handling, list views, pagination, archive views and so on.
It come in the Django core, and we can implement them from the module django.views.generic.
- View
- TemplateView
- RedirectView
- DetailView
- ListView
- FormView
- CreateView
- UpdateView
- DeleteView
- In order to enter the fake data into our database, we are creating a python file and then running it to complete the process. In our python script, we are first setting our Django environment by using our project settings. Then we are setting-up Django after importing it. To use our faker library, we are creating an instance for it. We are generating a fake name by using obj.name(). We can generate random numbers too with the help of faker library, but we have to specify the number of digits for that. All process has to repeat for N times, where N is the number of Member. Hence, a for loop is used for that purpose.