How to extend django's user class and change authentication middleware.
Hi everyone,
Welcome for the first edition for python-friday ! This python friday will be dedicated to the so popular django web framework because I really have my hands in it for the time being.
Django offers a very nice User class to manage all sort of users, set rights, contact information and so on. But sometimes, you want to extend that class to add some extra information.
The problem:
You want to use your – let’s call it – Customer class as the central user class and authenticate using django’s user modules.
The solution:
Extend the user classs to add your data and configure django framework to use your new class as a middleware and authenticate on it.
