How to migrate from function-based generic views to class-based analogs in Django

Last week I’ve migrated a Django application from version 1.04 to 1.6.Among the many methods deprecated, starting from version 1.5 all generic views based on functions have been eliminated (they were already deprecated in the previous release (https://docs.djangoproject.com/en/1.4/topics/generic-views-migration/)In my application, the generic view was used in the views.py file in this way:123456789101112131415161718@cache_page(...

Read more

How to create a custom feed in Django using the Syndication Feed Framework

Hello everyone.In this article I will show you how to create a custom feed in Django, using the Django Syndication Feed Framework 1.2 or higher.I’ve had to create an XML with some more tags for each item in the feed. In particular, in addition to the usual tags present in an RSS feed, I’ve added the <short_description/> and <image/> tags.Reading the official documentation of the framework, it is recommended to create a custom feed generator,...

Read more