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

  
setup.py
16 16
            'south >= 0.7',
17 17
            'django-reversion >= 1.6.2',
18 18
            'python-dateutil >= 2.0',
19
            'django-model-utils < 1.2.0',
19 20
        ],
20 21
        dependency_links = [
21 22
            'http://django-swingtime.googlecode.com/files/django-swingtime-0.2.1.tar.gz#egg=django-swingtime-0.2.1',

Also available in: Unified diff