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.
23 lines
516 B
23 lines
516 B
import datetime
|
|
from hvad.models import TranslationManager
|
|
|
|
|
|
|
|
class ClientManager(TranslationManager):
|
|
def get_query_set(self):
|
|
now = datetime.datetime.now().date()
|
|
return super(ClientManager, self).get_query_set().filter(is_published=True, data_begin__gte=now).order_by('data_begin')
|
|
|
|
|
|
"""
|
|
|
|
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())
|
|
|
|
|
|
|
|
"""
|
|
|