You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
566 B
25 lines
566 B
import datetime
|
|
from hvad.models import TranslationManager
|
|
|
|
|
|
|
|
class ClientManager(TranslationManager):
|
|
def get_query_set(self):
|
|
return self.language().select_related('country', 'city', 'place').filter(is_published=True).order_by('data_begin')
|
|
|
|
def upcoming(self):
|
|
return self.filter(data_begin__gte=datetime.datetime.now().date())
|
|
|
|
|
|
"""
|
|
|
|
from exposition.models import Exposition
|
|
from django.db import connection
|
|
from django.utils import translation
|
|
translation.activate('en')
|
|
len(connection.queries)
|
|
e = list(Exposition.enable.list())
|
|
|
|
|
|
|
|
"""
|
|
|