I created my own user class according to: https://docs.djangoproject.com/en/1.7/topics/auth/customizing/
Having this user created I would like to change description of the creation form. For now it's "First, enter a username and password. Then, you'll be able to edit more user options.".
Here's a screenshot:
I checked all meta fields and found how to change label of field but still can't figure out how to accomplish change of form description.
from django.contrib.auth import authenticate, login def my_view(request): username = request.POST['username'] password = request.POST['password'] user = authenticate(request, username=username, password=password) if user is not None: login(request, user) # Redirect to a success page. ... else: # Return an 'invalid ...
That's not in the form at all, it's just in a template:
https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/auth/user/add_form.html
Extension of Daniel answer:
The Django template engine has a defined order for loading templates. When it loads a template, it uses the first template that matches the name. You can override admin templates by using the same directory structure and file names.
You can add a custom admin template in the next steps:
Enjoy :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With