GithubHelp home page GithubHelp logo

django-wagtail-feeds's Introduction

Django Wagtail Feeds

https://travis-ci.org/chrisdev/django-wagtail-feeds.svg?branch=master

Support RSS Feeds, JSON Feed, Facebook Instant Articles and Apple News. Syndication feeds come in two flavors:

  • BasicFeed - A standard RSS V 2.0.1 feed designed to be used without item enclosures.
  • ExtendedFeed - An RSS V2/Atom Feed with support for item enclosures such as images or video. Use this if when want to integrate your feed with services like MailChimp or Flipboard.

JSON feed come in two flavors:

  • BasicJsonFeed - A standard JSON feed designed to be used without content html.
  • ExtendedJsonFeed - A JSON feed with support for content html in items.

Getting Started

The latest release (0.1.0) breaks backward compatibility with previous versions of Wagtail which were baseed Django 1.x. Use 0.0.8 for projects based on older versions of Wagtail

To use Django Wagtail Feeds in a project:

pip install django-wagtail-feeds

Remember to add wagtail_feeds to installed apps in settings file.

django-wagtail-feeds has a dependency on wagtail settings app. You must add wagtail.contrib.settings to your INSTALLED_APPS:

INSTALLED_APPS += [
    'wagtail.contrib.settings',
    'wagtail_feeds',
]

Run migrations for Wagtail feeds:

./manage.py migrate wagtail_feeds

Add Feed settings in the Wagtail admin

Wagtail admin
Feed Settings

Finally reference it in the url.py

from wagtail_feeds.feeds import BasicFeed, BasicJsonFeed, ExtendedFeed, ExtendedJsonFeed

url(r'^blog/feed/basic$', BasicFeed(), name='basic_feed'),
url(r'^blog/feed/extended$', ExtendedFeed(), name='extended_feed'),

# JSON feed
url(r'^blog/feed/basic.json$', BasicJsonFeed(), name='basic_json_feed'),
url(r'^blog/feed/extended.json$', ExtendedJsonFeed(), name='extended_json_feed'),

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

django-wagtail-feeds's People

Contributors

chrisdev avatar lendlsmith avatar moskrc avatar mtn avatar parbhat avatar salahaddin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

django-wagtail-feeds's Issues

Suport multiple apps syndication

  • Python 3.6.4.
  • Django 2.0.1.
  • Wagtail 2.0b1.
  • Chrome 64.

Currently we only can use a single app for syndication, but users can to want create syndication feeds for multiple apps: news, blogs, etc., for example.

What's about this?

Wagtail 2.0 support

Django: 2.0.2
Wagtail: 2.0

I installed the app, using the: pip install django-wagtail-feeds command, but the library breaks with the wagtail 2.0 versions. Do you think it is possible to add support for wagtail 2.0 ? I forked the project, to read the code, but I lack knowledge about wagtail, RSS and a lot of Python development skills. So, I’d take any advice.

Problems with README.rst

Description

  • Admin Screen shots on README.rst are broken. This is from PyPI:

screenshot 2016-07-13 15 08 20

  • Badges are broken! Why are we showing PyPI and Read the Docs

Streamfield support

  • Python 3.6.4.
  • Django 2.0.1.
  • Wagtail 2.0b1.
  • Chrome 64.

I think many users implements StreamField for the body content. I'm not sure about if this package support StreamFields but it could be a good idea.

u'wagtailsettings' is not a registered namespace

Description

This was raised by [email protected] via email. He's getting this error when trying to navigate to admin.

What I Did

u'wagtailsettings' is not a registered namespace
Request Method: GET Request URL: http://au-pepper.local:8000/admin/ Django Version: 1.10.4 Exception Type: NoReverseMatch Exception Value:
u'wagtailsettings' is not a registered namespace
Exception Location: /home/alex/.local/lib/python2.7/site-packages/django/urls/base.py in reverse, line 87 Python Executable: /usr/bin/python Python Version: 2.7.12 Python Path:
['/home/alex/code/wagtail/site1',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/home/alex/.local/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages']

ImportError: cannot import name 'BasicJsonFeed'

  • Django Wagtail Feeds version: 0.0.6 and 0.0.7
  • Python version: 3.4.2
    *Mint 17

Description

when run manage.py migrate wagtail_feeds

ImportError: cannot import name 'BasicJsonFeed' occured.

What I Did

I tried two different versions of django-wagtail-feeds 0.0.6  and 0.0.7
but still the same error 

Packaging Issues

Change setup.py

  • Change the app name to match dango-wagtail-feeds
  • Exclude Django 1.10b form install_requires and test_requires
  • Version number!

Assumes that content_field is a RichText field

It seems that we're assuming that the content field is a RichText field. So for example, in the case of the default cookiecutter project the following line fails:

content = expand_db_html(getattr(item, self.item_content_field))

because the self.item_content_field is a StreamField

Feeds generate n+1 queries for related image content

  • Django Wagtail Feeds version: 0.1.0
  • Python version: 3.6.5
  • Operating System: Mac OSX 10.14

Description

Extended feeds executen+1 queries to gather image content from StreamFields.

What I Did

Here's a traced transaction from our APM tool:

Screen_Shot_2019-04-08_at_3_34_19_PM

I'm not sure what tools Wagtail provides for prefetching associated images from RichTextBlocks in StreamFields, but for large feeds this can generate 100s or 1000s of database queries to render a single feed.

Happy to spend some time on this and see if I can find a fix, but wanted to make sure I wasn't missing some easily configurable thing like subclassing the feed object overriding a queryset or something.

Missing pypi release 0.0.7?

Pypi indicates a release of version 0.0.7 from only a few days ago, but this repository doesn't indicate any such release.

Is the Github out of date, or is there a problem with the pypi listing?

Tests are failing due problems with requirements

@Parbhat at first glance

  • Tox/Travis only pass because we've pined Django 1.9 so we're not testing if it works on Wagtail 1.10 and Django 1.11.1
  • Also were still pinning html5lib-0.999999999

Ok so we need to update

  • tox.ini
  • requriements-dev.txt and requirements-test-.txt
  • setup.py

Should we support JSON feeds here!

JSON Feed, is format similar to RSS and Atom but in JSON. It's getting super popular so should we support it here. Here's the spec and this is an example of a feed
{ "version": "https://jsonfeed.org/version/1", "user_comment": "This is a microblog feed. You can add this to your feed reader using the following URL: https://example.org/feed.json", "title": "Brent Simmons’s Microblog", "home_page_url": "https://example.org/", "feed_url": "https://example.org/feed.json", "author": { "name": "Brent Simmons", "url": "http://example.org/", "avatar": "https://example.org/avatar.png" }, "items": [ { "id": "2347259", "url": "https://example.org/2347259", "content_text": "Cats are neat. \n\nhttps://example.org/cats", "date_published": "2016-02-09T14:22:00-07:00" } ] }

Feed Model is None

  • Django Wagtail Feeds version: 0.0.8
  • Python version: 3.6.1
  • Operating System: Arch Linux

Description

Seems like feed_model cannot pickup model name from database where it define in admin settings. Not sure what I did wrong. Please advice.

'NoneType' object has no attribute 'objects'.

On line 137. of feeds.py
return feed_model.objects.order_by('-date').live()

What I Did

I have defined the model name in Admin. exactly as my model className.

Tidy the Feed output

Here are some things we can do

  • Remove the ugly padding-bottom from the embeds which occurs when RichText is renderderd as HTML. This is an example
<div class="responsive-object" style="padding-bottom: 56.25%;">
<iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/Kv80hAlOObY?feature=oembed" width="480">
</iframe>
  • We always add the feed_image to the RSS enclosure (add_item_elements) This should be optional. Add a boolean field in RSSFeedsSettings to toggle this on off

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.