2010-11-26 15:07:24 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vi:si:et:sw=4:sts=4:ts=4
|
|
|
|
|
|
|
|
from django.db.models import Q, Manager
|
2011-01-01 11:44:42 +00:00
|
|
|
|
2010-11-26 15:07:24 +00:00
|
|
|
|
2011-05-28 11:35:57 +00:00
|
|
|
class EventManager(Manager):
|
2011-01-01 11:44:42 +00:00
|
|
|
|
2010-11-26 15:07:24 +00:00
|
|
|
def get_query_set(self):
|
2011-05-28 11:35:57 +00:00
|
|
|
return super(EventManager, self).get_query_set()
|
2010-11-26 15:07:24 +00:00
|
|
|
|
|
|
|
def find(self, q=''):
|
|
|
|
qs = self.get_query_set()
|
|
|
|
qs = qs.filter(Q(name_find__icontains=q))
|
|
|
|
return qs
|