from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Profile,driver_Profile

         ## customer profile ##
class UserRegisterForm(UserCreationForm):
    email = forms.EmailField()

    class Meta:
        model = User
        fields = ['username', 'email', 'password1', 'password2']

class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()

    class Meta:
        model = User
        fields = ['username', 'email']


class ProfileUpdateForm(forms.ModelForm):
    class Meta:
        model = Profile
        fields = ['image']

    #############       Driver profile           #####################
class DriverRegisterForm(UserCreationForm):
    email = forms.EmailField()
    car_details = forms.CharField(widget=forms.Textarea)
    phone = forms.CharField(max_length=12)
    class Meta:
        model = User
        fields = ['username', 'email','car_details','phone', 'password1', 'password2']

class DriverUpdateForm(forms.ModelForm):
    email = forms.EmailField()
    class Meta:
        model = User
        fields = ['username', 'email']


class DriverProfileUpdateForm(forms.ModelForm):
    class Meta:
        model = driver_Profile
        fields = ['image','status']

77919ccdae63e4cd0997d1d67147b13d81a0d4f0
<mask token>


class UserUpdateForm(forms.ModelForm):
    <mask token>


    class Meta:
        model = User
        fields = ['username', 'email']


class ProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = Profile
        fields = ['image']


class DriverRegisterForm(UserCreationForm):
    email = forms.EmailField()
    car_details = forms.CharField(widget=forms.Textarea)
    phone = forms.CharField(max_length=12)


    class Meta:
        model = User
        fields = ['username', 'email', 'car_details', 'phone', 'password1',
            'password2']


class DriverUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class DriverProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = driver_Profile
        fields = ['image', 'status']

<mask token>


class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class ProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = Profile
        fields = ['image']


class DriverRegisterForm(UserCreationForm):
    email = forms.EmailField()
    car_details = forms.CharField(widget=forms.Textarea)
    phone = forms.CharField(max_length=12)


    class Meta:
        model = User
        fields = ['username', 'email', 'car_details', 'phone', 'password1',
            'password2']


class DriverUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class DriverProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = driver_Profile
        fields = ['image', 'status']

<mask token>


class UserRegisterForm(UserCreationForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email', 'password1', 'password2']


class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class ProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = Profile
        fields = ['image']


class DriverRegisterForm(UserCreationForm):
    email = forms.EmailField()
    car_details = forms.CharField(widget=forms.Textarea)
    phone = forms.CharField(max_length=12)


    class Meta:
        model = User
        fields = ['username', 'email', 'car_details', 'phone', 'password1',
            'password2']


class DriverUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class DriverProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = driver_Profile
        fields = ['image', 'status']

from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Profile, driver_Profile


class UserRegisterForm(UserCreationForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email', 'password1', 'password2']


class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class ProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = Profile
        fields = ['image']


class DriverRegisterForm(UserCreationForm):
    email = forms.EmailField()
    car_details = forms.CharField(widget=forms.Textarea)
    phone = forms.CharField(max_length=12)


    class Meta:
        model = User
        fields = ['username', 'email', 'car_details', 'phone', 'password1',
            'password2']


class DriverUpdateForm(forms.ModelForm):
    email = forms.EmailField()


    class Meta:
        model = User
        fields = ['username', 'email']


class DriverProfileUpdateForm(forms.ModelForm):


    class Meta:
        model = driver_Profile
        fields = ['image', 'status']

from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from .models import Profile,driver_Profile

         ## customer profile ##
class UserRegisterForm(UserCreationForm):
    email = forms.EmailField()

    class Meta:
        model = User
        fields = ['username', 'email', 'password1', 'password2']

class UserUpdateForm(forms.ModelForm):
    email = forms.EmailField()

    class Meta:
        model = User
        fields = ['username', 'email']


class ProfileUpdateForm(forms.ModelForm):
    class Meta:
        model = Profile
        fields = ['image']

    #############       Driver profile           #####################
class DriverRegisterForm(UserCreationForm):
    email = forms.EmailField()
    car_details = forms.CharField(widget=forms.Textarea)
    phone = forms.CharField(max_length=12)
    class Meta:
        model = User
        fields = ['username', 'email','car_details','phone', 'password1', 'password2']

class DriverUpdateForm(forms.ModelForm):
    email = forms.EmailField()
    class Meta:
        model = User
        fields = ['username', 'email']


class DriverProfileUpdateForm(forms.ModelForm):
    class Meta:
        model = driver_Profile
        fields = ['image','status']
