DJango Models
conda activate myenv django-admin startproject ex_models cd ex_models python manage.py startapp employees Register the app – INSTALLED_APPS = [ ‘django.contrib.admin’, ‘django.contrib.auth’, ‘django.contrib.contenttypes’, ‘django.contrib.sessions’, ‘django.contrib.messages’, ‘django.contrib.staticfiles’, ’employees’, ] python manage.py migrate Copy paste the following in the employees/models.py from django.db import models class Student(models.Model): first_name = models.CharField(max_length=20) last_name = models.CharField(max_length=30) contact = models.IntegerField() email = models.EmailField(max_length=50) age = models.IntegerField() Run the following commands – python…
Read more