cms.contrib.accounts package¶
Subpackages¶
Submodules¶
cms.contrib.accounts.admin module¶
-
class
cms.contrib.accounts.admin.
AccountsAccountAdmin
(model, admin_site)¶ Bases:
cms.contrib.admin.admin.CMSAdmin
,django.contrib.auth.admin.UserAdmin
,cms.core.translations.admin.TranslationAdmin
Admin class for AccountsAccount.
-
class
Media
¶ -
extra
= ''¶
-
js
= ['//127.0.0.1:8080/static/cms/js/admin/contrib.accounts.accountsaccount.js']¶
-
url
= 'contrib.accounts.accountsaccount.js'¶
-
-
AccountsAccountAdmin.
add_form
¶ alias of
AccountsAccountAdminCreationForm
-
AccountsAccountAdmin.
change_password_form
¶ alias of
AccountsAccountAdminPasswordChangeForm
-
AccountsAccountAdmin.
fieldsets
= ((<django.utils.functional.__proxy__ object at 0x5757ad0>, {'fields': ['username', 'password', ('last_login', 'date_joined')]}), (<django.utils.functional.__proxy__ object at 0x5757b50>, {'fields': [('first_name', 'last_name'), ('name_prefix', 'name_suffix'), ('name_middle', 'name_nick'), ('gender', 'birthday'), 'language', 'email', 'image', 'signature']}), (<django.utils.functional.__proxy__ object at 0x5757bd0>, {'fields': [('organisation', 'organisation_site'), 'meta_url', ('meta_facebook', 'meta_google'), ('meta_icq', 'meta_jabber'), ('meta_skype', 'meta_twitter')]}), (<django.utils.functional.__proxy__ object at 0x5757e50>, {'fields': [('is_active', 'is_verified'), ('password_change_allow', 'password_change_force'), 'profile_public']}), (<django.utils.functional.__proxy__ object at 0x5757f10>, {'fields': [('is_staff', 'is_superuser'), 'groups', 'user_permissions']}))¶
-
AccountsAccountAdmin.
form
¶ alias of
AccountsAccountAdminChangeForm
-
AccountsAccountAdmin.
get_date_joined
(obj)¶
-
AccountsAccountAdmin.
get_groups
(obj)¶
-
AccountsAccountAdmin.
get_inline_instances
(request, obj=None)¶
-
AccountsAccountAdmin.
get_queryset
(request)¶ Filter the changelist qs for non superuser.
-
AccountsAccountAdmin.
get_username_image
(obj)¶
-
AccountsAccountAdmin.
has_add_permission
(request, obj=None)¶ Since we have a group with permissions to add/change/delete user acounts we need to check if the requested user is_superuser and requesting user is_staff and not a superuser.
-
AccountsAccountAdmin.
has_change_permission
(request, obj=None)¶ Since we have a group with permissions to add/change/delete user acounts we need to check if the requested user is_superuser and requesting user is_staff and not a superuser.
-
AccountsAccountAdmin.
has_delete_permission
(request, obj=None)¶ Since we have a group with permissions to add/change/delete user acounts we need to check if the requested user is_superuser and requesting user is_staff and not a superuser.
-
AccountsAccountAdmin.
list_display
= ('get_date_joined', 'get_username_image', 'last_login', 'get_groups')¶
-
AccountsAccountAdmin.
list_display_meta
= ('is_active', 'is_verified', 'is_staff', 'is_superuser')¶
-
AccountsAccountAdmin.
list_filter
= ('is_staff', 'is_superuser', 'is_active', 'groups', 'date_joined', 'is_verified')¶
-
AccountsAccountAdmin.
list_stats_queryset_by
= ('date_joined',)¶
-
AccountsAccountAdmin.
lookup_allowed
(lookup, value)¶
-
AccountsAccountAdmin.
media
¶
-
AccountsAccountAdmin.
queryset
(*args, **kwargs)¶
-
AccountsAccountAdmin.
save_model
(request, obj, form, change)¶ If the
ACCOUNTS_APPROVAL_REQUIRED
setting isTrue
, send a notification email to the user being saved if theiractive
status has changed toTrue
. If theACCOUNTS_VERIFICATION_REQUIRED
setting isTrue
, send a verification email instead.
-
class
-
class
cms.contrib.accounts.admin.
AccountsAccountAdminNotification
¶ Bases:
cms.contrib.admin.admin.AdminNotification
-
description
= <django.utils.functional.__proxy__ object at 0x592f1d0>¶
-
get_context
(request)¶
-
get_objects
(request)¶
-
get_title
(request, count)¶
-
get_url
(request)¶
-
icon_class
= 'icon-circleplay'¶
-
model
¶ alias of
AccountsAccount
-
perms
= ('change_accounstaccount_all',)¶
-
-
class
cms.contrib.accounts.admin.
AccountsAccountModelstatsDashboardModule
(request)¶ Bases:
cms.contrib.modelstats.modules.ModelstatsDashboardModule
-
date_field
= 'date_joined'¶
-
get_objects
(request)¶
-
model
¶ alias of
AccountsAccount
-
only
= ('date_joined', 'pk')¶
-
-
class
cms.contrib.accounts.admin.
GroupAdmin
(model, admin_site)¶ Bases:
cms.contrib.admin.admin.CMSAdmin
,django.contrib.auth.admin.GroupAdmin
-
formfield_for_manytomany
(db_field, request=None, **kwargs)¶
-
list_display
= ('name',)¶
-
media
¶
-
cms.contrib.accounts.apps module¶
cms.contrib.accounts.autofixtures module¶
-
class
cms.contrib.accounts.autofixtures.
AccountsAccountFixture
(*args, **kwargs)¶ Bases:
cms.core.dev.autofixtures.base.CMSAutoFixture
-
COUNT_DEFAULT
= 20¶
-
field_values
= {'image': None, 'meta_google': '', 'imageteaserdescription': <autofixture.generators.NoneGenerator object at 0x8331cd0>, 'is_staff': False, 'name_prefix': '', 'expired_date': <autofixture.generators.NoneGenerator object at 0x8560590>, 'meta_twitter': '', 'meta_facebook': '', 'date_joined': datetime.datetime(2016, 2, 25, 4, 38, 12, 702178, tzinfo=<UTC>), 'name_nick': '', 'title': <autofixture.generators.LoremSentenceGenerator object at 0x8331c90>, 'organisation': '', 'name_middle': '', 'is_superuser': False, 'last_login': datetime.datetime(2016, 2, 25, 4, 38, 12, 702209, tzinfo=<UTC>), 'meta_jabber': '', 'is_verified': True, 'email': <autofixture.generators.EmailGenerator object at 0x9bf93d0>, 'profile_public': True, 'meta_skype': '', 'signature': <autofixture.generators.LoremSentenceGenerator object at 0x9bf9f90>, 'is_active': True, 'password_change_force': False, 'slug': <autofixture.generators.NoneGenerator object at 0x8331ad0>, 'pretitle': <autofixture.generators.LoremSentenceGenerator object at 0x8331d10>, 'imageteaser': <autofixture.generators.NoneGenerator object at 0x8331350>, 'meta_icq': '', 'password_change_allow': True, 'gender': 4, 'name_suffix': '', 'meta_url': <autofixture.generators.StaticGenerator object at 0x9bf9790>, 'organisation_site': True, 'published_date': <cms.core.dev.autofixtures.generators.DateTimeMaxNowGenerator object at 0x8331d50>, 'order': <autofixture.generators.PositiveSmallIntegerGenerator object at 0x8331d90>}¶
-
follow_m2m
= False¶
-
pre_process_instance
(instance)¶
-
prepare_class
()¶
-
unique_email
(model, instance)¶
-
cms.contrib.accounts.avatar module¶
-
class
cms.contrib.accounts.avatar.
AvatarGenerator
¶ Bases:
object
-
background_color
()¶ Pick a random color background color. The background color should not be too bright, since the foreground font color defaults to white.
-
draw_text
(image, text, font)¶ Draw the text on the image.
-
font
()¶ Return a PIL ImageFont instance.
-
foreground_color
()¶ Returns the font color, which is white by default.
-
generate
(name, output_stream, quality=90)¶
-
square_size
= 512¶
-
text
(name)¶ Returns the text to draw.
-
text_position
(text, font)¶ Return the top-left point where the text should be placed.
-
-
cms.contrib.accounts.avatar.
generate_avatar
(obj, force=False)¶
-
cms.contrib.accounts.avatar.
random
() → x in the interval [0, 1).¶
cms.contrib.accounts.backends module¶
-
class
cms.contrib.accounts.backends.
AccountsBackend
¶ Bases:
django.contrib.auth.backends.ModelBackend
Extends Django’s
ModelBackend
to allow login via username, email, or verification token.Args are either
username
andpassword
, oruidb64
andtoken
. In either case,is_active
can also be given.For login, is_active is not given, so that the login form can raise a specific error for inactive users. For password reset, True is given for is_active. For signup verficiation, False is given for is_active.
-
authenticate
(**kwargs)¶
-
cms.contrib.accounts.cms_defaults module¶
cms.contrib.accounts.cms_plugin module¶
cms.contrib.accounts.fields module¶
-
class
cms.contrib.accounts.fields.
RichTextSignatureField
(*args, **kwargs)¶ Bases:
cms.core.fields.RichTextTeaserField
-
formfield
(**kwargs)¶
-
cms.contrib.accounts.filters module¶
-
class
cms.contrib.accounts.filters.
AccountsAccountStaffListFilter
(request, params, model, model_admin)¶ Bases:
django.contrib.admin.filters.SimpleListFilter
-
lookups
(request, model_admin)¶
-
parameter_name
= 'user'¶
-
queryset
(request, queryset)¶
-
title
= <django.utils.functional.__proxy__ object at 0x4d2c190>¶
-
cms.contrib.accounts.forms module¶
-
class
cms.contrib.accounts.forms.
AccountsAccountAdminChangeForm
(*args, **kwargs)¶ Bases:
django.contrib.auth.forms.UserChangeForm
-
AccountsAccountAdminChangeForm.
base_fields
= OrderedDict([('birthday', <django.forms.fields.DateField object at 0x5763990>), ('email', <django.forms.fields.EmailField object at 0x5763d50>), ('first_name', <django.forms.fields.CharField object at 0x576f0d0>), ('gender', <django.forms.fields.TypedChoiceField object at 0x576f450>), ('language', <django.forms.fields.TypedChoiceField object at 0x576f7d0>), ('last_name', <django.forms.fields.CharField object at 0x576fb50>), ('meta_facebook', <django.forms.fields.CharField object at 0x576fed0>), ('meta_google', <django.forms.fields.CharField object at 0x579b290>), ('meta_icq', <django.forms.fields.CharField object at 0x579b610>), ('meta_jabber', <django.forms.fields.EmailField object at 0x579b9d0>), ('meta_skype', <django.forms.fields.CharField object at 0x579bd10>), ('meta_twitter', <django.forms.fields.CharField object at 0x57ac0d0>), ('meta_url', <cms.core.forms.URLField object at 0x57ac590>), ('name_nick', <django.forms.fields.CharField object at 0x57ac8d0>), ('name_middle', <django.forms.fields.CharField object at 0x57acc50>), ('name_prefix', <django.forms.fields.CharField object at 0x57acfd0>), ('name_suffix', <django.forms.fields.CharField object at 0x57bb390>), ('password', <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x54fb690>), ('last_login', <django.forms.fields.DateTimeField object at 0x57bbad0>), ('is_superuser', <django.forms.fields.BooleanField object at 0x57bbe10>), ('groups', <django.forms.models.ModelMultipleChoiceField object at 0x5809310>), ('user_permissions', <django.forms.models.ModelMultipleChoiceField object at 0x5809890>), ('comments_count', <django.forms.fields.IntegerField object at 0x5809cd0>), ('date_joined', <django.forms.fields.DateTimeField object at 0x58160d0>), ('failed_logins', <django.forms.fields.IntegerField object at 0x5816410>), ('image', <filebrowser.fields.FileBrowseFormField object at 0x5816890>), ('is_active', <django.forms.fields.BooleanField object at 0x5816b50>), ('is_staff', <django.forms.fields.BooleanField object at 0x5816ed0>), ('is_verified', <django.forms.fields.BooleanField object at 0x582a290>), ('organisation', <django.forms.fields.CharField object at 0x582a610>), ('organisation_site', <django.forms.fields.BooleanField object at 0x582a990>), ('password_change_allow', <django.forms.fields.BooleanField object at 0x582ad10>), ('password_change_force', <django.forms.fields.BooleanField object at 0x583b0d0>), ('profile_public', <django.forms.fields.BooleanField object at 0x583b450>), ('signature', <cms.core.forms.RichTextFormField object at 0x583b8d0>), ('signature_de', <cms.core.forms.RichTextFormField object at 0x583bc90>), ('signature_en', <cms.core.forms.RichTextFormField object at 0x5886050>), ('username', <django.forms.fields.RegexField object at 0x54fb290>)])¶
-
AccountsAccountAdminChangeForm.
declared_fields
= OrderedDict([('username', <django.forms.fields.RegexField object at 0x54fb290>), ('password', <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x54fb690>)])¶
-
AccountsAccountAdminChangeForm.
media
¶
-
-
class
cms.contrib.accounts.forms.
AccountsAccountAdminCreationForm
(data=None, files=None, auto_id=u'id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None)¶ Bases:
django.contrib.auth.forms.UserCreationForm
-
AccountsAccountAdminCreationForm.
base_fields
= OrderedDict([('username', <django.forms.fields.RegexField object at 0x54f5c10>), ('password1', <django.forms.fields.CharField object at 0x54f5dd0>), ('password2', <django.forms.fields.CharField object at 0x54f5f10>)])¶
-
AccountsAccountAdminCreationForm.
clean_username
()¶
-
AccountsAccountAdminCreationForm.
declared_fields
= OrderedDict([('username', <django.forms.fields.RegexField object at 0x54f5c10>), ('password1', <django.forms.fields.CharField object at 0x54f5dd0>), ('password2', <django.forms.fields.CharField object at 0x54f5f10>)])¶
-
AccountsAccountAdminCreationForm.
media
¶
-
-
class
cms.contrib.accounts.forms.
AccountsAccountAdminPasswordChangeForm
(user, *args, **kwargs)¶ Bases:
django.contrib.auth.forms.AdminPasswordChangeForm
-
AccountsAccountAdminPasswordChangeForm.
base_fields
= OrderedDict([('password1', <django.forms.fields.CharField object at 0x557e090>), ('password2', <django.forms.fields.CharField object at 0x557e150>)])¶
-
AccountsAccountAdminPasswordChangeForm.
declared_fields
= OrderedDict([('password1', <django.forms.fields.CharField object at 0x557e090>), ('password2', <django.forms.fields.CharField object at 0x557e150>)])¶
-
AccountsAccountAdminPasswordChangeForm.
media
¶
-
-
class
cms.contrib.accounts.forms.
AccountsAccountAuthenticationForm
(*args, **kwargs)¶ Bases:
cms.core.forms.CMSSecurityForm
,django.contrib.auth.forms.AuthenticationForm
-
base_fields
= OrderedDict([('username', <django.forms.fields.CharField object at 0x54fb910>), ('password', <django.forms.fields.CharField object at 0x54fbc50>)])¶
-
declared_fields
= OrderedDict([('username', <django.forms.fields.CharField object at 0x54fb910>), ('password', <django.forms.fields.CharField object at 0x54fbc50>)])¶
-
media
¶
-
-
class
cms.contrib.accounts.forms.
AccountsAccountFormAdd0
(*args, **kwargs)¶ Bases:
cms.core.forms.CMSSecurityModelForm
ModelForm for
cms.contrib.accounts.accountsaccount
- used for signup step0.-
AccountsAccountFormAdd0.
base_fields
= OrderedDict([('username', <django.forms.fields.CharField object at 0x589ef10>)])¶
-
AccountsAccountFormAdd0.
clean_username
()¶ Ensure the username doesn’t exist or contain invalid chars. We limit it to slugifiable chars since it’s used as the slug for the user’s profile view. Added blacklist-support
-
AccountsAccountFormAdd0.
declared_fields
= OrderedDict([('username', <django.forms.fields.CharField object at 0x589ef10>)])¶
-
AccountsAccountFormAdd0.
media
¶
-
-
class
cms.contrib.accounts.forms.
AccountsAccountFormAdd1
(*args, **kwargs)¶ Bases:
cms.contrib.accounts.forms.AccountsAccountFormUpdate
-
class
Meta
¶ -
fields
= ('email', 'first_name', 'gender', 'image', 'last_name', 'meta_facebook', 'meta_google', 'meta_icq', 'meta_jabber', 'meta_skype', 'meta_twitter', 'meta_url', 'newpassword1', 'newpassword2', 'oldpassword', 'password', 'profile_public', 'signature', 'username')¶
-
model
¶ alias of
AccountsAccount
-
-
AccountsAccountFormAdd1.
base_fields
= OrderedDict([('email', <django.forms.fields.CharField object at 0x5886650>), ('first_name', <django.forms.fields.CharField object at 0x58867d0>), ('gender', <django.forms.fields.ChoiceField object at 0x5886990>), ('image', <filebrowser.fields.FileBrowseFormField object at 0x5886ad0>), ('last_name', <django.forms.fields.CharField object at 0x5886cd0>), ('meta_facebook', <django.forms.fields.CharField object at 0x5886ed0>), ('meta_google', <django.forms.fields.CharField object at 0x5894110>), ('meta_icq', <django.forms.fields.CharField object at 0x5894310>), ('meta_jabber', <django.forms.fields.CharField object at 0x5894510>), ('meta_skype', <django.forms.fields.CharField object at 0x5894710>), ('meta_twitter', <django.forms.fields.CharField object at 0x5894910>), ('meta_url', <cms.core.forms.URLField object at 0x5894b10>), ('newpassword1', <django.forms.fields.CharField object at 0x5894d10>), ('newpassword2', <django.forms.fields.CharField object at 0x5894e50>), ('oldpassword', <django.forms.fields.CharField object at 0x5894fd0>), ('password', <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x58950d0>), ('profile_public', <django.forms.fields.CharField object at 0x5895250>), ('signature', <django.forms.fields.CharField object at 0x5895450>), ('username', <django.forms.fields.CharField object at 0x589ed90>)])¶
-
AccountsAccountFormAdd1.
declared_fields
= OrderedDict([('email', <django.forms.fields.CharField object at 0x5886650>), ('first_name', <django.forms.fields.CharField object at 0x58867d0>), ('gender', <django.forms.fields.ChoiceField object at 0x5886990>), ('image', <filebrowser.fields.FileBrowseFormField object at 0x5886ad0>), ('last_name', <django.forms.fields.CharField object at 0x5886cd0>), ('meta_facebook', <django.forms.fields.CharField object at 0x5886ed0>), ('meta_google', <django.forms.fields.CharField object at 0x5894110>), ('meta_icq', <django.forms.fields.CharField object at 0x5894310>), ('meta_jabber', <django.forms.fields.CharField object at 0x5894510>), ('meta_skype', <django.forms.fields.CharField object at 0x5894710>), ('meta_twitter', <django.forms.fields.CharField object at 0x5894910>), ('meta_url', <cms.core.forms.URLField object at 0x5894b10>), ('newpassword1', <django.forms.fields.CharField object at 0x5894d10>), ('newpassword2', <django.forms.fields.CharField object at 0x5894e50>), ('oldpassword', <django.forms.fields.CharField object at 0x5894fd0>), ('password', <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x58950d0>), ('profile_public', <django.forms.fields.CharField object at 0x5895250>), ('signature', <django.forms.fields.CharField object at 0x5895450>), ('username', <django.forms.fields.CharField object at 0x589ed90>)])¶
-
AccountsAccountFormAdd1.
media
¶
-
class
-
class
cms.contrib.accounts.forms.
AccountsAccountFormResetPasswordRequest
(*args, **kwargs)¶ Bases:
cms.core.forms.CMSSecurityForm
Validates the user’s username or email for sending a login token for authenticating to change their password.
-
base_fields
= OrderedDict([('username', <django.forms.fields.CharField object at 0x592fa90>)])¶
-
clean_username
()¶
-
declared_fields
= OrderedDict([('username', <django.forms.fields.CharField object at 0x592fa90>)])¶
-
media
¶
-
save
()¶ Just return the authenticated user - used for sending login email.
-
-
class
cms.contrib.accounts.forms.
AccountsAccountFormResetPasswordVerify
(*args, **kwargs)¶ Bases:
cms.core.forms.CMSSecurityModelForm
-
AccountsAccountFormResetPasswordVerify.
base_fields
= OrderedDict([('newpassword1', <django.forms.fields.CharField object at 0x592fc50>), ('newpassword2', <django.forms.fields.CharField object at 0x592f710>)])¶
-
AccountsAccountFormResetPasswordVerify.
clean_newpassword1
()¶
-
AccountsAccountFormResetPasswordVerify.
clean_newpassword2
()¶
-
AccountsAccountFormResetPasswordVerify.
declared_fields
= OrderedDict([('newpassword1', <django.forms.fields.CharField object at 0x592fc50>), ('newpassword2', <django.forms.fields.CharField object at 0x592f710>)])¶
-
AccountsAccountFormResetPasswordVerify.
media
¶
-
AccountsAccountFormResetPasswordVerify.
save
(*args, **kwargs)¶
-
-
class
cms.contrib.accounts.forms.
AccountsAccountFormUpdate
(*args, **kwargs)¶ Bases:
cms.core.forms.CMSSecurityModelForm
ModelForm for
cms.contrib.accounts.accountsaccount
- used for signup and profile update.-
class
Meta
¶ -
fields
= ('email', 'first_name', 'gender', 'image', 'last_name', 'meta_facebook', 'meta_google', 'meta_icq', 'meta_jabber', 'meta_skype', 'meta_twitter', 'meta_url', 'newpassword1', 'newpassword2', 'oldpassword', 'password', 'profile_public', 'signature')¶
-
model
¶ alias of
AccountsAccount
-
-
AccountsAccountFormUpdate.
base_fields
= OrderedDict([('email', <django.forms.fields.CharField object at 0x5886650>), ('first_name', <django.forms.fields.CharField object at 0x58867d0>), ('gender', <django.forms.fields.ChoiceField object at 0x5886990>), ('image', <filebrowser.fields.FileBrowseFormField object at 0x5886ad0>), ('last_name', <django.forms.fields.CharField object at 0x5886cd0>), ('meta_facebook', <django.forms.fields.CharField object at 0x5886ed0>), ('meta_google', <django.forms.fields.CharField object at 0x5894110>), ('meta_icq', <django.forms.fields.CharField object at 0x5894310>), ('meta_jabber', <django.forms.fields.CharField object at 0x5894510>), ('meta_skype', <django.forms.fields.CharField object at 0x5894710>), ('meta_twitter', <django.forms.fields.CharField object at 0x5894910>), ('meta_url', <cms.core.forms.URLField object at 0x5894b10>), ('newpassword1', <django.forms.fields.CharField object at 0x5894d10>), ('newpassword2', <django.forms.fields.CharField object at 0x5894e50>), ('oldpassword', <django.forms.fields.CharField object at 0x5894fd0>), ('password', <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x58950d0>), ('profile_public', <django.forms.fields.CharField object at 0x5895250>), ('signature', <django.forms.fields.CharField object at 0x5895450>)])¶
-
AccountsAccountFormUpdate.
clean_email
()¶ Ensure the email address is not already registered.
-
AccountsAccountFormUpdate.
clean_newpassword1
()¶
-
AccountsAccountFormUpdate.
clean_newpassword2
()¶
-
AccountsAccountFormUpdate.
clean_oldpassword
()¶
-
AccountsAccountFormUpdate.
clean_username
()¶ Ensure the username doesn’t exist or contain invalid chars. We limit it to slugifiable chars since it’s used as the slug for the user’s profile view. Added blacklist-support
-
AccountsAccountFormUpdate.
declared_fields
= OrderedDict([('email', <django.forms.fields.CharField object at 0x5886650>), ('first_name', <django.forms.fields.CharField object at 0x58867d0>), ('gender', <django.forms.fields.ChoiceField object at 0x5886990>), ('image', <filebrowser.fields.FileBrowseFormField object at 0x5886ad0>), ('last_name', <django.forms.fields.CharField object at 0x5886cd0>), ('meta_facebook', <django.forms.fields.CharField object at 0x5886ed0>), ('meta_google', <django.forms.fields.CharField object at 0x5894110>), ('meta_icq', <django.forms.fields.CharField object at 0x5894310>), ('meta_jabber', <django.forms.fields.CharField object at 0x5894510>), ('meta_skype', <django.forms.fields.CharField object at 0x5894710>), ('meta_twitter', <django.forms.fields.CharField object at 0x5894910>), ('meta_url', <cms.core.forms.URLField object at 0x5894b10>), ('newpassword1', <django.forms.fields.CharField object at 0x5894d10>), ('newpassword2', <django.forms.fields.CharField object at 0x5894e50>), ('oldpassword', <django.forms.fields.CharField object at 0x5894fd0>), ('password', <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x58950d0>), ('profile_public', <django.forms.fields.CharField object at 0x5895250>), ('signature', <django.forms.fields.CharField object at 0x5895450>)])¶
-
AccountsAccountFormUpdate.
media
¶
-
AccountsAccountFormUpdate.
save
(*args, **kwargs)¶ Create the new user.
-
class
cms.contrib.accounts.management module¶
-
cms.contrib.accounts.management.
create_group
(sender, **kwargs)¶
cms.contrib.accounts.managers module¶
-
class
cms.contrib.accounts.managers.
AccountsAccountManager
¶ Bases:
django.contrib.auth.models.BaseUserManager
-
create_superuser
(username, email, password, **extra_fields)¶ Creates and saves a Superuser with the given username, email and password.
-
create_user
(username, email=None, password=None, **extra_fields)¶ Creates and saves a User with the given username, email and password.
-
make_random_password
(length=None, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789-_!:.&')¶ Generates a random password with the given length and given allowed_chars. Note that the default value of allowed_chars does not have “I” or “O” or letters and digits that look similar – just to avoid confusion.
-
cms.contrib.accounts.messages module¶
cms.contrib.accounts.models module¶
-
class
cms.contrib.accounts.models.
AccountsAccount
(id, created_date, modified_date, created_by_id, modified_by_id, birthday, email, first_name, gender, language, last_name, meta_facebook, meta_google, meta_icq, meta_jabber, meta_skype, meta_twitter, meta_url, name_nick, name_middle, name_prefix, name_suffix, password, last_login, is_superuser, comments_count, date_joined, failed_logins, image, is_active, is_staff, is_verified, organisation, organisation_site, password_change_allow, password_change_force, profile_public, signature, username)¶ Bases:
cms.core.models.BaseData
,cms.core.models.Person
,django.contrib.auth.models.AbstractBaseUser
,django.contrib.auth.models.PermissionsMixin
-
class
ApiPrivate
¶ -
fields
= ('comments_count', 'date_joined', 'failed_logins', 'image', 'is_active', 'is_staff', 'is_verified', 'is_superuser', 'groups', 'last_login', 'has_usable_password', 'org', 'organisation', 'organisation_site', 'password_change_allow', 'password_change_force', 'profile_public', 'signature', 'username', 'user_permissions')¶
-
-
exception
AccountsAccount.
DoesNotExist
¶
-
exception
AccountsAccount.
MultipleObjectsReturned
¶
-
AccountsAccount.
REQUIRED_FIELDS
= ['email']¶
-
AccountsAccount.
SENSITIVE_DATA
= ('date_joined',)¶
-
class
AccountsAccount.
Settings
¶ -
ADMIN_DASHBOARD_EXCLUDE
= True¶
-
MEDIA_PATH
= {'default': 'accounts'}¶
-
-
AccountsAccount.
USERNAME_FIELD
= 'username'¶
-
AccountsAccount.
accounts_accountsaccount_created_by
¶
-
AccountsAccount.
accounts_accountsaccount_modified_by
¶
-
AccountsAccount.
articles_articlescategory_created_by
¶
-
AccountsAccount.
articles_articlescategory_modified_by
¶
-
AccountsAccount.
articles_articlesitem_created_by
¶
-
AccountsAccount.
articles_articlesitem_modified_by
¶
-
AccountsAccount.
attachments_attachmentfile_created_by
¶
-
AccountsAccount.
attachments_attachmentfile_modified_by
¶
-
static
AccountsAccount.
autocomplete_search_fields
()¶
-
AccountsAccount.
clean_fields
(exclude=None)¶
-
AccountsAccount.
cms_eventsartist_created_by
¶
-
AccountsAccount.
cms_eventsartist_modified_by
¶
-
AccountsAccount.
cms_eventscategory_created_by
¶
-
AccountsAccount.
cms_eventscategory_modified_by
¶
-
AccountsAccount.
cms_eventsitem_created_by
¶
-
AccountsAccount.
cms_eventsitem_modified_by
¶
-
AccountsAccount.
cms_eventslocation_created_by
¶
-
AccountsAccount.
cms_eventslocation_modified_by
¶
-
AccountsAccount.
cms_eventsmedia_created_by
¶
-
AccountsAccount.
cms_eventsmedia_modified_by
¶
-
AccountsAccount.
cms_eventssalespoint_created_by
¶
-
AccountsAccount.
cms_eventssalespoint_modified_by
¶
-
AccountsAccount.
cms_quizzesanonusers_created_by
¶
-
AccountsAccount.
cms_quizzesanonusers_modified_by
¶
-
AccountsAccount.
cms_quizzescategory_created_by
¶
-
AccountsAccount.
cms_quizzescategory_modified_by
¶
-
AccountsAccount.
cms_quizzesitem_created_by
¶
-
AccountsAccount.
cms_quizzesitem_modified_by
¶
-
AccountsAccount.
cms_quizzesprize_created_by
¶
-
AccountsAccount.
cms_quizzesprize_modified_by
¶
-
AccountsAccount.
cms_quizzesprogress_created_by
¶
-
AccountsAccount.
cms_quizzesprogress_modified_by
¶
-
AccountsAccount.
cms_quizzesquestion_created_by
¶
-
AccountsAccount.
cms_quizzesquestion_modified_by
¶
-
AccountsAccount.
cms_quizzesquestionmultichoiceanswer_created_by
¶
-
AccountsAccount.
cms_quizzesquestionmultichoiceanswer_modified_by
¶
-
AccountsAccount.
cms_quizzessession_created_by
¶
-
AccountsAccount.
cms_quizzessession_modified_by
¶
-
AccountsAccount.
comment_comments
¶
-
AccountsAccount.
comment_flags
¶
-
AccountsAccount.
comments_commentsitem_created_by
¶
-
AccountsAccount.
comments_commentsitem_modified_by
¶
-
AccountsAccount.
contact_contactcategory_created_by
¶
-
AccountsAccount.
contact_contactcategory_modified_by
¶
-
AccountsAccount.
contact_contactitem_created_by
¶
-
AccountsAccount.
contact_contactitem_modified_by
¶
-
AccountsAccount.
created_by
¶
-
AccountsAccount.
dn
¶
-
AccountsAccount.
employees_employeesdepartment_created_by
¶
-
AccountsAccount.
employees_employeesdepartment_modified_by
¶
-
AccountsAccount.
employees_employeesitem_created_by
¶
-
AccountsAccount.
employees_employeesitem_modified_by
¶
-
AccountsAccount.
faq_faqcategory_created_by
¶
-
AccountsAccount.
faq_faqcategory_modified_by
¶
-
AccountsAccount.
faq_faqitem_created_by
¶
-
AccountsAccount.
faq_faqitem_modified_by
¶
-
AccountsAccount.
galleries_galleriesgallery_created_by
¶
-
AccountsAccount.
galleries_galleriesgallery_modified_by
¶
-
AccountsAccount.
galleries_galleriesitem_created_by
¶
-
AccountsAccount.
galleries_galleriesitem_modified_by
¶
-
AccountsAccount.
get_absolute_admin_url
()¶ returns a admin-url for this object
-
AccountsAccount.
get_absolute_url
()¶
-
AccountsAccount.
get_full_name
()¶
-
AccountsAccount.
get_gender_display
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_image_absolute_url
(request, version=None, prepend_proto=True)¶
-
AccountsAccount.
get_language_display
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_next_by_created_date
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_next_by_date_joined
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_next_by_last_login
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_next_by_modified_date
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_previous_by_created_date
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_previous_by_date_joined
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_previous_by_last_login
(*moreargs, **morekwargs)¶
-
AccountsAccount.
get_previous_by_modified_date
(*moreargs, **morekwargs)¶
-
AccountsAccount.
groups
¶
-
AccountsAccount.
html_app_id
¶
-
AccountsAccount.
html_object_id
¶
-
AccountsAccount.
image
¶ A placeholder class that provides a way to set the attribute on the model.
-
AccountsAccount.
is_editable
(request)¶
-
AccountsAccount.
keywords_keyword_created_by
¶
-
AccountsAccount.
keywords_keyword_modified_by
¶
-
AccountsAccount.
licenses_licenseslicense_created_by
¶
-
AccountsAccount.
licenses_licenseslicense_modified_by
¶
-
AccountsAccount.
licenses_licensesorganization_created_by
¶
-
AccountsAccount.
licenses_licensesorganization_modified_by
¶
-
AccountsAccount.
links_linkscategory_created_by
¶
-
AccountsAccount.
links_linkscategory_modified_by
¶
-
AccountsAccount.
links_linksitem_created_by
¶
-
AccountsAccount.
links_linksitem_modified_by
¶
-
AccountsAccount.
logentry_set
¶
-
AccountsAccount.
logger_loggerlog_created_by
¶
-
AccountsAccount.
logger_loggerlog_modified_by
¶
-
AccountsAccount.
modified_by
¶
-
AccountsAccount.
name
¶
-
AccountsAccount.
objects
= <cms.core.translations.translator.NewMultilingualManager object at 0x3e0bc90>¶
-
AccountsAccount.
org
¶
-
AccountsAccount.
pages_pagestext_created_by
¶
-
AccountsAccount.
pages_pagestext_modified_by
¶
-
AccountsAccount.
pendulum_pendulumproject_created_by
¶
-
AccountsAccount.
pendulum_pendulumproject_modified_by
¶
-
AccountsAccount.
pendulum_pendulumtask_assignedto
¶
-
AccountsAccount.
pendulum_pendulumtask_created_by
¶
-
AccountsAccount.
pendulum_pendulumtask_modified_by
¶
-
AccountsAccount.
plugins_setting_created_by
¶
-
AccountsAccount.
plugins_setting_modified_by
¶
-
AccountsAccount.
quizzesprogress
¶
-
AccountsAccount.
quizzessession_set
¶
-
AccountsAccount.
ratings_ratingsrating_created_by
¶
-
AccountsAccount.
ratings_ratingsrating_modified_by
¶
-
AccountsAccount.
references_referencesclient_created_by
¶
-
AccountsAccount.
references_referencesclient_modified_by
¶
-
AccountsAccount.
references_referencescondition_created_by
¶
-
AccountsAccount.
references_referencescondition_modified_by
¶
-
AccountsAccount.
references_referencesindustry_created_by
¶
-
AccountsAccount.
references_referencesindustry_modified_by
¶
-
AccountsAccount.
references_referencespartner_created_by
¶
-
AccountsAccount.
references_referencespartner_modified_by
¶
-
AccountsAccount.
references_referencesproject_created_by
¶
-
AccountsAccount.
references_referencesproject_modified_by
¶
-
AccountsAccount.
references_referencesservice_created_by
¶
-
AccountsAccount.
references_referencesservice_modified_by
¶
-
AccountsAccount.
references_referencestechnology_created_by
¶
-
AccountsAccount.
references_referencestechnology_modified_by
¶
-
AccountsAccount.
references_referenceswork_created_by
¶
-
AccountsAccount.
references_referenceswork_modified_by
¶
-
AccountsAccount.
revision_set
¶
-
AccountsAccount.
save
(*args, **kwargs)¶
-
AccountsAccount.
sensitive_data
()¶
-
AccountsAccount.
services_servicescategory_created_by
¶
-
AccountsAccount.
services_servicescategory_modified_by
¶
-
AccountsAccount.
services_servicesitem_created_by
¶
-
AccountsAccount.
services_servicesitem_modified_by
¶
-
AccountsAccount.
services_servicestechnology_created_by
¶
-
AccountsAccount.
services_servicestechnology_modified_by
¶
-
AccountsAccount.
shorturls_shorturlsitem_created_by
¶
-
AccountsAccount.
shorturls_shorturlsitem_modified_by
¶
-
AccountsAccount.
signature
¶ A descriptor used for the original translated field.
-
AccountsAccount.
user_permissions
¶
-
AccountsAccount.
vcard
()¶ Returns a vObject of the Contact
-
class
-
cms.contrib.accounts.models.
get_only_field_for_name
(prefix=None)¶
-
cms.contrib.accounts.models.
get_signature_help_text
(instance)¶
-
cms.contrib.accounts.models.
image_upload_to
(instance, generate_dir=False)¶
cms.contrib.accounts.signals module¶
-
cms.contrib.accounts.signals.
message_on_login
(sender, request, **kwargs)¶
-
cms.contrib.accounts.signals.
message_on_logout
(sender, request, **kwargs)¶
cms.contrib.accounts.urls module¶
cms.contrib.accounts.utils module¶
-
cms.contrib.accounts.utils.
get_image_or_gravatar_url
(obj=None, size=60, version=None)¶ Return the url of the users image or the url for a Gravatar given an email hash.
-
cms.contrib.accounts.utils.
gravatar_or_default
(email, size=60)¶
-
cms.contrib.accounts.utils.
profile_visibility
(requesting_user, requested_user)¶
-
cms.contrib.accounts.utils.
send_approval_mail
(request, user)¶
-
cms.contrib.accounts.utils.
send_approved_mail
(request, user)¶
-
cms.contrib.accounts.utils.
send_verification_mail
(request, user, verification_type)¶ Sends an email with a verification link to users when
ACCOUNTS_VERIFICATION_REQUIRED
is`True
and they’re signing up, or when they reset a lost password. Theverification_type
arg is both the name of the urlpattern for the verification link, as well as the names of the email templates to use.
cms.contrib.accounts.validators module¶
-
class
cms.contrib.accounts.validators.
BaseSimilarityValidator
(haystacks=None)¶ Bases:
object
-
code
= 'similarity'¶
-
fuzzy_substring
(needle, haystack)¶
-
message
= <django.utils.functional.__proxy__ object at 0x57632d0>¶
-
-
class
cms.contrib.accounts.validators.
CommonSequenceValidator
(haystacks=None)¶ Bases:
cms.contrib.accounts.validators.BaseSimilarityValidator
-
code
= 'common_sequence'¶
-
message
= <django.utils.functional.__proxy__ object at 0x57633d0>¶
-
-
class
cms.contrib.accounts.validators.
LengthValidator
(min_length=None, max_length=None)¶ Bases:
object
-
code
= 'length'¶
-
message
= <django.utils.functional.__proxy__ object at 0x5763150>¶
-
-
cms.contrib.accounts.validators.
check_password
(password)¶
-
cms.contrib.accounts.validators.
get_clean_newpassword1
(post)¶
-
cms.contrib.accounts.validators.
get_clean_newpassword2
(post)¶
cms.contrib.accounts.views module¶
-
class
cms.contrib.accounts.views.
AccountsAccountDetailContactView
(**kwargs)¶ Bases:
cms.apps.contact.views.ContactFormBaseView
,cms.contrib.accounts.views.AccountsBaseView
-
get
(request, username)¶
-
get_data2
(request, username)¶
-
post
(request, username)¶
-
template_name
= 'accounts/item_contact.html'¶
-
title
= None¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountDetailRedirectView
(**kwargs)¶ Bases:
cms.core.views.GenericView
-
get
(request)¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountDetailUpdateView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
-
get
(request, username)¶
-
post
(request, username)¶
-
template_name
= 'accounts/item_detail.html'¶
-
title
= None¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountDetailVCardQRCodeView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
-
get
(request, username)¶
-
template_name
= 'accounts/item_detail.html'¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountDetailVCardView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
-
get
(request, username)¶
-
template_name
= 'accounts/item_detail.html'¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountDetailView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
,cms.core.views.GenericTemplateTooltipView
-
get
(request, username)¶
-
post
(request, username)¶
-
schema_main
= 'Person'¶
-
template_name
= 'accounts/item_detail.html'¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountResetVerifyView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
-
get
(request, uidb64, token)¶
-
get_data
(request)¶
-
post
(request, uidb64, token)¶
-
template_name
= 'accounts/item_reset.html'¶
-
title
= <django.utils.functional.__proxy__ object at 0x7a11710>¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountResetView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
-
get
(request)¶
-
get_data
(request)¶
-
post
(request)¶
-
template_name
= 'accounts/item_reset.html'¶
-
title
= <django.utils.functional.__proxy__ object at 0x7a116d0>¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountSignupVerifyView
(**kwargs)¶ Bases:
cms.core.views.GenericView
-
get
(request, uidb64, token)¶
-
-
class
cms.contrib.accounts.views.
AccountsAccountSignupView
(**kwargs)¶ Bases:
cms.contrib.accounts.views.AccountsBaseView
-
get
(request)¶
-
get_data
(request)¶
-
info
= (<django.utils.functional.__proxy__ object at 0x797d150>, <django.utils.functional.__proxy__ object at 0x7a11690>)¶
-
post
(request)¶
-
post_step0
(request)¶
-
post_step1
(request)¶
-
render_step0
(form)¶
-
template_name
= 'accounts/item_add.html'¶
-
title
= <django.utils.functional.__proxy__ object at 0x797d050>¶
-
-
class
cms.contrib.accounts.views.
AccountsBaseView
(**kwargs)¶ Bases:
cms.core.views.GenericTemplateView
-
get_data
(request, username)¶
-
get_data_without_context
(request, username)¶
-
title
= None¶
-
-
cms.contrib.accounts.views.
accounts_login
(request, *args, **kwargs)¶