Django 1.5
Introductionto CustomUserModels
Arulmurugan Rajaraman
August27, 2013
BangaloreDjangoUserGroup
Custom User Model
• Django 1.5
• AUTH_USER_MODEL = ‘MyApp.MyModel’
• get_user_model()
BangaloreDjangoUserGroup
Custom User Model
• USERNAME_FIELD
• REQUIRED_FIELDS
• models.AbstractBaseUser
• get_username()
• is_anonymous()
• is_auth...
Custom User and Admin
• models.CustomUser
• is_staff()
• is_active()
• has_perm(perm, obj = None)
• has_module_perms(app_l...
Custom User Manager
• create_user(*username_field*, password = None, **other_fields)
• create_superuser(*username_field*, ...
Demo
BangaloreDjangoUserGroup
Thank you
arul@arulmr.com
slideshare.net/arulmr
github.com/arulmr
BangaloreDjangoUserGroup
MeetupLinks:
• Session Video Link
http://www.youtube.com/watch?v=hEwl7lhCUPI
• Github Repo Link
https://github.com/arulmr/...
Upcoming SlideShare
Loading in...5
×

Django 1.5: Introduction to Custom User Models

406

Published on

Slides for presentation http://www.meetup.com/Bangalore-Django-User-Group/events/136243972/

Presentation, sample project github repo link and demo video links availble at the comment section of above given link.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
406
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Django 1.5: Introduction to Custom User Models

  1. 1. Django 1.5 Introductionto CustomUserModels Arulmurugan Rajaraman August27, 2013 BangaloreDjangoUserGroup
  2. 2. Custom User Model • Django 1.5 • AUTH_USER_MODEL = ‘MyApp.MyModel’ • get_user_model() BangaloreDjangoUserGroup
  3. 3. Custom User Model • USERNAME_FIELD • REQUIRED_FIELDS • models.AbstractBaseUser • get_username() • is_anonymous() • is_authenticated() • set_password(raw_password) • check_password(raw_password) • set_unusable_password() • has_unusable_password() BangaloreDjangoUserGroup
  4. 4. Custom User and Admin • models.CustomUser • is_staff() • is_active() • has_perm(perm, obj = None) • has_module_perms(app_label) • models.PermissionsMixin • is_superuser • get_group_permissions(obj= None) • get_all_permissions(obj = None) • has_perm(perm, obj = None) • has_perms(perm_list, obj = None) • has_module_perms(package_name) BangaloreDjangoUserGroup
  5. 5. Custom User Manager • create_user(*username_field*, password = None, **other_fields) • create_superuser(*username_field*, password, **other_fields) • models.BaseUserManager • normalize_email(email) • get_by_natural_key(username) • make_random_password(length=10, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVW XYZ23456789') BangaloreDjangoUserGroup
  6. 6. Demo BangaloreDjangoUserGroup
  7. 7. Thank you arul@arulmr.com slideshare.net/arulmr github.com/arulmr BangaloreDjangoUserGroup
  8. 8. MeetupLinks: • Session Video Link http://www.youtube.com/watch?v=hEwl7lhCUPI • Github Repo Link https://github.com/arulmr/dj15_demo • Presentation Link http://www.slideshare.net/arulmr/django-25667413 BangaloreDjangoUserGroup
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×