You can use a label or help text. 

https://docs.djangoproject.com/en/2.2/ref/forms/fields/#label
https://docs.djangoproject.com/en/2.2/ref/forms/fields/#help-text



On Friday, August 30, 2019 at 12:28:47 PM UTC-5, Sandip Nath wrote:
>
> I am building a car rental website with Django. Currently working on user 
> authentication.The user can either use his/her username/email and password 
> to login.It's working fine. My question is, how will I change the label for 
> username field to "username/email" so that the user can understand that 
> either username or email can be entered. I cannot  make changes in the 
> login.html template because I have used there {{ form.as_p }} tag and the 
> concerned portion in my forms.py file has:
>
>     class LoginForm(forms.Form):
>         username = forms.CharField()
>         password = forms.CharField(widget=forms.PasswordInput)
>
> I am not able to understand where to make changes. Please help.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0000d92a-4340-471a-a853-eb2a4fc73a82%40googlegroups.com.

Reply via email to