Thanx Jeff!

it works now ;)

Oto

On 15 apr., 15:25, Jeff FW <[email protected]> wrote:
> It looks like you're missing (or at least, didn't mention) the
> templates. In documentation:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/syndication/#ref-con...
>
> make sure to read the paragraph starting with "One thing's left to do"
> under "A simple example".
>
> -Jeff
>
> On Apr 15, 8:30 am, Oto Brglez <[email protected]> wrote:
>
> > Hi all you Django users and developers!
>
> > I have a question aboutRSSframework in Django. I want basicRSS.
> > Nothing custom nothing advanced. JustRSSfrom my model for last 10
> > imports in model. This is what i got:
>
> > ##### Model:
>
> > class Koda(models.Model):
> >         naslov = models.CharField(max_length=50)
> >         slug = models.SlugField(max_length=255,blank=True,null=True)
> >         koda = models.TextField()
> >         dodano = models.DateTimeField(default=datetime.datetime.now ,
> > blank=True)
> >         avtor = models.ForeignKey(User)
>
> >         @permalink
> >         def get_absolute_url(self):
> >                 return ('koda_view', [self.slug])
>
> >         def __unicode__(self):
> >                 return self.jezik.ime + ' / '+ self.naslov
>
> > #####  RSSModel:
>
> > class SvezaKoda(Feed):
> >         title = "Rsstitle..."
> >         link = "/rss/"
> >         description = "Description..."
>
> >         def items(self):
> >                 return Koda.objects.order_by('-dodano')[:10]
>
> >         def item_link(self,item):
> >                 return '/'+ item.jezik.slug + '/' + item.slug
>
> >         def item_author_name(self,item):
> >                 return item.avtor
>
> >         def item_pubdate(self,item):
> >                 return item.dodano
>
> > ##### URLs:
>
> > feeds = {
> >     'koda': SvezaKoda,
>
> > }
>
> > urlpatterns = patterns('',
> >         (r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed',
> > {'feed_dict': feeds}),
> > ...
>
> > ---------------
>
> > Now. This works. But in content field i don't get content that i want.
> > I want the field "koda" to be shown insideRSScontent field. Insted
> > of the content insiderssitem i get value of __unicode__
>
> > Can someone please help me.
>
> > Oto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to