Coder Social home page Coder Social logo

idlesign / django-yaturbo Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 1.0 55 KB

Reusable Django app to enable Yandex Turbo Pages for your site

Home Page: https://github.com/idlesign/django-yaturbo

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
django yandex yandex-turbo yandex-turbo-pages syndication rss python python2 python3

django-yaturbo's Introduction

django-yaturbo

https://github.com/idlesign/django-yaturbo

release lic coverage

Description

Reusable Django app to enable Yandex Turbo Pages for your site

This app allows you to define Yandex Turbo pages feeds in term similar to those of Django Syndication Feed Framework contrib:

  1. Inherit your feed class from YandexTurboFeed:
# feeds.py
from yaturbo import YandexTurboFeed

class TurboFeed(YandexTurboFeed):
    """
    More information on Django Syndication Feed Framework configuration:
    https://docs.djangoproject.com/en/2.0/ref/contrib/syndication/
    """
  1. Pass an instantiated (and optionally configured) feed object to urlpatterns:
# urls.py
from .feeds import TurboFeed

urlpatterns = [
    ...
    path('feeds/turbo/', TurboFeed()),
    ...
]

Read the docs for further information.

Documentation

http://django-yaturbo.readthedocs.org/

django-yaturbo's People

Contributors

idlesign avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

raagin

django-yaturbo's Issues

'NoneType' object has no attribute 'startswith'

In the 'item_turbo' method i return the 'disambiguatingDescription' attribute that contains content with html.

def item_turbo(self, item):
    return item.disambiguatingDescription

And i get error in feed.py

AttributeError at /feeds/turbo
'NoneType' object has no attribute 'startswith'

What should i actually return in this method to get sanitized content at the '/feeds/turbo' url. Rendered template?

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.