Mercurial > public > sg101
comparison weblinks/models.py @ 740:3e1905e523be
Django 1.6: get_query_set -> get_queryset, etc.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 29 Dec 2013 12:57:03 -0600 |
parents | 6e6492468bb8 |
children | eeaf387803c6 |
comparison
equal
deleted
inserted
replaced
739:fb2877dd6182 | 740:3e1905e523be |
---|---|
22 ordering = ('title', ) | 22 ordering = ('title', ) |
23 | 23 |
24 | 24 |
25 class PublicLinkManager(models.Manager): | 25 class PublicLinkManager(models.Manager): |
26 """The manager for all public links.""" | 26 """The manager for all public links.""" |
27 def get_query_set(self): | 27 def get_queryset(self): |
28 return super(PublicLinkManager, self).get_query_set().filter( | 28 return super(PublicLinkManager, self).get_queryset().filter( |
29 is_public=True).select_related() | 29 is_public=True).select_related() |
30 | 30 |
31 | 31 |
32 class LinkBase(models.Model): | 32 class LinkBase(models.Model): |
33 """Abstract model to aggregate common fields of a web link.""" | 33 """Abstract model to aggregate common fields of a web link.""" |