Last active
August 17, 2021 07:30
-
-
Save skolo-online/7fe61343dff81f881bf70fd520cc1e62 to your computer and use it in GitHub Desktop.
Django Forms for Invoicing Application - forms.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from django.contrib.auth.models import User | |
from django.forms import widgets | |
from .models import * | |
import json | |
class UserLoginForm(forms.ModelForm): | |
username = forms.CharField( | |
widget=forms.TextInput(attrs={'id': 'floatingInput', 'class': 'form-control mb-3'}), | |
required=True) | |
password = forms.CharField( | |
widget=forms.PasswordInput(attrs={'id': 'floatingPassword', 'class': 'form-control mb-3'}), | |
required=True) | |
class Meta: | |
model=User | |
fields=['username','password'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment