nkdsu.apps.vote.views package¶
- class nkdsu.apps.vote.views.IndexView(**kwargs)[source]¶
Bases:
CurrentShowMixin
,TemplateView
- section = 'home'¶
- template_name = 'index.html'¶
- 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'¶
- get_categories() Iterable[BrowsableItem] [source]¶
- class nkdsu.apps.vote.views.BrowseArtists(**kwargs)[source]¶
Bases:
BrowseCategory
- section = 'browse'¶
- get_categories() Iterable[BrowsableItem] [source]¶
- class nkdsu.apps.vote.views.BrowseComposers(**kwargs)[source]¶
Bases:
BrowseCategory
- section = 'browse'¶
- get_categories() Iterable[BrowsableItem] [source]¶
- class nkdsu.apps.vote.views.BrowseYears(**kwargs)[source]¶
Bases:
BrowseCategory
- section = 'browse'¶
- 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'¶
- get_categories() Iterable[BrowsableItem] [source]¶
- class nkdsu.apps.vote.views.Archive(**kwargs)[source]¶
Bases:
BreadcrumbMixin
,ArchiveList
- section = 'browse'¶
- template_name = 'archive.html'¶
- class nkdsu.apps.vote.views.ShowDetail(**kwargs)[source]¶
Bases:
BreadcrumbMixin
,ShowDetail
- section = 'browse'¶
- template_name = 'show_detail.html'¶
- class nkdsu.apps.vote.views.ListenRedirect(**kwargs)[source]¶
Bases:
ShowDetail
- section = 'browse'¶
- template_name = 'show_detail.html'¶
- class nkdsu.apps.vote.views.Roulette(**kwargs)[source]¶
Bases:
ListView
,AccessMixin
- section = 'roulette'¶
- 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)')]¶
- commitment(commit_from: TrackQuerySet) ProRouletteCommitment [source]¶
- commitment() ProRouletteCommitment | None
- get_base_queryset() TrackQuerySet [source]¶
- class nkdsu.apps.vote.views.Search(**kwargs)[source]¶
Bases:
ListView
- template_name = 'search.html'¶
- context_object_name = 'tracks'¶
- paginate_by = 20¶
- property _queryset: TrackQuerySet¶
- class nkdsu.apps.vote.views.TrackDetail(**kwargs)[source]¶
Bases:
DetailView
- template_name = 'track_detail.html'¶
- context_object_name = 'track'¶
- class nkdsu.apps.vote.views.VoterDetail(**kwargs)[source]¶
Bases:
DetailView
- paginate_by = 100¶
- 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_voter() TwitterUser [source]¶
- class nkdsu.apps.vote.views.UpdateVoteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin
,UpdateView
- template_name = 'vote_edit.html'¶
- fields = ['text']¶
- class nkdsu.apps.vote.views.Year(**kwargs)[source]¶
Bases:
BreadcrumbMixin
,TrackListWithAnimeGroupingListView
- section = 'browse'¶
- template_name = 'year.html'¶
- get_track_queryset() TrackQuerySet [source]¶
- class nkdsu.apps.vote.views.Artist(**kwargs)[source]¶
Bases:
BreadcrumbMixin
,TrackListWithAnimeGroupingListView
- template_name = 'artist_detail.html'¶
- section = 'browse'¶
- class nkdsu.apps.vote.views.Anime(**kwargs)[source]¶
Bases:
BreadcrumbMixin
,ListView
- section = 'browse'¶
- template_name = 'anime_detail.html'¶
- context_object_name = 'tracks'¶
- class nkdsu.apps.vote.views.Composer(**kwargs)[source]¶
Bases:
BreadcrumbMixin
,TrackListWithAnimeGroupingListView
- section = 'browse'¶
- template_name = 'composer_detail.html'¶
- 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¶
- 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'¶
- class nkdsu.apps.vote.views.Info(**kwargs)[source]¶
Bases:
MarkdownView
- class nkdsu.apps.vote.views.APIDocs(**kwargs)[source]¶
Bases:
MarkdownView
- class nkdsu.apps.vote.views.Privacy(**kwargs)[source]¶
Bases:
MarkdownView
- class nkdsu.apps.vote.views.TermsOfService(**kwargs)[source]¶
Bases:
MarkdownView
- class nkdsu.apps.vote.views.ReportBadMetadata(**kwargs)[source]¶
Bases:
LoginRequiredMixin
,BreadcrumbMixin
,FormView
- form_class¶
alias of
BadMetadataForm
- template_name = 'report.html'¶
- class nkdsu.apps.vote.views.RequestAddition(**kwargs)[source]¶
Bases:
LoginRequiredMixin
,MarkdownView
,FormView
- form_class¶
alias of
RequestForm
- success_url = '/'¶
- class nkdsu.apps.vote.views.TracksFromGetParamMixin(**kwargs)[source]¶
Bases:
TemplateView
- class nkdsu.apps.vote.views.VoteView(**kwargs)[source]¶
Bases:
LoginRequiredMixin
,TracksFromGetParamMixin
,CreateView
- template_name = 'vote.html'¶
- success_url = '/'¶
- class nkdsu.apps.vote.views.AddToListView(**kwargs)[source]¶
Bases:
LoginRequiredMixin
,TracksFromGetParamMixin
,FormView
- template_name = 'add_to_list.html'¶
- class nkdsu.apps.vote.views.SetDarkModeView(**kwargs)[source]¶
Bases:
FormView
- http_method_names = ['post']¶
- form_class¶
alias of
DarkModeForm
- success_url = '/'¶
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.
- class nkdsu.apps.vote.views.admin.TrackSpecificAdminMixin[source]¶
Bases:
TrackSpecificMixin
,AdminMixin
- class nkdsu.apps.vote.views.admin.AdminActionMixin[source]¶
Bases:
AdminMixin
- url = '/'¶
- class nkdsu.apps.vote.views.admin.AdminAction[source]¶
Bases:
AdminActionMixin
A view for an admin action that we can be comfortable doing immediately.
- 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'¶
- class nkdsu.apps.vote.views.admin.SelectionAdminAction(**kwargs)[source]¶
Bases:
AdminAction
,View
Do something with the current selection and wipe it.
- fmt = '{} modified'¶
- class nkdsu.apps.vote.views.admin.Play(**kwargs)[source]¶
Bases:
DestructiveAdminAction
,DetailView
Mark this track as played.
- 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
- class nkdsu.apps.vote.views.admin.Unarchive(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.Hide(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.Unhide(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.LockMetadata(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.UnlockMetadata(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.ManualVote(**kwargs)[source]¶
Bases:
TrackSpecificAdminMixin
,CreateView
- fields = ['text', 'name', 'kind']¶
- template_name = 'manual_vote.html'¶
- class nkdsu.apps.vote.views.admin.MakeBlock(**kwargs)[source]¶
Bases:
TrackSpecificAdminMixin
,CreateView
Block a track.
- fields = ['reason']¶
- template_name = 'block.html'¶
- class nkdsu.apps.vote.views.admin.Unblock(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.MakeBlockWithReason(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
Block a track for a particular reason.
- class nkdsu.apps.vote.views.admin.MakeShortlist(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
Add a track to the shortlist.
- class nkdsu.apps.vote.views.admin.MakeDiscard(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
Discard a track.
- class nkdsu.apps.vote.views.admin.OrderShortlist(**kwargs)[source]¶
Bases:
AdminMixin
,JSApiMixin
,View
- class nkdsu.apps.vote.views.admin.ResetShortlistAndDiscard(**kwargs)[source]¶
Bases:
AdminAction
,DetailView
- class nkdsu.apps.vote.views.admin.LibraryUploadView(**kwargs)[source]¶
Bases:
AdminMixin
,FormView
- template_name = 'upload.html'¶
- form_class¶
alias of
LibraryUploadForm
- 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]¶
- 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
- class nkdsu.apps.vote.views.admin.ToggleTwitterAbuser(**kwargs)[source]¶
Bases:
ToggleAbuser
- model¶
alias of
TwitterUser
- class nkdsu.apps.vote.views.admin.ToggleLocalAbuser(**kwargs)[source]¶
Bases:
ToggleAbuser
- class nkdsu.apps.vote.views.admin.HiddenTracks(**kwargs)[source]¶
Bases:
AdminMixin
,ListView
- template_name = 'hidden.html'¶
- context_object_name = 'tracks'¶
- class nkdsu.apps.vote.views.admin.ArchivedTracks(**kwargs)[source]¶
Bases:
AdminMixin
,ListView
- template_name = 'archived.html'¶
- context_object_name = 'tracks'¶
- class nkdsu.apps.vote.views.admin.TracksWithNoMediaId(**kwargs)[source]¶
Bases:
AdminMixin
,ListView
- template_name = 'no_media_id.html'¶
- context_object_name = 'tracks'¶
- class nkdsu.apps.vote.views.admin.InuDesuTracks(**kwargs)[source]¶
Bases:
AdminMixin
,ListView
- template_name = 'inudesu.html'¶
- context_object_name = 'tracks'¶
- class nkdsu.apps.vote.views.admin.ArtlessTracks(**kwargs)[source]¶
Bases:
AdminMixin
,ListView
- template_name = 'artless.html'¶
- context_object_name = 'tracks'¶
- paginate_by = 20¶
- class nkdsu.apps.vote.views.admin.ShortlistSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} shortlisted'¶
- class nkdsu.apps.vote.views.admin.ArchiveSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} archived'¶
- class nkdsu.apps.vote.views.admin.UnarchiveSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} unarchived'¶
- class nkdsu.apps.vote.views.admin.HideSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} hidden'¶
- class nkdsu.apps.vote.views.admin.UnhideSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} unhidden'¶
- class nkdsu.apps.vote.views.admin.DiscardSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} discarded'¶
- class nkdsu.apps.vote.views.admin.ResetShortlistAndDiscardSelection(**kwargs)[source]¶
Bases:
SelectionAdminAction
- fmt = '{} reset'¶
- class nkdsu.apps.vote.views.admin.MakeNote(**kwargs)[source]¶
Bases:
TrackSpecificAdminMixin
,FormView
- template_name = 'note.html'¶
- class nkdsu.apps.vote.views.admin.RemoveNote(**kwargs)[source]¶
Bases:
DestructiveAdminAction
,DetailView
Remove this note.
- class nkdsu.apps.vote.views.admin.MigrateAwayFrom(**kwargs)[source]¶
Bases:
TrackSpecificAdminMixin
,FormView
- template_name = 'migrate_away_from.html'¶
- get_possible_targets() TrackQuerySet [source]¶
- class nkdsu.apps.vote.views.admin.Throw500(**kwargs)[source]¶
Bases:
AdminMixin
,DetailView
nkdsu.apps.vote.views.api module¶
- class nkdsu.apps.vote.views.api.APIView(**kwargs)[source]¶
-
- 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]¶
- _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
- _abc_impl = <_abc._abc_data object>¶
- class nkdsu.apps.vote.views.api.TrackAPI(**kwargs)[source]¶
Bases:
DetailAPIView
- _abc_impl = <_abc._abc_data object>¶
- class nkdsu.apps.vote.views.api.SearchAPI(**kwargs)[source]¶
-
- 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.
- class nkdsu.apps.vote.views.elf.FillRequest(**kwargs)[source]¶
-
- allowed_methods = ['post']¶
- form_class¶
alias of
Form
- class nkdsu.apps.vote.views.elf.ClaimRequest(**kwargs)[source]¶
-
- allowed_methods = ['post']¶
- form_class¶
alias of
Form
- class nkdsu.apps.vote.views.elf.ShelfRequest(**kwargs)[source]¶
-
- allowed_methods = ['post']¶
- form_class¶
alias of
Form
- class nkdsu.apps.vote.views.elf.CheckMetadata(**kwargs)[source]¶
-
- form_class¶
alias of
CheckMetadataForm
- template_name = 'check_metadata.html'¶
- form_valid(form: CheckMetadataForm) HttpResponse [source]¶
nkdsu.apps.vote.views.js module¶
- class nkdsu.apps.vote.views.js.SelectionView(**kwargs)[source]¶
Bases:
JSApiMixin
,TemplateView
- template_name = 'minitracklist.html'¶
- class nkdsu.apps.vote.views.js.GetSelection(**kwargs)[source]¶
Bases:
SelectionView
- class nkdsu.apps.vote.views.js.Select(**kwargs)[source]¶
Bases:
SelectionView
- class nkdsu.apps.vote.views.js.Deselect(**kwargs)[source]¶
Bases:
SelectionView
nkdsu.apps.vote.views.profiles module¶
- class nkdsu.apps.vote.views.profiles.ProfileView(**kwargs)[source]¶
Bases:
VoterDetail
- context_object_name = 'object'¶
- class nkdsu.apps.vote.views.profiles.UpdateProfileView(**kwargs)[source]¶
Bases:
LoginRequiredMixin
,UpdateView
- fields = ['display_name', 'pronouns', 'avatar']¶
- template_name = 'edit_profile.html'¶
- base_breadcrumbs = [('/profile/', 'edit profile')]¶
- class nkdsu.apps.vote.views.profiles.UserTrackListMixin[source]¶
Bases:
ContextMixin
- model: type[UserTrackList]¶
- request: HttpRequest¶
- class nkdsu.apps.vote.views.profiles.ModifyUserTrackList(**kwargs)[source]¶
Bases:
UserTrackListMixin
,UpdateView
- model¶
alias of
UserTrackList
- 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']¶
- class nkdsu.apps.vote.views.profiles.UserTrackListModifyMembersView(**kwargs)[source]¶
Bases:
ModifyUserTrackList
- fields = []¶