[Answered ]-Changing field identifiers without changing field names

2👍

You can set the field’s label:

XYZ_LOGIN = forms.CharField(label='Login')

As you say in the comments, this only makes the html output “human-friendly” when you render the form, you still have to use cleaned_data.get('XYZ_LOGIN') in your code.

There’s no built in functionality similar to the ‘alias’ argument you propose. You could pre-process the post data before you instantiate the form, or customize the form behaviour. Personally, I would stick with the ‘ugliness’ of your current code.

Leave a comment