Landing Package
Subpackages
Submodules
Forms
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.landing.forms.CustomCreateUserForm(*args, **kwargs)
Bases:
UserCreationForm
- class Meta
Bases:
object
- fields = ['username']
- widgets = {'username': <django.forms.widgets.EmailInput object>}
- base_fields = {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.EmailField object>}
- declared_fields = {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class seed.landing.forms.LoginForm(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)
Bases:
Form
- base_fields = {'email': <django.forms.fields.EmailField object>, 'password': <django.forms.fields.CharField object>}
- declared_fields = {'email': <django.forms.fields.EmailField object>, 'password': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
Models
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.landing.models.SEEDUser(*args, **kwargs)
Bases:
AbstractBaseUser
,PermissionsMixin
An abstract base class implementing a fully featured User model with admin-compliant permissions.
Username, password and email are required. Other fields are optional.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- REQUIRED_FIELDS = ['email']
- USERNAME_FIELD = 'username'
- analysis_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- api_key
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- columnmapping_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- cycle_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- date_joined
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deactivate_user()
- default_building_detail_custom_columns
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- default_custom_columns
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- default_organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- default_organization_id
- email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email_user(subject, message, from_email=None)
Sends an email to this User.
- emaildevice_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- first_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- generate_key()
Creates and sets an API key for this user. Adapted from tastypie:
https://github.com/toastdriven/django-tastypie/blob/master/tastypie/models.py#L47
- get_absolute_url()
- get_full_name()
Returns the first_name plus the last_name, with a space in between.
- get_next_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)
- get_previous_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)
- get_short_name()
Returns the short name for the user.
- greenassessmentpropertyauditlog_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- groups
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- importrecord_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- is_staff
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- logentry_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- modified_import_records
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- notes
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.contrib.auth.models.UserManager object>
- organizationuser_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- orgs
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- phonedevice_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- postofficeemail_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- postofficeemailtemplate_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- classmethod process_header_request(request)
Process the header string to return the user if it is a valid user.
- Parameters:
request – object, request object with HTTP Authorization
- Returns:
User object
- prompt_2fa
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)
Ensure that email and username are synced.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- staticdevice_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- totpdevice_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- user_permissions
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- username
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Tests
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
URLs
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
Views
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.landing.views.CustomLoginView(**kwargs)
Bases:
LoginView
- dispatch(request, *args, **kwargs)
This method gets called by the routing engine. The first argument is request which contains a HttpRequest instance. The request is stored in self.request for later use. The storage instance is stored in self.storage.
After processing the request using the dispatch method, the response gets updated by the storage engine (for example add cookies).
- get(request, *args, **kwargs)
This method handles GET requests.
If a GET request reaches this point, the wizard assumes that the user just starts at the first step or wants to restart the process. The data of the wizard will be reset before rendering the first step
- handle_2fa_prompt(response, user)
- handle_auth(request, response)
- handle_token(request, response)
- post(request, *args, **kwargs)
The user can select a particular device to challenge, being the backup devices added to the account.
- seed.landing.views.account_activation_sent(request)
- seed.landing.views.activate(request, uidb64, token)
- seed.landing.views.create_account(request)
- seed.landing.views.landing_page(request)
- seed.landing.views.password_reset(request)
- seed.landing.views.password_reset_complete(request)
- seed.landing.views.password_reset_confirm(request, uidb64=None, token=None)
- seed.landing.views.password_reset_done(request)
- seed.landing.views.password_set(request, uidb64=None, token=None)
- seed.landing.views.signup(request, uidb64=None, token=None)
Module contents
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md