nkdsu.apps.vote.views package

class nkdsu.apps.vote.views.IndexView(**kwargs)[source]

Bases: CurrentShowMixin, TemplateView

section = 'home'
template_name = 'index.html'
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.Browse(**kwargs)[source]

Bases: TemplateView

section = 'browse'
template_name = 'browse.html'
class nkdsu.apps.vote.views.BrowseAnime(**kwargs)[source]

Bases: BrowseCategory

section = 'browse'
category_name: str | None = 'anime'
get_categories() Iterable[BrowsableItem][source]
class nkdsu.apps.vote.views.BrowseArtists(**kwargs)[source]

Bases: BrowseCategory

section = 'browse'
category_name: str | None = 'artists'
get_categories() Iterable[BrowsableItem][source]
class nkdsu.apps.vote.views.BrowseComposers(**kwargs)[source]

Bases: BrowseCategory

section = 'browse'
category_name: str | None = 'composers'
get_categories() Iterable[BrowsableItem][source]
class nkdsu.apps.vote.views.BrowseYears(**kwargs)[source]

Bases: BrowseCategory

section = 'browse'
category_name: str | None = 'years'
contents_required = False
searchable = False
get_categories() Iterable[BrowsableItem][source]
class nkdsu.apps.vote.views.BrowseRoles(**kwargs)[source]

Bases: ElfMixin, BrowseCategory

section = 'browse'
template_name = 'browse_roles.html'
category_name: str | None = 'roles'
get_categories() Iterable[BrowsableItem][source]
class nkdsu.apps.vote.views.Archive(**kwargs)[source]

Bases: BreadcrumbMixin, ArchiveList

section = 'browse'
template_name = 'archive.html'
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse')]
get_queryset() QuerySet[source]
class nkdsu.apps.vote.views.ShowDetail(**kwargs)[source]

Bases: BreadcrumbMixin, ShowDetail

section = 'browse'
template_name = 'show_detail.html'
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse'), ('/archive/', 'past shows')]
model

alias of Show

object: Show
class nkdsu.apps.vote.views.ListenRedirect(**kwargs)[source]

Bases: ShowDetail

section = 'browse'
template_name = 'show_detail.html'
get(*a, **k) HttpResponse[source]
class nkdsu.apps.vote.views.Roulette(**kwargs)[source]

Bases: ListView, AccessMixin

section = 'roulette'
model

alias of Track

template_name = 'roulette.html'
context_object_name = 'tracks'
default_minutes_count = 1
default_decade = 1980
modes = [('hipster', 'hipster'), ('indiscriminate', 'indiscriminate'), ('almost-100', 'almost 100'), ('decade', 'decade'), ('short', 'short'), ('staple', 'staple'), ('pro', 'pro (only for pros)')]
get(request, *args, **kwargs) HttpResponse[source]
commitment(commit_from: TrackQuerySet) ProRouletteCommitment[source]
commitment() ProRouletteCommitment | None
get_base_queryset() TrackQuerySet[source]
get_tracks() tuple[Iterable[Track], int][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.Search(**kwargs)[source]

Bases: ListView

template_name = 'search.html'
model

alias of Track

context_object_name = 'tracks'
paginate_by = 20
get(request: HttpRequest, *args, **kwargs) HttpResponse[source]
property _queryset: TrackQuerySet
get_queryset() QuerySet[source]
property anime_suggestions: set[str]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.TrackSpecificMixin[source]

Bases: object

kwargs: dict[str, Any]
get_track() Track[source]
get_context_data(*args, **kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.TrackDetail(**kwargs)[source]

Bases: DetailView

model

alias of Track

template_name = 'track_detail.html'
context_object_name = 'track'
get(request: HttpRequest, *args, **kwargs) HttpResponse[source]
class nkdsu.apps.vote.views.VoterDetail(**kwargs)[source]

Bases: DetailView

paginate_by = 100
abstract get_voter() Voter[source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.TwitterUserDetail(**kwargs)[source]

Bases: TwitterUserDetailMixin, VoterDetail

template_name = 'twitter_user_detail.html'
context_object_name = 'voter'
model

alias of TwitterUser

get(request: HttpRequest, *args, **kwargs) HttpResponse[source]
get_voter() TwitterUser[source]
class nkdsu.apps.vote.views.UpdateVoteView(**kwargs)[source]

Bases: LoginRequiredMixin, UpdateView

template_name = 'vote_edit.html'
fields = ['text']
get_queryset() QuerySet[source]
get_success_url() str[source]
class nkdsu.apps.vote.views.Year(**kwargs)[source]

Bases: BreadcrumbMixin, TrackListWithAnimeGroupingListView

section = 'browse'
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse'), ('/years/', 'years')]
template_name = 'year.html'
get_track_queryset() TrackQuerySet[source]
get_context_data()[source]
class nkdsu.apps.vote.views.Artist(**kwargs)[source]

Bases: BreadcrumbMixin, TrackListWithAnimeGroupingListView

template_name = 'artist_detail.html'
section = 'browse'
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse'), ('/artists/', 'artists')]
get(request: HttpRequest, *args, **kwargs) HttpResponse[source]
get_track_queryset() Sequence[Track][source]
artist_suggestions() set[str][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.Anime(**kwargs)[source]

Bases: BreadcrumbMixin, ListView

section = 'browse'
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse'), ('/anime/', 'anime')]
model

alias of Track

template_name = 'anime_detail.html'
context_object_name = 'tracks'
get_queryset() list[Track][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.AnimePicture(**kwargs)[source]

Bases: Anime

get(request: HttpRequest, *args, **kwargs) HttpResponse[source]
class nkdsu.apps.vote.views.Composer(**kwargs)[source]

Bases: BreadcrumbMixin, TrackListWithAnimeGroupingListView

section = 'browse'
template_name = 'composer_detail.html'
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse'), ('/composers/', 'composers')]
get_track_queryset() Sequence[Track][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.Added(**kwargs)[source]

Bases: BreadcrumbMixin, TrackListWithAnimeGrouping, ShowDetail

default_to_current = True
section = 'new tracks'
template_name = 'added.html'
paginate_by = 50
breadcrumbs: list[tuple[str | None, str]] = [('/browse/', 'browse'), ('/archive/', 'past shows')]
model

alias of Show

object: Show
get_track_queryset() TrackQuerySet[source]
class nkdsu.apps.vote.views.Stats(**kwargs)[source]

Bases: TemplateView

section = 'stats'
template_name = 'stats.html'
cache_key = 'stats:context'
unique_voters(profiles: QuerySet, twitter_users: QuerySet) list[Voter][source]
streaks() list[Voter][source]
batting_averages() list[Voter][source]
popular_tracks() list[tuple[Track, int]][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.Info(**kwargs)[source]

Bases: MarkdownView

title: str = 'what?'
filename: str = 'README.md'
class nkdsu.apps.vote.views.APIDocs(**kwargs)[source]

Bases: MarkdownView

title: str = 'api'
filename: str = 'API.md'
class nkdsu.apps.vote.views.Privacy(**kwargs)[source]

Bases: MarkdownView

title: str = 'privacy'
filename: str = 'PRIVACY.md'
class nkdsu.apps.vote.views.TermsOfService(**kwargs)[source]

Bases: MarkdownView

title: str = 'tos'
filename: str = 'TOS.md'
class nkdsu.apps.vote.views.ReportBadMetadata(**kwargs)[source]

Bases: LoginRequiredMixin, BreadcrumbMixin, FormView

form_class

alias of BadMetadataForm

template_name = 'report.html'
get_track() Track[source]
get_context_data(*args, **kwargs) dict[str, Any][source]
get_form_kwargs() dict[str, Any][source]
get_success_url() str[source]
form_valid(form: BaseForm) HttpResponse[source]
get_breadcrumbs() list[tuple[str | None, str]][source]
class nkdsu.apps.vote.views.RequestAddition(**kwargs)[source]

Bases: LoginRequiredMixin, MarkdownView, FormView

form_class

alias of RequestForm

template_name: str | None = 'request.html'
success_url = '/'
filename: str = 'ELIGIBILITY.md'
title: str = 'Request an addition to the library'
get_initial() dict[str, Any][source]
form_valid(form: BaseForm) HttpResponse[source]
class nkdsu.apps.vote.views.TracksFromGetParamMixin(**kwargs)[source]

Bases: TemplateView

get_track_pks() list[str][source]
get_tracks() list[Track][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.VoteView(**kwargs)[source]

Bases: LoginRequiredMixin, TracksFromGetParamMixin, CreateView

model

alias of Vote

form_class

alias of VoteForm

template_name = 'vote.html'
success_url = '/'
get_track_pks() list[str][source]
get_tracks() list[Track][source]
get_form_kwargs() dict[str, Any][source]
form_valid(form: VoteForm) HttpResponse[source]
class nkdsu.apps.vote.views.AddToListView(**kwargs)[source]

Bases: LoginRequiredMixin, TracksFromGetParamMixin, FormView

template_name = 'add_to_list.html'
get_form_class() type[BaseForm][source]
get_context_data(**kwargs) dict[str, Any][source]
form_valid(form: BaseForm) HttpResponse[source]
class nkdsu.apps.vote.views.SetDarkModeView(**kwargs)[source]

Bases: FormView

http_method_names = ['post']
form_class

alias of DarkModeForm

success_url = '/'
get_success_url() str[source]
form_valid(form: BaseForm) HttpResponse[source]
form_invalid(form: BaseForm) HttpResponse[source]

Submodules

nkdsu.apps.vote.views.admin module

class nkdsu.apps.vote.views.admin.AdminMixin[source]

Bases: LoginRequiredMixin

A mixin we should apply to all admin views.

handle_validation_error(error)[source]
classmethod as_view(**kw)[source]
class nkdsu.apps.vote.views.admin.TrackSpecificAdminMixin[source]

Bases: TrackSpecificMixin, AdminMixin

class nkdsu.apps.vote.views.admin.AdminActionMixin[source]

Bases: AdminMixin

url = '/'
get_redirect_url()[source]
get_context_data(*args, **kwargs)[source]
get_ajax_success_message()[source]
do_thing_and_redirect()[source]
class nkdsu.apps.vote.views.admin.AdminAction[source]

Bases: AdminActionMixin

A view for an admin action that we can be comfortable doing immediately.

get(request, *args, **kwargs)[source]
class nkdsu.apps.vote.views.admin.DestructiveAdminAction[source]

Bases: AdminActionMixin, TemplateResponseMixin

A view for an admin action that’s worth asking if our host is sure.

template_name = 'confirm.html'
deets: str | None = None
get_deets() str | None[source]
get_cancel_url()[source]
get_context_data(*args, **kwargs)[source]
get(request, *args, **kwargs)[source]
class nkdsu.apps.vote.views.admin.SelectionAdminAction(**kwargs)[source]

Bases: AdminAction, View

Do something with the current selection and wipe it.

model

alias of Track

fmt = '{} modified'
get_queryset()[source]
do_thing_and_redirect()[source]
class nkdsu.apps.vote.views.admin.Play(**kwargs)[source]

Bases: DestructiveAdminAction, DetailView

Mark this track as played.

model

alias of Track

get_deets() str[source]
do_thing() None[source]
get_redirect_url() str[source]
class nkdsu.apps.vote.views.admin.PostAboutPlay(**kwargs)[source]

Bases: TrackSpecificAdminMixin, TemplateView

template_name = 'post_about_play.html'
class nkdsu.apps.vote.views.admin.Archive(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.Unarchive(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.Hide(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.Unhide(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.LockMetadata(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.UnlockMetadata(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.ManualVote(**kwargs)[source]

Bases: TrackSpecificAdminMixin, CreateView

model

alias of Vote

fields = ['text', 'name', 'kind']
template_name = 'manual_vote.html'
form_valid(form)[source]
class nkdsu.apps.vote.views.admin.MakeBlock(**kwargs)[source]

Bases: TrackSpecificAdminMixin, CreateView

Block a track.

model

alias of Block

fields = ['reason']
template_name = 'block.html'
form_valid(form)[source]
class nkdsu.apps.vote.views.admin.Unblock(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.MakeBlockWithReason(**kwargs)[source]

Bases: AdminAction, DetailView

Block a track for a particular reason.

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.MakeShortlist(**kwargs)[source]

Bases: AdminAction, DetailView

Add a track to the shortlist.

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.MakeDiscard(**kwargs)[source]

Bases: AdminAction, DetailView

Discard a track.

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.OrderShortlist(**kwargs)[source]

Bases: AdminMixin, JSApiMixin, View

do_thing(post)[source]
class nkdsu.apps.vote.views.admin.ResetShortlistAndDiscard(**kwargs)[source]

Bases: AdminAction, DetailView

model

alias of Track

do_thing()[source]
class nkdsu.apps.vote.views.admin.LibraryUploadView(**kwargs)[source]

Bases: AdminMixin, FormView

template_name = 'upload.html'
form_class

alias of LibraryUploadForm

form_valid(form)[source]
class nkdsu.apps.vote.views.admin.LibraryUploadConfirmView(**kwargs)[source]

Bases: DestructiveAdminAction, TemplateView

Update the library.

template_name = 'library_update.html'
update_library(dry_run: bool) list[MetadataChange][source]
get_deets()[source]
do_thing()[source]
class nkdsu.apps.vote.views.admin.MyriadExportUploadView(**kwargs)[source]

Bases: AdminMixin, FormView

template_name = 'upload_myriad_export.html'
form_class

alias of MyriadExportUploadForm

form_valid(form: MyriadExportUploadForm) HttpResponse[source]
class nkdsu.apps.vote.views.admin.ToggleAbuser(**kwargs)[source]

Bases: AdminAction, DetailView

do_thing() None[source]
class nkdsu.apps.vote.views.admin.ToggleTwitterAbuser(**kwargs)[source]

Bases: ToggleAbuser

model

alias of TwitterUser

get_object()[source]
class nkdsu.apps.vote.views.admin.ToggleLocalAbuser(**kwargs)[source]

Bases: ToggleAbuser

model

alias of Profile

get_object()[source]
class nkdsu.apps.vote.views.admin.HiddenTracks(**kwargs)[source]

Bases: AdminMixin, ListView

model

alias of Track

template_name = 'hidden.html'
context_object_name = 'tracks'
get_queryset()[source]
class nkdsu.apps.vote.views.admin.ArchivedTracks(**kwargs)[source]

Bases: AdminMixin, ListView

model

alias of Track

template_name = 'archived.html'
context_object_name = 'tracks'
get_queryset()[source]
class nkdsu.apps.vote.views.admin.TracksWithNoMediaId(**kwargs)[source]

Bases: AdminMixin, ListView

model

alias of Track

template_name = 'no_media_id.html'
context_object_name = 'tracks'
get_queryset()[source]
class nkdsu.apps.vote.views.admin.InuDesuTracks(**kwargs)[source]

Bases: AdminMixin, ListView

model

alias of Track

template_name = 'inudesu.html'
context_object_name = 'tracks'
get_queryset()[source]
class nkdsu.apps.vote.views.admin.ArtlessTracks(**kwargs)[source]

Bases: AdminMixin, ListView

model

alias of Track

template_name = 'artless.html'
context_object_name = 'tracks'
paginate_by = 20
get_queryset()[source]
class nkdsu.apps.vote.views.admin.ShortlistSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} shortlisted'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.ArchiveSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} archived'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.UnarchiveSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} unarchived'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.HideSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} hidden'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.UnhideSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} unhidden'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.DiscardSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} discarded'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.ResetShortlistAndDiscardSelection(**kwargs)[source]

Bases: SelectionAdminAction

fmt = '{} reset'
do_thing() None[source]
class nkdsu.apps.vote.views.admin.MakeNote(**kwargs)[source]

Bases: TrackSpecificAdminMixin, FormView

template_name = 'note.html'
form_class

alias of NoteForm

form_valid(form)[source]
class nkdsu.apps.vote.views.admin.RemoveNote(**kwargs)[source]

Bases: DestructiveAdminAction, DetailView

Remove this note.

model

alias of Note

get_deets() str[source]
do_thing() None[source]
class nkdsu.apps.vote.views.admin.MigrateAwayFrom(**kwargs)[source]

Bases: TrackSpecificAdminMixin, FormView

template_name = 'migrate_away_from.html'
get_possible_targets() TrackQuerySet[source]
get_form_class() type[Form][source]
form_valid(form: Form) HttpResponse[source]
class nkdsu.apps.vote.views.admin.Throw500(**kwargs)[source]

Bases: AdminMixin, DetailView

dispatch(*args, **kwargs)[source]

nkdsu.apps.vote.views.api module

class nkdsu.apps.vote.views.api.APIView(**kwargs)[source]

Bases: View, ABC

abstract get_api_stuff() None | bool | int | float | str | datetime | dict[str, None | bool | int | float | str | datetime | dict[str, JsonEncodable] | list[JsonEncodable]] | list[None | bool | int | float | str | datetime | dict[str, JsonEncodable] | list[JsonEncodable]][source]
get(request: HttpRequest, *args, **kwargs) HttpResponse[source]
_abc_impl = <_abc._abc_data object>
class nkdsu.apps.vote.views.api.DetailAPIView(**kwargs)[source]

Bases: APIView, SingleObjectMixin

get_api_stuff() dict[str, None | bool | int | float | str | datetime | dict[str, None | bool | int | float | str | datetime | dict[str, JsonEncodable] | list[JsonEncodable]] | list[None | bool | int | float | str | datetime | dict[str, JsonEncodable] | list[JsonEncodable]]][source]
_abc_impl = <_abc._abc_data object>
class nkdsu.apps.vote.views.api.ShowAPI(**kwargs)[source]

Bases: ThisShowDetailMixin, DetailAPIView

_abc_impl = <_abc._abc_data object>
class nkdsu.apps.vote.views.api.PrevShowAPI(**kwargs)[source]

Bases: ShowDetailMixin, DetailAPIView

view_name: str | None = 'vote:api:show'
_abc_impl = <_abc._abc_data object>
class nkdsu.apps.vote.views.api.TrackAPI(**kwargs)[source]

Bases: DetailAPIView

model

alias of Track

_abc_impl = <_abc._abc_data object>
class nkdsu.apps.vote.views.api.SearchAPI(**kwargs)[source]

Bases: APIView, Search

get_api_stuff(*a, **k) list[None | bool | int | float | str | datetime | dict[str, None | bool | int | float | str | datetime | dict[str, JsonEncodable] | list[JsonEncodable]] | list[None | bool | int | float | str | datetime | dict[str, JsonEncodable] | list[JsonEncodable]]][source]
_abc_impl = <_abc._abc_data object>
class nkdsu.apps.vote.views.api.TwitterUserAPI(**kwargs)[source]

Bases: TwitterUserDetailMixin, DetailAPIView

_abc_impl = <_abc._abc_data object>

nkdsu.apps.vote.views.elf module

class nkdsu.apps.vote.views.elf.ElfMixin[source]

Bases: LoginRequiredMixin

A mixin for views that only elfs (or staff) can see.

classmethod as_view(**kw)[source]
class nkdsu.apps.vote.views.elf.RequestList(**kwargs)[source]

Bases: ElfMixin, ListView

template_name = 'requests.html'
model

alias of Request

get_queryset()[source]
class nkdsu.apps.vote.views.elf.FillRequest(**kwargs)[source]

Bases: ElfMixin, FormView

allowed_methods = ['post']
form_class

alias of Form

form_valid(form: Form) HttpResponse[source]
class nkdsu.apps.vote.views.elf.ClaimRequest(**kwargs)[source]

Bases: ElfMixin, FormView

allowed_methods = ['post']
form_class

alias of Form

form_valid(form: Form) HttpResponse[source]
class nkdsu.apps.vote.views.elf.ShelfRequest(**kwargs)[source]

Bases: ElfMixin, FormView

allowed_methods = ['post']
form_class

alias of Form

form_valid(form: Form) HttpResponse[source]
class nkdsu.apps.vote.views.elf.CheckMetadata(**kwargs)[source]

Bases: ElfMixin, FormView

form_class

alias of CheckMetadataForm

template_name = 'check_metadata.html'
form_valid(form: CheckMetadataForm) HttpResponse[source]
class nkdsu.apps.vote.views.elf.UnmatchedAnimeTitles(**kwargs)[source]

Bases: ElfMixin, View

get(request: HttpRequest) HttpResponse[source]

nkdsu.apps.vote.views.js module

class nkdsu.apps.vote.views.js.JSApiMixin[source]

Bases: object

content_type: str | None = 'text/plain'
post(request)[source]
class nkdsu.apps.vote.views.js.SelectionView(**kwargs)[source]

Bases: JSApiMixin, TemplateView

template_name = 'minitracklist.html'
model

alias of Track

get_queryset()[source]
post(request, *args, **kwargs)[source]
class nkdsu.apps.vote.views.js.GetSelection(**kwargs)[source]

Bases: SelectionView

do_thing() None[source]
class nkdsu.apps.vote.views.js.Select(**kwargs)[source]

Bases: SelectionView

do_thing() None[source]
class nkdsu.apps.vote.views.js.Deselect(**kwargs)[source]

Bases: SelectionView

do_thing() None[source]
class nkdsu.apps.vote.views.js.ClearSelection(**kwargs)[source]

Bases: SelectionView

do_thing() None[source]

nkdsu.apps.vote.views.profiles module

class nkdsu.apps.vote.views.profiles.ProfileView(**kwargs)[source]

Bases: VoterDetail

model

alias of User

context_object_name = 'object'
get_object(queryset: QuerySet | None = None) AbstractBaseUser[source]
post(request: HttpRequest, username: str) HttpResponse[source]
get_voter() Profile[source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.profiles.UpdateProfileView(**kwargs)[source]

Bases: LoginRequiredMixin, UpdateView

model

alias of Profile

fields = ['display_name', 'pronouns', 'avatar']
template_name = 'edit_profile.html'
base_breadcrumbs = [('/profile/', 'edit profile')]
get_form()[source]
get_success_url() str[source]
get_object(queryset: QuerySet | None = None) Profile[source]
class nkdsu.apps.vote.views.profiles.UserTrackListMixin[source]

Bases: ContextMixin

model: type[UserTrackList]
request: HttpRequest
kwargs: dict[str, Any]
get_curator() User[source]
get_context_data(**kwargs) dict[str, Any][source]
get_queryset() QuerySet[source]
class nkdsu.apps.vote.views.profiles.ModifyUserTrackList(**kwargs)[source]

Bases: UserTrackListMixin, UpdateView

model

alias of UserTrackList

post(request: HttpRequest, *args, **kwargs) HttpResponse[source]
form_valid(form: ModelForm) HttpResponse[source]
get_object(queryset: QuerySet | None = None) UserTrackList[source]
class nkdsu.apps.vote.views.profiles.UserTrackListView(**kwargs)[source]

Bases: BreadcrumbMixin, ModifyUserTrackList

model

alias of UserTrackList

template_name = 'user_track_list_detail.html'
fields = ['name', 'public', 'icon', 'description']
get_breadcrumbs() list[tuple[str | None, str]][source]
get_form_class() type[ModelForm][source]
get_context_data(**kwargs) dict[str, Any][source]
class nkdsu.apps.vote.views.profiles.UserTrackListModifyMembersView(**kwargs)[source]

Bases: ModifyUserTrackList

fields = []
get(request: HttpRequest, *a, **k) HttpResponse[source]
get_form_class() type[ModelForm][source]
form_valid(form: ModelForm) HttpResponse[source]
form_invalid(form: ModelForm) HttpResponse[source]