Welcome to feeds documentation!¶


Feeds aims to be a feed aggregator, readed and potentially a replacement for feedburner.
It is realized as a Django app. It takes feeds in any format feedparser can understand and aims to reproduce identical but trackable feeds, augmented with feedbrater information.
Documentation is in the “docs” directory.
Quick start¶
Add “feeds” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'feeds', )
Include the feeds URLconf in your project urls.py like this:
url(r'^feeds/', include( 'feeds.urls', namespace="planet", app_name="planet")), Mind the namespace `planet` that is used throughout the application for reversing URLs.
Run python manage.py syncdb to create the feeds models.
Contents:¶
feeds
– Feeds¶
The feeds module provides feed aggregation, subscription, social ranking and stats.
Author: | Andreas Neumeier |
---|---|
Contact: | andreas@neumeier.org |
Version: | 0.9 |
Date: | Jul 01, 2020 |
Copyright: | BSD alike. |
feeds is the core module for feeds.
feeds provides all functionality built on top of Django methods. Features include aggregation of rss and Atom feeds, collection of social stats from twitter, facebook, google+ and own piwik server, tracking of views in output feeds (feedburner like), displaying all with Chartjs.
feeds.views
feeds.models
feeds.admin
feeds.forms
feeds.rss
feeds.views
– feed views¶
-
class
feeds.views.
HomeView
(**kwargs)¶ Bases:
django.views.generic.base.TemplateView
Marketing Page.
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
Options Page.
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 infeeds.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)¶ Validate Form.
-
get_object
(queryset=None)¶ Get object.
-
get_success_url
()¶ Get success url.
-
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)¶ Form Valid.
-
get_success_url
()¶ Get success url.
-
-
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
Create a new feed.
Required login and credentials.
-
form_class
¶ alias of
feeds.forms.FeedCreateForm
-
get_permission_denied_message
()¶ Get permission_denied message.
-
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)¶ Get context data.
-
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
()¶ Get success url.
-
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.
-
get_success_url
()¶ Get success url.
-
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)¶ Refresh Feed and return redirect url.
-
-
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)¶ Subscribe User and redirect.
-
-
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)¶ Unsubscribe User and redirect.
-
-
class
feeds.views.
FeedSubscriptionsView
(**kwargs)¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin
,feeds.mixins.PaginateListMixin
,django.views.generic.list.ListView
List all Feeds one user subscribed.
- See also:
feeds.views.FeedSubscribeView
feeds.views.FeedUnsubscribeView
-
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
-
feeds.urls
– feed urls¶
feeds.urls
contains all the urlpatterns for the feeds
app.
URLs.
URLs for feeds
feeds.rss
– feed rss feeds¶
feeds.forms
is the interface to output the collected feeds again.
It shall incorporate tracking functions
feeds/feeds.py
output feeds collected elsewhere
..codeauthor: Andreas Neumeier
-
class
feeds.rss.
ITunesFeed
(title, link, description, language=None, author_email=None, author_name=None, author_link=None, subtitle=None, categories=None, feed_url=None, feed_copyright=None, feed_guid=None, ttl=None, **kwargs)¶ Bases:
django.utils.feedgenerator.Rss201rev2Feed
This shall reproduce an iTunes Feed
-
add_root_elements
(handler)¶ Add elements in the root (i.e. feed/channel) element. Called from write().
-
root_attributes
()¶ Return extra attributes to place on the root (i.e. feed/channel) element. Called from write().
-
-
class
feeds.rss.
RssFeed
¶ Bases:
django.contrib.syndication.views.Feed
Re-Produce a RSS Feed from stored items
Return the author for this feed. The feed is in obj, provided by get_object
-
feed_url
(obj)¶ Return the feed_url/link for this feed. The feed is in obj, provided by get_object
-
get_object
(request, feed_id)¶ Get the feed for which the items should be processed
-
item_link
(item)¶ Return a trackable link for every item part of this feed.
-
items
(obj)¶ get the actual feed-entries for obj
-
link
(obj)¶ Return the link for this feed. The feed is in obj, provided by get_object
-
title
(obj)¶ Return the title for this feed. The feed is in obj, provided by get_object
feeds.models
– feeds models¶
-
class
feeds.models.
Category
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Category model to be used for categorization of content. Categories are high level constructs to be used for grouping and organizing content, thus creating a site’s table of contents.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
save
(*args, **kwargs)¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
exception
-
class
feeds.models.
EditorCategory
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
EditorCategory Class.
Category model to be used for categorization of WebSite. Categories are high level constructs to be used for grouping and organizing content, thus creating a site’s table of contents.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
children
¶ Return all children for node.
-
classmethod
create
(name, slug=None)¶ Override create method.
-
get_absolute_url
()¶ Get absolute url for views.
-
natural_key
()¶ Natural Key for serialization.
-
save
(*args, **kwargs)¶ Override save to automate slug-creation.
-
exception
-
class
feeds.models.
Enclosure
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
potential enclosure of a
feeds.models.Post
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
enclosure_type
¶ type of the enclosed file, for example ‘image/jpeg’.
-
href
¶ the url of the enclosed media file.
-
length
¶ length of the enclosed media file in byte.
-
post
¶ reference to the post the enclosure belongs to.
-
exception
-
class
feeds.models.
Feed
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Model that contains information about any feed, including:
- metadata for processing
- results from social updates
- calculated values
Coming from feedparser:
- bozo
- bozo_exception
- encoding
- etag
- feed.author
- feed.author_detail
- feed.cloud
- feed.contributors
- feed.docs
- feed.errorreportsto
- feed.generator
- feed.generator_detail
- feed.icon
- feed.id
- feed.image
- feed.info
- feed.info_detail
- feed.language
- feed.license
- feed.link
- feed.links
- feed.logo
- feed.published
- feed.published_parsed
- feed.publisher
- feed.publisher_detail
- feed.rights
- feed.rights_detail
- feed.subtitle
- feed.subtitle_detail
- feed.tags
- feed.textinput
- feed.title
- feed.title_detail
- feed.ttl
- feed.updated
- feed.updated_parsed
- headers
- href
- modified
- namespaces
- status
- version
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
announce_posts
¶ Whether to socially announce new articles posts
-
fromFeedparser
(entry, postdict)¶ Create Posts from feedparser.
Args:
entry (dict): postdict (dict):entry can have these keys: - ‘summary_detail’ - ‘published’ - ‘published_parsed’ - ‘links’ - ‘title’ - ‘tags’ - ‘summary’ - ‘content’ - ‘guidislink’ - ‘title_detail’ - ‘link’ - ‘id’
- returnvalue::
- Either ENTRY_NEW, ENTRY_UPDATE
-
get_absolute_url
()¶ Absolute URL for this object.
Todo
should use ‘slug’ instead of ‘id’
-
ignore_ca
¶ Do (not) verify certificate authenticity.
-
parse
()¶ Wrap feedparser.parse.
Wrap feedparser.parse to handle all exceptions.
-
post_count
()¶ Count Posts.
Return the number of posts in this feed.
-
refresh
(force=False)¶ Refresh Feed.
Fetch posts for this feed, considering all we know about that source. We Ratelimit refreshing feeds.
- Args:
- force (boolean): Overrule rate limits.
- Returns:
- enum: The resulting status of refreshing this feed.
-
save
(*args, **kwargs)¶ Save.
Override default save method to enforce failure count update.
-
subscriber_count
()¶ Count Subscribers.
Return the number of subscribers for this feed.
-
update
(parsed)¶ Feed.update.
Update feed with values retrieved from feedparser through parsed.
-
class
feeds.models.
FeedStats
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
These are stats for all
feeds.models.Feed
in the list.-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
FeedEntryStats
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
These are stats for one particulat
feeds.models.Feed
in the list.-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
FeedPostCount
(id, feed, entry_new, entry_updated, entry_same, entry_err, created)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
save
(*args, **kwargs)¶ # Now (Epoch time), rounded to full seconds (hence the cast) # subtract the modulo of 3600, result is the floor hour
-
exception
-
class
feeds.models.
Options
(id, user, number_initially_displayed, number_additionally_displayed, max_entries_saved)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
Post
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Model to hold an actual feed entry
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
get_absolute_url
()¶ return the absolute url for this Post.
-
get_trackable_url
()¶ Get an URL for this particular object, that will be tracked in a separate view.
The related view is
feeds.views.PostTrackableView
The view redirects to feeds.models.Post.link, storing information about the requesting client in feeds.models.PostReadCount
-
save
(*args, **kwargs)¶ sanity check the post before saving.
-
score
¶ Todo
implement this depending on :py:feeds.models.rating
-
exception
-
class
feeds.models.
PostReadCount
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
This is not a real counter, more a log.
Need to count and cleanup elsewhere.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
Rating
(id, post, updated, tweets, blogs, plus1, likes, linkedin, shares, pageviews, sentiment, score)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
Subscription
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
User Feed Subscription
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
Tag
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
A tag.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
name
¶ The name of the Tag.
-
objects
= <feeds.managers.tag.TagManager object>¶ Overwrite the inherited manager with the custom
feeds.models.TagManager
-
relevant
¶ Indicates whether this Tag is relevant for further processing. It should be used to allow administrative intervention.
-
slug
¶ The slug of the Tag. It can be used in any URL referencing this particular Tag.
-
touched
¶ Keep track of when this Tag was last used.
-
exception
-
class
feeds.models.
TaggedPost
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Holds the relationship between a tag and the item being tagged.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
exception
-
class
feeds.models.
WebSite
(id, name, scheme, netloc, path, params, query, fragment, slug, commercial)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
commercial
¶ Indicate, whether this is a commercial site.
-
feedcount
()¶ return count of all feeds for this :WebSite:.
-
get_absolute_url
()¶ Absolute URL for this object.
Todo
should use ‘slug’ instead of ‘id’
-
name
¶ Name of the website.
-
objects
= <feeds.managers.website.WebSiteManager object>¶ Overwrite the inherited manager with the custom
feeds.models.WebSiteManager
-
save
(*args, **kwargs)¶ Since ‘slug’ is not a required field for userinput, set it before saving.
-
slug
¶ Human readble URL component
-
exception
feeds.tasks
– feed tasks¶
feeds.tasks
contains all the functions that will be called asynchronously using celeryd. This appoach is necessary to allow feeds
to scale.
feeds.tasks
¶
Async tasks, run via celery, updated to work with celery3.
This module takes care of everything that is not client/customer facing.
feeds.forms
– feed forms¶
feeds.forms
relies heavily on crispy_forms
-
class
feeds.forms.
CategoryAdminForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
-
class
feeds.forms.
CategoryCreateForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
feeds.forms.
CategoryUpdateForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Django Form to modify an angryplanet-category
..author: Andreas Neumeier
-
class
feeds.forms.
FeedAddForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
feeds.forms.
FeedAdminForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
-
class
feeds.forms.
FeedCreateForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Django Form to create an angryplanet-feed
-
class
feeds.forms.
FeedUpdateForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Django Form to modify an angryplanet-feed
-
class
feeds.forms.
OPMLForm
(*args, **kwargs)¶ Bases:
django.forms.forms.Form
Form that shall allow upload of OPML Files.
-
class
feeds.forms.
OptionsForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
-
class
feeds.forms.
TagCreateForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Bases:
django.forms.models.ModelForm
-
class
feeds.forms.
WebSiteCreateForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Form to create a new Site
-
save
(commit=True)¶ Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.
-
-
class
feeds.forms.
WebSiteFeedAddForm
(*args, **kwargs)¶ Bases:
django.forms.forms.Form
-
class
feeds.forms.
WebSiteUpdateForm
(*args, **kwargs)¶ Bases:
django.forms.models.ModelForm
Form to update an existing Site
feeds.mixins
– feed mixins¶
feeds.mixins
provides Mixins to control access to views
-
class
feeds.mixins.
FeedsLevelOneMixin
¶
-
class
feeds.mixins.
FeedsLevelTwoMixin
¶ Bases:
feeds.mixins.FeedsLevelOneMixin
,django.contrib.auth.mixins.PermissionRequiredMixin
-
class
feeds.mixins.
PaginateListMixin
¶ Bases:
object
Extends the generic ListView for features with a smarter pagination.
-
class
feeds.mixins.
UserAgentRequiredMixin
¶ Bases:
django.contrib.auth.mixins.UserPassesTestMixin
-
test_func
(user)¶ check for useragent
-
feeds.tests
¶
feeds.tests
is the module to test feeds.
Todos¶
Todo
should use ‘slug’ instead of ‘id’
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/models/feed.py:docstring of feeds.models.Feed.get_absolute_url, line 3.)
Todo
implement this depending on :py:feeds.models.rating
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/models/post.py:docstring of feeds.models.Post.score, line 1.)
Todo
should use ‘slug’ instead of ‘id’
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/models/website.py:docstring of feeds.models.WebSite.get_absolute_url, line 3.)
Todo
This is a bit of magic, that should rather not happen. It strips http:// https:// and www, if present.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/models/website.py:docstring of feeds.models.WebSite.save, line 4.)
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.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/views/views.py:docstring of feeds.views.OptionsView, line 9.)
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.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/views/views.py:docstring of feeds.views.OPMLView, line 3.)
Todo
The view for Feed Details shall include stats for the particular Feed. It is a plain Class Based View right now.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/views/views.py:docstring of feeds.views.FeedDetailView, line 3.)
Todo
Is this redundant?
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/views/views.py:docstring of feeds.views.PostListView.get_queryset, line 10.)
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.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/feeds/checkouts/latest/feeds/views/views.py:docstring of feeds.views.PostSubscriptionView, line 3.)