events
This commit is contained in:
parent
4b9ea3731a
commit
093e1b86f3
8 changed files with 81 additions and 67 deletions
15
pandora/event/managers.py
Normal file
15
pandora/event/managers.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
|
||||
from django.db.models import Q, Manager
|
||||
|
||||
|
||||
class EventManager(Manager):
|
||||
|
||||
def get_query_set(self):
|
||||
return super(EventManager, self).get_query_set()
|
||||
|
||||
def find(self, q=''):
|
||||
qs = self.get_query_set()
|
||||
qs = qs.filter(Q(name_find__icontains=q))
|
||||
return qs
|
||||
Loading…
Add table
Add a link
Reference in a new issue