Auth plugin

Plugins for Django CMS QE providing authentication. It allows user to register and login into site.

Usage

Authentication forms are activated by default and is possible to use at /auth/login or /auth/register but you can also use login or registration form anywhere you want. Just from section Generic use Login form or Register form.

API

Django CMS

class cms_qe_auth.cms_plugins.LoginFormPlugin(model=None, admin_site=None)[source]

CMS plugin allowing the user to log into site.

form

alias of django.forms.widgets.LoginFormPluginForm

class cms_qe_auth.cms_plugins.RegisterFormPlugin(model=None, admin_site=None)[source]

CMS plugin allowing the user to register into site.

form

alias of django.forms.widgets.RegisterFormPluginForm

cms_qe_auth.cms_menus.AuthModifier

Models

class cms_qe_auth.models.User(id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined)[source]
Parameters:
  • id (BigAutoField) –
  • password (CharField) –
  • last_login (DateTimeField) –
  • is_superuser (BooleanField) – Designates that this user has all permissions without explicitly assigning them.
  • username (CharField) – Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
  • first_name (CharField) –
  • last_name (CharField) –
  • email (EmailField) –
  • is_staff (BooleanField) – Designates whether the user can log into this admin site.
  • is_active (BooleanField) – Designates whether this user should be treated as active. Unselect this instead of deleting accounts.
  • date_joined (DateTimeField) –
  • groups (ManyToManyField) – The groups this user belongs to. A user will get all permissions granted to each of their groups.
  • user_permissions (ManyToManyField) – Specific permissions for this user.
exception DoesNotExist
exception MultipleObjectsReturned
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

Views

cms_qe_auth.views.register(request: django.http.request.HttpRequest, template_name: str = 'cms_qe/auth/register.html', register_form: type = <class 'cms_qe_auth.forms.RegisterForm'>)[source]

Displays the register form and handles the register action.

class cms_qe_auth.forms.PasswordResetFormWithEmailExistenceCheck(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]

Adding verification that the user exists in the database to PasswordResetForm.

https://github.com/django/django/blob/master/django/contrib/auth/views.py

class cms_qe_auth.forms.RegisterForm(*args, **kwargs)[source]

Main form for registration. Extends base Django`s UserCreationForm by including also email.