twoscoops / two-scoops-of-django-1.11

The issue tracker, changelog, and code repository for Two Scoops of Django 1.11
https://www.twoscoopspress.com/products/two-scoops-of-django-1-11
408 stars 68 forks source link

FavouriteMixin in 10.4.4 doesn't inherit from object #64

Closed benjiboi214 closed 7 years ago

benjiboi214 commented 7 years ago

Location within the Book

Description

I may be wrong but to get this working in my project (django1.10) these mixins needed to inherit from object.

class FavoriteMixin:

should be

class FavoriteMixin(object):
pydanny commented 7 years ago

With all due respect, while the book supports Python 2.7, we focus more on Python 3 (and Django 1.11). The reason being is that within a year the current version of Django will not support Python 2.7. Hence our focus moving forward.

We're changing the text in the introduction to reflect this fact:

This book should work well with the Django 1.11 series, less so with Django 1.10, and so on. Even though we make no promises about functional compatibility, at least the general approaches from most of this book stand up over every post-1.0 version of Django.

As for the Python version, this book is tested on Python 3.6. Most code examples should work on Python 2.7.12, but there are exceptions that will have to be worked through.

benjiboi214 commented 7 years ago

No worries Danny. I figured it would be something I had missed, just throwing my two cents in in case it had been overlooked!

Keep up the good work!