maceoutliner.users package

Submodules

maceoutliner.users.adapters module

class maceoutliner.users.adapters.AccountAdapter(request=None)[source]

Bases: allauth.account.adapter.DefaultAccountAdapter

is_open_for_signup(request)[source]

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

save_user(request, user, form, commit=True)[source]

Saves a new User instance using information provided in the signup form.

class maceoutliner.users.adapters.SocialAccountAdapter(request=None)[source]

Bases: allauth.socialaccount.adapter.DefaultSocialAccountAdapter

is_open_for_signup(request, sociallogin)[source]

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

maceoutliner.users.admin module

class maceoutliner.users.admin.MyUserAdmin(model, admin_site)[source]

Bases: django.contrib.auth.admin.UserAdmin

add_form

alias of MyUserCreationForm

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

alias of MyUserChangeForm

list_display = ('username', 'display_name', 'is_superuser')
media
search_fields = ['display_name']
class maceoutliner.users.admin.MyUserChangeForm(*args, **kwargs)[source]

Bases: django.contrib.auth.forms.UserChangeForm

class Meta[source]

Bases: django.contrib.auth.forms.Meta

model

alias of maceoutliner.users.models.User

base_fields = {'bio': <django.forms.fields.CharField object at 0x7ff9cb636630>, 'date_joined': <django.forms.fields.DateTimeField object at 0x7ff9cb6363c8>, 'display_name': <django.forms.fields.CharField object at 0x7ff9cb636470>, 'email': <django.forms.fields.EmailField object at 0x7ff9cb636048>, 'first_name': <django.forms.fields.CharField object at 0x7ff9cb62cc50>, 'groups': <django.forms.models.ModelMultipleChoiceField object at 0x7ff9cb62c6d8>, 'homepage_url': <django.forms.fields.URLField object at 0x7ff9cb6367f0>, 'is_active': <django.forms.fields.BooleanField object at 0x7ff9cb6362e8>, 'is_staff': <django.forms.fields.BooleanField object at 0x7ff9cb6361d0>, 'is_superuser': <django.forms.fields.BooleanField object at 0x7ff9cb62c668>, 'last_login': <django.forms.fields.DateTimeField object at 0x7ff9cb62c550>, 'last_name': <django.forms.fields.CharField object at 0x7ff9cb62ce10>, 'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x7ff9cb724588>, 'user_permissions': <django.forms.models.ModelMultipleChoiceField object at 0x7ff9cb62c828>, 'username': <django.contrib.auth.forms.UsernameField object at 0x7ff9cb62ca20>}
declared_fields = {'password': <django.contrib.auth.forms.ReadOnlyPasswordHashField object at 0x7ff9cb724588>}
media
class maceoutliner.users.admin.MyUserCreationForm(*args, **kwargs)[source]

Bases: django.contrib.auth.forms.UserCreationForm

class Meta[source]

Bases: django.contrib.auth.forms.Meta

model

alias of maceoutliner.users.models.User

base_fields = {'password1': <django.forms.fields.CharField object at 0x7ff9cb709ac8>, 'password2': <django.forms.fields.CharField object at 0x7ff9cb7242e8>, 'username': <django.contrib.auth.forms.UsernameField object at 0x7ff9cb62c400>}
clean_username()[source]
declared_fields = {'password1': <django.forms.fields.CharField object at 0x7ff9cb709ac8>, 'password2': <django.forms.fields.CharField object at 0x7ff9cb7242e8>}
error_message = None
media

maceoutliner.users.apps module

class maceoutliner.users.apps.UsersConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

name = 'maceoutliner.users'
ready()[source]

Override this to put in: Users system checks Users signal registration

verbose_name = 'Users'

maceoutliner.users.models module

class maceoutliner.users.models.User(id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined, created, modified, display_name, bio, homepage_url)[source]

Bases: fiction_outlines.models.TimeStampedModel, django.contrib.auth.models.AbstractUser

Parameters:
  • id (AutoField) – Id
  • password (CharField) – Password
  • last_login (DateTimeField) – Last login
  • 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) – First name
  • last_name (CharField) – Last name
  • email (EmailField) – Email address
  • 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) – Date joined
  • created (AutoCreatedField) – Created
  • modified (AutoLastModifiedField) – Modified
  • display_name (CharField) – 🎶 What’s your name, son? ALEXANDER HAMILTON
  • bio (CharField) – A few words about you.
  • homepage_url (URLField) – Your home on the web.
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

avatar_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.

bio

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

character_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.

display_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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.

get_absolute_url()[source]
get_all_recent_changes(num_results)[source]

Fetch the results of recent additions and modifications, merge them, resort, and then return as a list of dicts.

get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)
get_next_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)
get_next_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=True, **kwargs)
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)
get_previous_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)
get_previous_by_modified(*, field=<fiction_outlines.models.AutoLastModifiedField: modified>, is_next=False, **kwargs)
get_recent_additions(num_results)[source]

Fetch a list of recent additions or edits a user has made across the site.

get_recent_edits(num_results)[source]

Fetch recent edits the user has made.

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.

homepage_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

location_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.

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.

outline_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.

prepare_history_query_set_dict(datetime_field='created')[source]
series_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.

maceoutliner.users.models.combined_recent(limit, **kwargs)[source]
maceoutliner.users.models.update_arc_modify_based_on_arc_node(sender, instance, created, *args, **kwargs)[source]

If an ArcElement Node is edited after the initial addition to the arc, update the arc’s last modified timestamp.

maceoutliner.users.models.update_outline_modify_based_on_story_node(sender, instance, created, *args, **kwargs)[source]

If a StoryElementNode is edited after the initial addition to the outline, update the outline’s last modified timestamp.

maceoutliner.users.urls module

maceoutliner.users.views module

class maceoutliner.users.views.UserDetailView(**kwargs)[source]

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

model

alias of maceoutliner.users.models.User

slug_field = 'username'
slug_url_kwarg = 'username'
class maceoutliner.users.views.UserListView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.list.ListView

model

alias of maceoutliner.users.models.User

slug_field = 'username'
slug_url_kwarg = 'username'
class maceoutliner.users.views.UserRedirectView(**kwargs)[source]

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

get_redirect_url()[source]

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 maceoutliner.users.views.UserUpdateView(**kwargs)[source]

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

fields = ['display_name', 'bio', 'homepage_url']
get_object()[source]

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()[source]

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

model

alias of maceoutliner.users.models.User

Module contents