How to do it...

We will augment the Bulletin model and add an RSS feed to it. We will be able to filter the RSS feed by type or category so that it is possible to only subscribe to the bulletins that are, for example, offering used books:

  1. In the file of this app, add the Category model, like so:
# bulletin_board/ ...class Category(models.Model):    class Meta:        verbose_name = _("Category")        verbose_name_plural = _("Categories")    title = models.CharField(_("Title"), max_length=200)    def __str__(self):        return self.title
  1. We'll then augment the Bulletin model to add a foreign key relationship with Category, and to apply the UrlMixin we created in the Creating a model mixin with URL-related methods recipe in Chapter 2, Database ...

Get Django 2 Web Development Cookbook - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.