split models into apps, new api interface
This commit is contained in:
parent
f833109c02
commit
b8e5764f3d
32 changed files with 2033 additions and 488 deletions
19
pandora/date/managers.py
Normal file
19
pandora/date/managers.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
import re
|
||||
|
||||
from ox.utils import json
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from django.db.models import Q, Manager
|
||||
|
||||
import models
|
||||
|
||||
class DateManager(Manager):
|
||||
def get_query_set(self):
|
||||
return super(DateManager, 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