Your SlideShare is downloading. ×
0
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Django 1.5: Introduction to Custom User Models
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Django 1.5: Introduction to Custom User Models

377

Published on

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

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
377
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Django 1.5 Introductionto CustomUserModels Arulmurugan Rajaraman August27, 2013 BangaloreDjangoUserGroup
  • 2. Custom User Model • Django 1.5 • AUTH_USER_MODEL = ‘MyApp.MyModel’ • get_user_model() BangaloreDjangoUserGroup
  • 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. 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. 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. Demo BangaloreDjangoUserGroup
  • 7. Thank you arul@arulmr.com slideshare.net/arulmr github.com/arulmr BangaloreDjangoUserGroup
  • 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

×