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:
- In the models.py file of this app, add the Category model, like so:
# bulletin_board/models.py# ...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
- 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 ...