AlphacrucisCollege / django-template-utils

Fork of (abandoned?) package used in ac.edu.au. Exported via GoogleCodeExport.
https://bitbucket.org/ubernostrum/django-template-utils
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Passing arguments to include_feed does not work #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If I try this (nb is an integer in my model) :

{% include_feed "http://feeds.feedburner.com/UnELectronLibre" object.nb 
feeds_include/feed_blog.html %}

Caught an exception while rendering: invalid literal for int() with base 10: 
'object.nb'

If I try this (tpl is a charfield in my model) :

{% include_feed "http://feeds.feedburner.com/UnELectronLibre" object.tpl %}

object.tpl is not resolved and then template is not found

The only variable that is resolved is in the following case (with or without 
numbers - syndication 
is where I store the url of the site) :

{% include_feed object.syndication 5 feeds_include/feed_blog.html %}

What I would like is to use 

{% include_feed object.syndication object.nb object.tpl %}

with : 

class Feed(models.Model):
    title = models.CharField('Title', max_length=50)
    website = models.URLField('Website',)
    syndication = models.URLField('Feed url',)
    tpl = models.CharField('Template to use', max_length=50)
    nb = models.IntegerField('Number of item to display', default=10)

Is it feasible ?

Thanks in advance,
Nicolas

Original issue reported on code.google.com by nsteinm...@gmail.com on 13 Mar 2009 at 11:46