Project

General

Profile

« Previous | Next » 

Revision 0e67026e

Added by Benjamin Dauvergne over 12 years ago

makes EventManager inherit from django-model-utils InheritanceManager

django-model-utils must be installed with

  1. pip install 'django-model-utils<1.2.0'

It adds the new method select_subclasses(), to use like:

Event.objects.select_subclasses('event_act')

View differences:

calebasse/agenda/managers.py
3 3
from dateutil import rrule
4 4

  
5 5
from django.db import models
6
from model_utils.managers import InheritanceManager
6 7

  
7 8
from calebasse.agenda.conf import default
8 9
from calebasse.exceptions import CalebasseException
......
13 14
    'OccurrenceManager',
14 15
)
15 16

  
16
class EventManager(models.Manager):
17
class EventManager(InheritanceManager):
17 18
    """ This class allows you to manage events, appointment, ...
18 19
    """
19 20

  

Also available in: Unified diff