abhiroyg / employee-portal

0 stars 0 forks source link

Database design #1

Open abhiroyg opened 8 years ago

abhiroyg commented 8 years ago

Please check if we need more fields or if we have to change some fields. File: users/models.py

abhiroyg commented 8 years ago

I don't how to store the login password, so I found out that django provides User class which has the basic details like: first_name, last_name, (no middle name), email, date_joined, username, password, is_staff (can access admin site or not), is_active (left the company or not), is_superuser (is the developer of this portal or not) and last_login.

Cool stuff! Plus I saw that we should not write a sub class for this class as this class is already a concrete class and there are still some bugs that will appear if we sub class it. But, we can use it as a one-to-one field in a wrapper class.

Any thoughts ?

Ref: https://docs.djangoproject.com/en/1.9/ref/contrib/auth/

Edit: Got to know about this: https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#auth-custom-user from: http://stackoverflow.com/questions/44109/extending-the-user-model-with-custom-fields-in-django. Will look into it.