PacktPublishing / Django-4-by-example

Django 4 by example (4th Edition) published by Packt
https://djangobyexample.com/
MIT License
799 stars 461 forks source link

I want to change the labels of the login form #49

Open Ghassem296 opened 1 year ago

Ghassem296 commented 1 year ago

helIo, I want to change the labels of the login form, but this does not happen. When running, these labels show their default state, "login" and "password". This is in the bookmarks example in the login form. thanks for your guide.

from django import forms from django.contrib.auth.models import User from .models import Profile

class LoginForm(forms.Form): username = forms.CharField(label='Enter username') password = forms.CharField(widget=forms.PasswordInput, label='Enter your pass')