buku_latihan.users package

Subpackages

Submodules

buku_latihan.users.adapters module

class buku_latihan.users.adapters.AccountAdapter(request=None)

Bases: allauth.account.adapter.DefaultAccountAdapter

is_open_for_signup(request: django.http.request.HttpRequest)

Checks whether or not the site is open for signups.

Next to simply returning True/False you can also intervene the regular flow by raising an ImmediateHttpResponse

class buku_latihan.users.adapters.SocialAccountAdapter(request=None)

Bases: allauth.socialaccount.adapter.DefaultSocialAccountAdapter

is_open_for_signup(request: django.http.request.HttpRequest, sociallogin: Any)

Checks whether or not the site is open for signups.

Next to simply returning True/False you can also intervene the regular flow by raising an ImmediateHttpResponse

buku_latihan.users.admin module

class buku_latihan.users.admin.UserAdmin(model, admin_site)

Bases: django.contrib.auth.admin.UserAdmin

add_form

alias of buku_latihan.users.forms.UserCreationForm

fieldsets = ((None, {'fields': ('username', 'password')}), ('Personal info', {'fields': ('name', 'email')}), ('Permissions', {'fields': ('is_active', 'is_staff', 'is_superuser', 'groups', 'user_permissions')}), ('Important dates', {'fields': ('last_login', 'date_joined')}))
form

alias of buku_latihan.users.forms.UserChangeForm

list_display = ['username', 'name', 'is_superuser']
property media
search_fields = ['name']

buku_latihan.users.apps module

class buku_latihan.users.apps.UsersConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

name = 'buku_latihan.users'
ready()

Override this method in subclasses to run code when Django starts.

verbose_name = 'Users'

buku_latihan.users.forms module

class buku_latihan.users.forms.UserChangeForm(*args, **kwargs)

Bases: django.contrib.auth.forms.UserChangeForm

class Meta

Bases: django.contrib.auth.forms.UserChangeForm.Meta

model

alias of buku_latihan.users.models.User

base_fields = {'date_joined': <django.forms.fields.DateTimeField object>, 'email': <django.forms.fields.EmailField object>, 'groups': <django.forms.models.ModelMultipleChoiceField object>, 'is_active': <django.forms.fields.BooleanField object>, 'is_staff': <django.forms.fields.BooleanField object>, 'is_superuser': <django.forms.fields.BooleanField object>, 'last_login': <django.forms.fields.DateTimeField object>, 'name': <django.forms.fields.CharField object>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object>, 'user_permissions': <django.forms.models.ModelMultipleChoiceField object>, 'username': <django.contrib.auth.forms.UsernameField object>}
declared_fields = {'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object>}
property media

Return all media required to render the widgets on this form.

class buku_latihan.users.forms.UserCreationForm(*args, **kwargs)

Bases: django.contrib.auth.forms.UserCreationForm

class Meta

Bases: django.contrib.auth.forms.UserCreationForm.Meta

error_messages = {'username': {'unique': 'This username has already been taken.'}}
model

alias of buku_latihan.users.models.User

base_fields = {'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.contrib.auth.forms.UsernameField 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.

buku_latihan.users.models module

class buku_latihan.users.models.User(*args, **kwargs)

Bases: django.contrib.auth.models.AbstractUser

Default user for Buku Latihan.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

auth_token

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

emailaddress_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 a ReverseManyToOneDescriptor 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 = None
get_absolute_url()

Get url for user’s detail view.

Returns

URL for user detail.

Return type

str

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)
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 and Topping.pizzas are ManyToManyDescriptor 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.

last_name = None
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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

name

First and last name do not cover name patterns around the globe

progress

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

sitting_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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

socialaccount_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 a ReverseManyToOneDescriptor 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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

buku_latihan.users.tasks module

buku_latihan.users.urls module

buku_latihan.users.views module

class buku_latihan.users.views.UserDetailView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.detail.DetailView

model

alias of buku_latihan.users.models.User

slug_field = 'username'
slug_url_kwarg = 'username'
class buku_latihan.users.views.UserRedirectView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.RedirectView

get_redirect_url()

Return the URL redirect to. Keyword arguments from the URL pattern match generating the redirect request are provided as kwargs to this method.

permanent = False
class buku_latihan.users.views.UserUpdateView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.contrib.messages.views.SuccessMessageMixin, django.views.generic.edit.UpdateView

fields = ['name']
get_object()

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_success_url()

Return the URL to redirect to after processing a valid form.

model

alias of buku_latihan.users.models.User

success_message = 'Information successfully updated'
buku_latihan.users.views.user_detail_view(self, request, *args, **kwargs)
buku_latihan.users.views.user_redirect_view(self, request, *args, **kwargs)
buku_latihan.users.views.user_update_view(self, request, *args, **kwargs)

Module contents