<filename>students/K33401/practical_works/Shtreikh_Anna/simple_django_web_project/django_project_Shtreikh/project_first_app/forms.py<gh_stars>0
from django import forms
from .models import CarOwner
# creating a form
class CarOwnerForm(forms.ModelForm):
    # create meta class
    class Meta:
        # specify model to be used
        model = CarOwner

        # specify fields to be used
        fields = [
            "surname",
            "name",
            "birthdate",
            "passport",
            "address",
            "nationality"
        ]

<filename>students/K33401/practical_works/Shtreikh_Anna/simple_django_web_project/django_project_Shtreikh/project_first_app/forms.py<gh_stars>0
from django import forms
from .models import CarOwner
# creating a form
class CarOwnerForm(forms.ModelForm):
    # create meta class
    class Meta:
        # specify model to be used
        model = CarOwner

        # specify fields to be used
        fields = [
            "surname",
            "name",
            "birthdate",
            "passport",
            "address",
            "nationality"
        ]

# creating a form # create meta class # specify model to be used # specify fields to be used