feeds.views – feed views

class feeds.views.HomeView(**kwargs)

Bases: django.views.generic.base.TemplateView

The HomeView will print out a marketing page, where new users are supposed to come to first. It is often referred to as the landingpage.

It does not have any functionality.

class feeds.views.OptionsView(**kwargs)

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

The OptionsView will allow individual users to manage settings/options related to their account and viewing experience.

Options managed here are kept in feeds.models.Options The form to display them is kept in feeds.forms.OptionsForm

Todo

The entire options approach should be architected better and have better tests. Contained options are neither complete nor are these consequently used across the codebase.

form_class

alias of feeds.forms.OptionsForm

form_valid(form)

If the form is valid, save the associated model.

get_object(queryset=None)

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 feeds.models.options.Options

class feeds.views.OPMLView(**kwargs)

Bases: django.views.generic.edit.FormView

View to allow import of OPML Files.

Todo

The OPML Import should work on a per user basis. OPML is plain text format, but since uploaded by individuals, that should reflect in user/ownership.

form_class

alias of feeds.forms.OPMLForm

form_valid(form)

If the form is valid, redirect to the supplied URL.

get_success_url()

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

class feeds.views.WebSiteListView(**kwargs)

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

Lists all sites in the database.

The view is accessible publically.

Url:planet:site-home
get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

model

alias of feeds.models.website.WebSite

class feeds.views.WebSiteCreateView(**kwargs)

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.CreateView

View to create a new site.

form_class

alias of feeds.forms.WebSiteCreateForm

model

alias of feeds.models.website.WebSite

class feeds.views.WebSiteDetailView(**kwargs)

Bases: django.views.generic.detail.DetailView

Shows Details for one particular feeds.models.WebSite.

The view is accessible publically.

Url:planet:site-detail
get_context_data(**kwargs)

Insert the single object into the context dict.

model

alias of feeds.models.website.WebSite

class feeds.views.WebSiteUpdateView(**kwargs)

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

Update WebSite.

Update an existing WebSite.

form_class

alias of feeds.forms.WebSiteUpdateForm

model

alias of feeds.models.website.WebSite

class feeds.views.WebSiteDeleteView(**kwargs)

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.DeleteView

model

alias of feeds.models.website.WebSite

class feeds.views.WebSiteSubmitWizardView(**kwargs)

Bases: django.contrib.auth.mixins.LoginRequiredMixin, formtools.wizard.views.SessionWizardView

Wizard that walks people through when adding a site with feeds

done(form_list, form_dict, **kwargs)

This method must be overridden by a subclass to process to form data after processing all steps.

get_form(step=None, data=None, files=None)

Constructs the form for a given step. If no step is defined, the current step will be determined automatically.

The form will be initialized using the data argument to prefill the new form. If needed, instance or queryset (for ModelForm or ModelFormSet) will be added too.

class feeds.views.FeedCreateView(**kwargs)

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.contrib.auth.mixins.AccessMixin, django.views.generic.edit.CreateView

View to create a new feed.

Required login and credentials.

form_class

alias of feeds.forms.FeedCreateForm

get_permission_denied_message()

Override this method to override the permission_denied_message attribute.

model

alias of feeds.models.feed.Feed

class feeds.views.FeedListView(**kwargs)

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

List all registered feeds

model

alias of feeds.models.feed.Feed

class feeds.views.FeedDetailView(**kwargs)

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

Show details for a particular feed.

Todo

The view for Feed Details shall include stats for the particular Feed. It is a plain Class Based View right now.

get_context_data(**kwargs)

Insert the single object into the context dict.

model

alias of feeds.models.feed.Feed

class feeds.views.FeedUpdateView(**kwargs)

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

Update a particular feed

form_class

alias of feeds.forms.FeedUpdateForm

get_success_url()

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

model

alias of feeds.models.feed.Feed

class feeds.views.FeedDeleteView(**kwargs)

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

Delete a particular feed

model

alias of feeds.models.feed.Feed

class feeds.views.FeedRefreshView(**kwargs)

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

Refresh a particular feed

get_redirect_url(pk)

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

class feeds.views.FeedSubscribeView(**kwargs)

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

Subscribe user to a feed

get_redirect_url(pk)

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

class feeds.views.FeedUnSubscribeView(**kwargs)

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

UnSubscribe user to a feed

get_redirect_url(pk)

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

class feeds.views.FeedSubscriptionsView(**kwargs)

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

List all Feeds one users subscribed to.

See also:

get_queryset()

Return Queryset.

Custom Queryset.

model

alias of feeds.models.feed.Feed

class feeds.views.PostListView(**kwargs)

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

List Posts from all Feeds.

nice, too. The pagination bar looks really ugly.

get_queryset()

Return Queryset.

Apparently some feeds give posts that only have a timestamp ‘published’ from the future. We prevent displaying these by filtering for older than today/now.

:py:module:`PostManager.older_than` provides this functionality and exposes it as the :py:module:`Post.objects` Manager.

Todo

Is this redundant?

model

alias of feeds.models.post.Post

class feeds.views.PostTodayView(**kwargs)

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

List Posts from all Feeds.

nice, too. The pagination bar looks really ugly.

model

alias of feeds.models.post.Post

class feeds.views.PostSubscriptionView(**kwargs)

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

List Posts from subscribed Feeds.

Todo

At the time being PostSubscriptionView is a bare stub. It does not yet have the correct queryset, that limits results to posts from actually subscribed feeds, neither does it have a proper tests for the functionality.

Also, this view is not accessiable through an URL for now.

get_queryset()

Return Queryset.

return custom queryset.

model

alias of feeds.models.post.Post

class feeds.views.PostDetailView(**kwargs)

Bases: django.views.generic.detail.DetailView

View a post and related metadata.

Requires login and permissions.

model

alias of feeds.models.post.Post

class feeds.views.PostTrackableView(**kwargs)

Bases: django.views.generic.base.RedirectView

PostTrackableView.

Create a trackable view for a post through redirecting to the actual post.

get_redirect_url(pk)

Overwrite get_redirect_url.

class feeds.views.CategoryListView(**kwargs)

Bases: django.views.generic.list.ListView

List all registered feeds

model

alias of feeds.models.category.Category

class feeds.views.CategoryCreateView(**kwargs)

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

ToDo: make this more nice & userfriendly

form_class

alias of feeds.forms.CategoryCreateForm

model

alias of feeds.models.category.Category

class feeds.views.CategoryDetailView(**kwargs)

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

Show details for a particular Category

this shall include stats

model

alias of feeds.models.category.Category

class feeds.views.CategoryUpdateView(**kwargs)

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

Update a particular Category

form_class

alias of feeds.forms.CategoryUpdateForm

get_success_url()

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

model

alias of feeds.models.category.Category

class feeds.views.TagListView(**kwargs)

Bases: django.views.generic.list.ListView

List all registered tags

model

alias of feeds.models.category.Tag

class feeds.views.TagDetailView(**kwargs)

Bases: django.views.generic.detail.DetailView

Show details for a particular tag.

ToDo: this shall include stats

model

alias of feeds.models.category.Tag

class feeds.views.TagCreateView(**kwargs)

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

ToDo: make this more nice & userfriendly

form_class

alias of feeds.forms.TagCreateForm

model

alias of feeds.models.category.Tag

class feeds.views.TagUpdateView(**kwargs)

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

Update particular tag

model

alias of feeds.models.category.Tag