remotes/origin/1203
Nazar Kotjuk 10 years ago
commit 28e423648d
  1. 14
      accounts/forms.py
  2. 12
      article/managers.py
  3. 5
      company/urls.py
  4. 39
      company/views.py
  5. 65
      core/views.py
  6. 14
      country/manager.py
  7. 16
      country/models.py
  8. 3
      exposition/models.py
  9. 32
      exposition/views.py
  10. 4
      functions/model_mixin.py
  11. 41
      functions/models_methods.py
  12. 117
      functions/search_forms.py
  13. 16
      meta/models.py
  14. 28
      proj/settings.py
  15. 11
      proj/urls.py
  16. 2
      proj/views.py
  17. 24
      service/models.py
  18. 55
      settings/management/commands/update_views_cache.py
  19. 2
      settings/templatetags/template_filters.py
  20. 2
      static/custom_js/main.js
  21. BIN
      static/debug_toolbar/.DS_Store
  22. 649
      static/debug_toolbar/css/toolbar.css
  23. BIN
      static/debug_toolbar/img/ajax-loader.gif
  24. BIN
      static/debug_toolbar/img/back.png
  25. BIN
      static/debug_toolbar/img/back_hover.png
  26. BIN
      static/debug_toolbar/img/close.png
  27. BIN
      static/debug_toolbar/img/close_hover.png
  28. BIN
      static/debug_toolbar/img/djdt_vertical.png
  29. BIN
      static/debug_toolbar/img/indicator.png
  30. 284
      static/debug_toolbar/js/toolbar.js
  31. 20
      static/debug_toolbar/js/toolbar.profiling.js
  32. 7
      static/debug_toolbar/js/toolbar.sql.js
  33. 11
      static/debug_toolbar/js/toolbar.template.js
  34. 48
      static/debug_toolbar/js/toolbar.timer.js
  35. 2
      templates/client/includes/exposition/default_description.html
  36. 2
      templates/client/includes/exposition/expo_paid.html
  37. 6
      templates/client/includes/exposition/exposition_object.html
  38. 2
      templates/client/includes/index/main_events.html
  39. 70
      templates/debug_toolbar/base.html
  40. 69
      templates/debug_toolbar/panels/cache.html
  41. 60
      templates/debug_toolbar/panels/headers.html
  42. 28
      templates/debug_toolbar/panels/logging.html
  43. 37
      templates/debug_toolbar/panels/profiling.html
  44. 124
      templates/debug_toolbar/panels/request.html
  45. 17
      templates/debug_toolbar/panels/settings.html
  46. 19
      templates/debug_toolbar/panels/signals.html
  47. 95
      templates/debug_toolbar/panels/sql.html
  48. 37
      templates/debug_toolbar/panels/sql_explain.html
  49. 44
      templates/debug_toolbar/panels/sql_profile.html
  50. 41
      templates/debug_toolbar/panels/sql_select.html
  51. 57
      templates/debug_toolbar/panels/staticfiles.html
  52. 14
      templates/debug_toolbar/panels/template_source.html
  53. 46
      templates/debug_toolbar/panels/templates.html
  54. 44
      templates/debug_toolbar/panels/timer.html
  55. 17
      templates/debug_toolbar/panels/versions.html
  56. 16
      templates/debug_toolbar/redirect.html
  57. 19
      theme/manager.py
  58. 1
      theme/models.py

@ -63,19 +63,9 @@ class UserCreationForm(forms.ModelForm):
return user return user
class UserChangeForm(forms.ModelForm):
password = ReadOnlyPasswordHashField()
class Meta:
model = User
def clean_password(self):
return self.initial['password']
class UserForm(forms.ModelForm): class UserForm(forms.ModelForm):
# email = forms.EmailField(widget=forms.TextInput(attrs={'disabled' : True}), required=False) # email = forms.EmailField(widget=forms.TextInput(attrs={'disabled' : True}), required=False)
country = forms.ChoiceField(label='Страна', choices=[(item.id, item.name) for item in Country.objects.all()], country = forms.ChoiceField(label='Страна', choices=[(item.id, item.name) for item in Country.objects.language().all()],
required=False) required=False)
city = forms.CharField(label='Город', widget=forms.HiddenInput(), required=False) city = forms.CharField(label='Город', widget=forms.HiddenInput(), required=False)
company = forms.ChoiceField(label='Компания', company = forms.ChoiceField(label='Компания',
@ -319,7 +309,7 @@ class UserFilterForm(forms.Form):
class FeedFilterForm(forms.Form): class FeedFilterForm(forms.Form):
data_with_parents = None data_with_parents = None
filter = None filter = None
th = forms.MultipleChoiceField(label=_(u'Тематика'), choices=[(item.id, item.name) for item in Theme.active.all()], th = forms.MultipleChoiceField(label=_(u'Тематика'), choices=[(item.id, item.name) for item in Theme.active.expo_themes()],
required=False, widget=forms.CheckboxSelectMultiple()) required=False, widget=forms.CheckboxSelectMultiple())
tg = forms.CharField(label=_(u'Теги'), required=False, widget=forms.CheckboxSelectMultiple()) tg = forms.CharField(label=_(u'Теги'), required=False, widget=forms.CheckboxSelectMultiple())
area = forms.MultipleChoiceField(label=_(u'Регион'), area = forms.MultipleChoiceField(label=_(u'Регион'),

@ -4,7 +4,7 @@ from hvad.models import TranslatableModel, TranslatedFields, TranslationManager
class ArticleManager(TranslationManager): class ArticleManager(TranslationManager):
cache_time = 60 cache_time = 45
def safe_get(self, **kwargs): def safe_get(self, **kwargs):
model = self.model model = self.model
try: try:
@ -29,8 +29,8 @@ class ArticleManager(TranslationManager):
def main_page_news(self): def main_page_news(self):
lang = translation.get_language() lang = translation.get_language()
key = 'main_page_news_%s'%lang key = 'main_page_news_%s'%lang
cached_news = cache.get(key) if key in cache:
if cached_news: cached_news = cache.get(key)
return cached_news return cached_news
else: else:
news = list(self.news().filter(publish_date__isnull=False).order_by('-main_page', '-publish_date', '-modified')[:3]) news = list(self.news().filter(publish_date__isnull=False).order_by('-main_page', '-publish_date', '-modified')[:3])
@ -40,10 +40,10 @@ class ArticleManager(TranslationManager):
def main_page_blogs(self): def main_page_blogs(self):
lang = translation.get_language() lang = translation.get_language()
key = 'main_page_blogs_%s'%lang key = 'main_page_blogs_%s'%lang
cached_blogs = cache.get(key) if key in cache:
if cached_blogs: cached_blogs = cache.get(key)
return cached_blogs return cached_blogs
else: else:
blogs = list(self.blogs().filter(publish_date__isnull=False).order_by('-main_page', '-publish_date')[:3]) blogs = list(self.blogs().filter(publish_date__isnull=False).order_by('-main_page', '-publish_date')[:3])
cache.set(key, blogs, self.cache_time) cache.set(key, blogs, self.cache_time)
return blogs return blogs

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url from django.conf.urls import patterns, url
from views import CompanySearchView, MemberDetail, MemberList, MemberTagList, MemberThemeList from views import MemberDetail, MemberList, MemberTagList, MemberThemeList
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
from edit_views import * from edit_views import *
@ -8,8 +8,7 @@ from edit_views import *
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'company/create-company/$', 'company.views.create_company'), url(r'company/create-company/$', 'company.views.create_company'),
url(r'company/get-company/$', 'company.views.get_company'), url(r'company/get-company/$', 'company.views.get_company'),
#
url(r'members/search/$', CompanySearchView.as_view()),
#url(r'members/(?P<params>.*)/(?P<page>\d+)/$', CompanyView.as_view()), #url(r'members/(?P<params>.*)/(?P<page>\d+)/$', CompanyView.as_view()),
#url(r'members/(?P<page>\d+)/$', CompanyView.as_view()), #url(r'members/(?P<page>\d+)/$', CompanyView.as_view()),
#url(r'members/(?P<params>.*)/$', CompanyView.as_view()), #url(r'members/(?P<params>.*)/$', CompanyView.as_view()),

@ -6,12 +6,9 @@ from django.views.generic import DetailView
from functions.custom_views import ListView from functions.custom_views import ListView
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext as _, get_language from django.utils.translation import ugettext as _, get_language
from haystack.query import EmptySearchQuerySet
from models import Company from models import Company
from theme.models import Theme, Tag from theme.models import Theme, Tag
from forms import CreateCompanyForm from forms import CreateCompanyForm
from functions.custom_views import ExpoListView
from functions.search_forms import CompanySearchForm
from .edit_forms import NameForm as CompNameForm, HomeForm as CompHomeForm, PhoneForm as CompPhoneForm,\ from .edit_forms import NameForm as CompNameForm, HomeForm as CompHomeForm, PhoneForm as CompPhoneForm,\
EmailForm as CompEmailForm, WebPageForm as CompWebPageForm, SocialForm as CompSocialForm,\ EmailForm as CompEmailForm, WebPageForm as CompWebPageForm, SocialForm as CompSocialForm,\
TagForm as CompTagForm, DescriptionForm as CompDescr, StaffForm as CompStaff, \ TagForm as CompTagForm, DescriptionForm as CompDescr, StaffForm as CompStaff, \
@ -20,44 +17,10 @@ from .edit_forms import NameForm as CompNameForm, HomeForm as CompHomeForm, Phon
from meta.views import MetadataMixin from meta.views import MetadataMixin
class CompanySearchView(ListView):
paginate_by = 10
template_name = 'client/company/search.html'
search_form = CompanySearchForm
model = Company
def get_queryset(self):
if self.request.GET:
form = self.search_form(self.request.GET)
if form.is_valid():
return form.search()
else:
return EmptySearchQuerySet()
else:
return EmptySearchQuerySet()
def get_context_data(self, **kwargs):
context = super(CompanySearchView, self).get_context_data(**kwargs)
context['search_form'] = CompanySearchForm(self.request.GET)
queries = self.request.GET.copy()
if queries.has_key('page'):
del queries['page']
context['queries'] = queries
context['search_action'] = '/members/search/'
context['type'] = 'members search'
return context
class MemberList(MetadataMixin, ListView): class MemberList(MetadataMixin, ListView):
model = Company model = Company
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/company/companies_list.html' template_name = 'client/company/companies_list.html'
search_form = CompanySearchForm
catalog_url = '/members/' catalog_url = '/members/'
def get_queryset(self): def get_queryset(self):
@ -67,7 +30,6 @@ class MemberThemeList(MetadataMixin, ListView):
model = Company model = Company
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/company/companies_list.html' template_name = 'client/company/companies_list.html'
search_form = CompanySearchForm
catalog_url = '/members/' catalog_url = '/members/'
def get_queryset(self): def get_queryset(self):
@ -83,7 +45,6 @@ class MemberTagList(MetadataMixin, ListView):
model = Company model = Company
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/company/companies_list.html' template_name = 'client/company/companies_list.html'
search_form = CompanySearchForm
catalog_url = '/members/' catalog_url = '/members/'
def get_queryset(self): def get_queryset(self):

@ -10,77 +10,12 @@ from functions.views_help import split_params
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
#from forms import PlaceSearchForm
from functions.search_forms import PlaceSearchForm
from functions.search_forms import EventSearchForm
from haystack.query import EmptySearchQuerySet
class EventSearchView(ListView):
paginate_by = 10
template_name = 'exposition/search.html'
search_form = EventSearchForm
def get_queryset(self):
if self.request.GET:
form = self.search_form(self.request.GET)
if form.is_valid():
return form.search()
else:
return EmptySearchQuerySet()
else:
return EmptySearchQuerySet()
def get_context_data(self, **kwargs):
context = super(EventSearchView, self).get_context_data(**kwargs)
context['search_form'] = EventSearchForm(self.request.GET)
queries = self.request.GET.copy()
if queries.has_key('page'):
del queries['page']
context['queries'] = queries
context['search_action'] = '/events/search/'
return context
class PlaceSearchView(ListView):
paginate_by = 10
template_name = 'place/search.html'
model = PlaceExposition
search_form = PlaceSearchForm
def get_queryset(self):
if self.request.GET:
form = self.search_form(self.request.GET)
if form.is_valid():
return form.search()
else:
return []
else:
return []
def get_context_data(self, **kwargs):
context = super(PlaceSearchView, self).get_context_data(**kwargs)
context['search_form'] = PlaceSearchForm(self.request.GET)
queries = self.request.GET.copy()
if queries.has_key('page'):
del queries['page']
context['queries'] = queries
context['search_action'] = '/places/search/'
context['type'] = 'places search'
return context
class PlaceListView(ListView): class PlaceListView(ListView):
paginate_by = 10 paginate_by = 10
params = None params = None
single_page = False single_page = False
template_name = 'place_catalog_test.html' template_name = 'place_catalog_test.html'
model = 'places' model = 'places'
search_form = PlaceSearchForm
order = 'data_begin' order = 'data_begin'
def get_params(self): def get_params(self):

@ -95,11 +95,19 @@ class CountryManager(TranslationManager):
class AreaManager(TranslationManager): class AreaManager(TranslationManager):
cache_time = 55
def all_sorted(self): def all_sorted(self):
""" """
return list, not queryset return list, not queryset
""" """
model = self.model lang = translation.get_language()
result = list(model.objects.filter()) key = 'country_area_all_%s' % lang
result.sort(key=lambda x: len(x.expos()), reverse=True) if key in cache:
result = cache.get(key)
else:
model = self.model
result = list(model.objects.language().filter())
#result.sort(key=lambda x: len(x.expos()), reverse=True)
cache.set(key, result, self.cache_time)
return result return result

@ -10,11 +10,6 @@ from bitfield import BitField
from manager import CountryManager, AreaManager from manager import CountryManager, AreaManager
from directories.models import Language, Currency from directories.models import Language, Currency
from city.models import City from city.models import City
from exposition.models import Exposition
from place_exposition.models import PlaceExposition
from conference.models import Conference
from seminar.models import Seminar
from webinar.models import Webinar
from functions.signal_handlers import post_save_handler, pre_save_handler from functions.signal_handlers import post_save_handler, pre_save_handler
@ -53,6 +48,7 @@ class Area(TranslatableModel):
""" """
return expos that occur in current area return expos that occur in current area
""" """
from exposition.models import Exposition
countries = self.countries() countries = self.countries()
return Exposition.objects.filter(country__in=countries) return Exposition.objects.filter(country__in=countries)
@ -135,26 +131,24 @@ class Country(TranslatableModel):
returns nearest expos in this country returns nearest expos in this country
""" """
now = date.today() now = date.today()
from exposition.models import Exposition
return Exposition.objects.filter(data_begin__gte=now, country=self).order_by('data_begin')[:3] return Exposition.objects.filter(data_begin__gte=now, country=self).order_by('data_begin')[:3]
def get_places(self): def get_places(self):
from place_exposition.models import PlaceExposition
return PlaceExposition.objects.filter(country=self)[:3] return PlaceExposition.objects.filter(country=self)[:3]
def get_permanent_url(self): def get_permanent_url(self):
return self.catalog+self.url return self.catalog+self.url
def expositions_number(self): def expositions_number(self):
from exposition.models import Exposition
return Exposition.objects.filter(country=self).count() return Exposition.objects.filter(country=self).count()
def conferences_number(self): def conferences_number(self):
from conference.models import Conference
return Conference.objects.filter(country=self).count() return Conference.objects.filter(country=self).count()
def seminars_number(self):
return Seminar.objects.filter(country=self).count()
def webinars_number(self):
return Webinar.objects.filter(country=self).count()
def active_cities(self): def active_cities(self):
result = list(set(City.used.active_qs().filter(country=self))) result = list(set(City.used.active_qs().filter(country=self)))
result.sort(key=lambda x: x.name) result.sort(key=lambda x: x.name)

@ -213,6 +213,9 @@ class Exposition(TranslatableModel, EventMixin, ExpoMixin):
def tags(self): def tags(self):
return self.tag.language().all() return self.tag.language().all()
def themes(self):
return self.theme.language().all()
def statistic_exists(self): def statistic_exists(self):
return Statistic.objects.filter(exposition=self).exists() return Statistic.objects.filter(exposition=self).exists()

@ -42,7 +42,7 @@ class ExpositionBy(JitterCacheMixin, MetadataMixin, ListView):
class ExpositionByCountry(ExpositionBy): class ExpositionByCountry(ExpositionBy):
cache_range = settings.CACHE_RANGE cache_range = [60*30, 60*60]
model = Country model = Country
title1 = _(u'По странам') title1 = _(u'По странам')
title2 = _(u'Выставки мира по странам') title2 = _(u'Выставки мира по странам')
@ -57,7 +57,7 @@ class ExpositionByCountry(ExpositionBy):
class ExpositionByTheme(ExpositionBy): class ExpositionByTheme(ExpositionBy):
cache_range = settings.CACHE_RANGE cache_range = [60*30, 60*60]
model = Theme model = Theme
title1 = _(u'По тематикам') title1 = _(u'По тематикам')
title2 = _(u'Выставки мира по тематикам') title2 = _(u'Выставки мира по тематикам')
@ -71,7 +71,7 @@ class ExpositionByTheme(ExpositionBy):
# .order_by('translations__name').distinct() # .order_by('translations__name').distinct()
class ExpositionByTag(ExpositionBy): class ExpositionByTag(ExpositionBy):
cache_range = settings.CACHE_RANGE cache_range = [60*30, 60*60]
model = Tag model = Tag
title1 = _(u'По тегам') title1 = _(u'По тегам')
title2 = _(u'Выставки мира по тегам') title2 = _(u'Выставки мира по тегам')
@ -83,7 +83,7 @@ class ExpositionByTag(ExpositionBy):
class ExpositionByCity(ExpositionBy): class ExpositionByCity(ExpositionBy):
cache_range = settings.CACHE_RANGE cache_range = [60*30, 60*60]
model = City model = City
title1 = _(u'По городам') title1 = _(u'По городам')
title2 = _(u'Выставки мира по городам') title2 = _(u'Выставки мира по городам')
@ -146,11 +146,12 @@ def exposition_visit(request, id):
class ExpoDetail(JitterCacheMixin, MetadataMixin, DetailView): class ExpoDetail(JitterCacheMixin, MetadataMixin, DetailView):
cache_range = settings.CACHE_RANGE cache_range = [60*30, 60*60]
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
template_name = 'client/exposition/exposition_detail.html' template_name = 'client/exposition/exposition_detail.html'
queryset = Exposition.objects.language().select_related('place', 'city', 'country', 'paid_new') queryset = Exposition.objects.language().select_related('place', 'city', 'country', 'paid_new').\
prefetch_related('theme', 'tag')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
context = super(ExpoDetail, self).get_context_data(**kwargs) context = super(ExpoDetail, self).get_context_data(**kwargs)
@ -163,7 +164,8 @@ class ExpoDetail(JitterCacheMixin, MetadataMixin, DetailView):
return context return context
class ExpositionProgramme(MetadataMixin, DetailView): class ExpositionProgramme(JitterCacheMixin, MetadataMixin, DetailView):
cache_range = [60*30, 60*60]
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
template_name = 'client/exposition/programm.html' template_name = 'client/exposition/programm.html'
@ -179,7 +181,8 @@ class ExpositionProgramme(MetadataMixin, DetailView):
return context return context
class ExpositionPrice(MetadataMixin, DetailView): class ExpositionPrice(JitterCacheMixin, MetadataMixin, DetailView):
cache_range = [60*30, 60*60]
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
template_name = 'client/exposition/price.html' template_name = 'client/exposition/price.html'
@ -195,7 +198,8 @@ class ExpositionPrice(MetadataMixin, DetailView):
return context return context
class ExpositionStatistic(MetadataMixin, DetailView): class ExpositionStatistic(JitterCacheMixin, MetadataMixin, DetailView):
cache_range = [60*30, 60*60]
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
template_name = 'client/exposition/statistic.html' template_name = 'client/exposition/statistic.html'
@ -211,7 +215,8 @@ class ExpositionStatistic(MetadataMixin, DetailView):
return context return context
class ExpositionThankView(MetadataMixin, DetailView): class ExpositionThankView(JitterCacheMixin, MetadataMixin, DetailView):
cache_range = [60*30, 60*60]
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
template_name = 'client/service/thank_u_page.html' template_name = 'client/service/thank_u_page.html'
@ -231,7 +236,8 @@ def visit_redirect(request, slug):
redirect = obj.get_permanent_url() + 'price/' redirect = obj.get_permanent_url() + 'price/'
return HttpResponsePermanentRedirect(redirect) return HttpResponsePermanentRedirect(redirect)
class ExpositionServiceView(MetadataMixin, FormMixin, DetailView): class ExpositionServiceView(JitterCacheMixin, MetadataMixin, FormMixin, DetailView):
cache_range = [60*30, 60*60]
model = Exposition model = Exposition
slug_field = 'url' slug_field = 'url'
service = None service = None
@ -301,7 +307,7 @@ class ExpositionServiceView(MetadataMixin, FormMixin, DetailView):
class ExpoList(MetadataMixin, JitterCacheMixin, ListView): class ExpoList(MetadataMixin, JitterCacheMixin, ListView):
cache_range = settings.CACHE_RANGE cache_range = [60*30, 60*60]
model = Exposition model = Exposition
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/exposition/exposition_list.html' template_name = 'client/exposition/exposition_list.html'
@ -337,7 +343,7 @@ class ExpoList(MetadataMixin, JitterCacheMixin, ListView):
class ExpoCatalog(MetadataMixin, ListView): class ExpoCatalog(JitterCacheMixin, MetadataMixin, ListView):
model = Exposition model = Exposition
paginate_by = settings.CLIENT_PAGINATION paginate_by = settings.CLIENT_PAGINATION
template_name = 'client/exposition/catalog.html' template_name = 'client/exposition/catalog.html'

@ -136,6 +136,10 @@ class EventMixin(object):
return gallery return gallery
def tags(self):
return self.tag.language().all()
def copy(self, url): def copy(self, url):
""" """
Copy event with new url Copy event with new url

@ -28,8 +28,9 @@ class ExpoManager(TranslationManager):
def expo_main(self): def expo_main(self):
lang = translation.get_language() lang = translation.get_language()
key = 'expo_main_page_key_%s'%lang key = 'expo_main_page_key_%s'%lang
result = cache.get(key) if key in cache:
if not result: result = cache.get(key)
else:
result = list(self.language(lang). result = list(self.language(lang).
select_related('country', 'city', 'place', 'main'). select_related('country', 'city', 'place', 'main').
prefetch_related('tag'). prefetch_related('tag').
@ -42,8 +43,9 @@ class ExpoManager(TranslationManager):
def conf_main(self): def conf_main(self):
lang = translation.get_language() lang = translation.get_language()
key = 'conf_main_page_key_%s'%lang key = 'conf_main_page_key_%s'%lang
result = cache.get(key) if key in cache:
if not result: result = cache.get(key)
else:
result = list(self.language(lang). result = list(self.language(lang).
select_related('country', 'city', 'place', 'main'). select_related('country', 'city', 'place', 'main').
prefetch_related('tag'). prefetch_related('tag').
@ -54,9 +56,6 @@ class ExpoManager(TranslationManager):
return result return result
class CityManager(TranslationManager): class CityManager(TranslationManager):
cache_time = 600 cache_time = 600
def all(self): def all(self):
@ -74,9 +73,9 @@ class CityManager(TranslationManager):
def expo_cities(self): def expo_cities(self):
lang = translation.get_language() lang = translation.get_language()
key = 'used_expo_cities_%s'%lang key = 'used_expo_cities_%s' % lang
cached_cities = cache.get(key) if key in cache:
if cached_cities: cached_cities = cache.get(key)
return cached_cities return cached_cities
else: else:
from exposition.models import Exposition from exposition.models import Exposition
@ -87,12 +86,11 @@ class CityManager(TranslationManager):
def expo_cities_with_count(self): def expo_cities_with_count(self):
lang = translation.get_language() lang = translation.get_language()
key = 'used_expo_cities_count_%s'%lang key = 'used_expo_cities_count_%s' % lang
cached_cities = cache.get(key) if key in cache:
if cached_cities: cached_cities = cache.get(key)
return cached_cities return cached_cities
else: else:
from exposition.models import Exposition from exposition.models import Exposition
sql = {'expo_count': sql = {'expo_count':
"""SELECT COUNT(*) """SELECT COUNT(*)
@ -110,9 +108,9 @@ class CityManager(TranslationManager):
def conference_cities_with_count(self): def conference_cities_with_count(self):
lang = translation.get_language() lang = translation.get_language()
key = 'used_conference_cities_count_%s'%lang key = 'used_conference_cities_count_%s' % lang
cached_cities = cache.get(key) if key in cache:
if cached_cities: cached_cities = cache.get(key)
return cached_cities return cached_cities
else: else:
@ -131,12 +129,11 @@ class CityManager(TranslationManager):
cache.set(key, cities, self.cache_time) cache.set(key, cities, self.cache_time)
return cities return cities
def conference_cities(self): def conference_cities(self):
lang = translation.get_language() lang = translation.get_language()
key = 'used_conference_cities_%s'%lang key = 'used_conference_cities_%s'%lang
cached_cities = cache.get(key) if key in cache:
if cached_cities: cached_cities = cache.get(key)
return cached_cities return cached_cities
else: else:
from conference.models import Conference from conference.models import Conference
@ -151,8 +148,8 @@ class CityManager(TranslationManager):
""" """
lang = translation.get_language() lang = translation.get_language()
key = 'used_cities_%s'%lang key = 'used_cities_%s'%lang
cached_cities = cache.get(key) if key in cache:
if cached_cities: cached_cities = cache.get(key)
return cached_cities return cached_cities
else: else:
from exposition.models import Exposition from exposition.models import Exposition

@ -2,16 +2,14 @@
import pytils import pytils
import ast import ast
import json import json
import datetime
from django import forms from django import forms
from django.db.models import Q from django.db.models import Q
from django.utils import translation
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from haystack.query import EmptySearchQuerySet, SearchQuerySet from haystack.query import EmptySearchQuerySet, SearchQuerySet
from country.models import Area from country.models import Area
from exposition.models import Exposition from exposition.models import Exposition
from conference.models import Conference from conference.models import Conference
from seminar.models import Seminar
from webinar.models import Webinar
from company.models import Company from company.models import Company
from theme.models import Theme, Tag from theme.models import Theme, Tag
from country.models import Country from country.models import Country
@ -236,20 +234,20 @@ class AbstactSearchForm(forms.Form):
sqs = sqs.filter(place_filter) sqs = sqs.filter(place_filter)
return sqs#.order_by('data_begin') return sqs#.order_by('data_begin')
import datetime
class ExpositionSearchForm(AbstactSearchForm): class ExpositionSearchForm(AbstactSearchForm):
search_url = '/expo/search/' search_url = '/expo/search/'
autocomplete_url = '/search-form/autosearch/exposition/' autocomplete_url = '/search-form/autosearch/exposition/'
title = _(u'ПОИСК СОБЫТИЙ') title = _(u'ПОИСК СОБЫТИЙ')
models = [Exposition] models = [Exposition]
th = forms.MultipleChoiceField(label=_(u'Тематика'), choices=[(item.id, item.name) for item in Theme.active.all()], th = forms.MultipleChoiceField(label=_(u'Тематика'), choices=[(item.id, item.name) for item in Theme.active.expo_themes()],
required=False, widget=forms.CheckboxSelectMultiple()) required=False, widget=forms.CheckboxSelectMultiple())
tg = forms.CharField(label=_(u'Теги'), required=False, widget=forms.CheckboxSelectMultiple()) tg = forms.CharField(label=_(u'Теги'), required=False, widget=forms.CheckboxSelectMultiple())
#co = forms.CharField(label=_(u'Страна'), required=False, widget=forms.CheckboxSelectMultiple())
area = forms.MultipleChoiceField(label=_(u'Регион'), area = forms.MultipleChoiceField(label=_(u'Регион'),
choices=[(item.id, item.name) for item in Area.objects.language().all()], choices=[(item.id, item.name) for item in Area.objects.all_sorted()],
required=False, widget=forms.CheckboxSelectMultiple()) required=False, widget=forms.CheckboxSelectMultiple())
co = forms.MultipleChoiceField(label=_(u'Страна'), required=False, widget=forms.CheckboxSelectMultiple(), co = forms.MultipleChoiceField(label=_(u'Страна'), required=False, widget=forms.CheckboxSelectMultiple(),
choices=[(item.id, item.name) for item in Country.objects.expo_countries()] choices=[(item.id, item.name) for item in Country.objects.expo_countries()]
@ -268,7 +266,7 @@ class ExpositionSearchForm(AbstactSearchForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(ExpositionSearchForm, self).__init__(*args, **kwargs) super(ExpositionSearchForm, self).__init__(*args, **kwargs)
self.theme_classes = {item.id:item.generate_search_class() for item in Theme.objects.all()} self.theme_classes = {item.id : item.generate_search_class() for item in Theme.active.expo_themes()}
def search(self): def search(self):
@ -335,109 +333,6 @@ class ExpositionSearchForm(AbstactSearchForm):
return sqs.order_by('data_begin') return sqs.order_by('data_begin')
class PlaceSearchForm(AbstactSearchForm):
search_url = '/places/search/'
autocomplete_url = '/search-form/autosearch/place/'
title = _(u'ПОИСК МЕСТ')
models = [PlaceExposition, PlaceConference]
# place fields
area = forms.MultipleChoiceField(label=_(u'Регион'), choices=[(item.id, item.name) for item in list(Area.objects.language().all())],
required=False, widget=forms.CheckboxSelectMultiple())
co = forms.MultipleChoiceField(label=_(u'Страна'), required=False, widget=forms.CheckboxSelectMultiple(),
choices=[(item.id, item.name) for item in list(Country.objects.expo_countries())]
)
ci = forms.MultipleChoiceField(label=_(u'Город'), required=False, widget=forms.CheckboxSelectMultiple(),
choices=[(item.id, item.name) for item in list(City.used.expo_cities())]
)
#
place_type = forms.MultipleChoiceField(label=_(u'Тип'), required=False, choices=[])
def get_place_type_display(self):
return _(u'Не важно')
def search(self):
pass
class CompanySearchForm(AbstactSearchForm):
search_url = '/members/search/'
autocomplete_url = '/search-form/autosearch/company/'
title = _(u'ПОИСК УЧАСТНИКОВ')
models = [Company]
th = forms.MultipleChoiceField(label=_(u'Тематика'), choices=[(item.id, item.name) for item in Theme.objects.all()],
required=False, widget=forms.CheckboxSelectMultiple())
tg = forms.CharField(label=_(u'Теги'), required=False, widget=forms.CheckboxSelectMultiple())
area = forms.MultipleChoiceField(label=_(u'Регион'), choices=[(item.id, item.name) for item in Area.objects.language().all()],
required=False, widget=forms.CheckboxSelectMultiple())
co = forms.MultipleChoiceField(label=_(u'Страна'), required=False, widget=forms.CheckboxSelectMultiple(),
choices=[(item.id, item.name) for item in Country.objects.expo_countries()]
)
ci = forms.MultipleChoiceField(label=_(u'Город'), required=False, widget=forms.CheckboxSelectMultiple(),
choices=[(item.id, item.name) for item in City.used.expo_cities()]
)
def __init__(self, *args, **kwargs):
super(CompanySearchForm, self).__init__(*args, **kwargs)
self.theme_classes = {item.id:item.generate_search_class() for item in list(Theme.objects.language().all())}
def search(self):
q = self.cleaned_data.get('q')
w = self.cleaned_data.get('w')
th = self.cleaned_data.get('th')
tg = self.cleaned_data.get('tg')
c = self.cleaned_data.get('c')
city = self.cleaned_data.get('city')
sqs = SearchQuerySet().models(Company)
if q:
sqs = sqs.auto_query(q)
if w:
sqs = sqs.filter(where__contains=w)
if th:
sqs = sqs.filter(theme__in=th)
if tg:
sqs = sqs.filter(tag__in=tg)
if c:
sqs = sqs.filter(country__in=c)
if city:
sqs = sqs.filter(country__in=c)
return sqs
class EventSearchForm(forms.Form):
q = forms.CharField(label=_(u'Поиск'), required=False)
w = forms.CharField(label=_(u'Где'), required=False)
fr = forms.DateField(required=False,
widget=forms.DateInput(attrs={'class': 'date', 'id': 'dateFrom',
'placeholder': _(u'дд.мм.гггг')}))
to = forms.DateField(required=False,
widget=forms.DateInput(attrs={'class': 'date', 'id': 'dateTo',
'placeholder': _(u'дд.мм.гггг')}))
def search(self):
if not self.is_valid():
return EmptySearchQuerySet()
q = self.cleaned_data.get('q')
w = self.cleaned_data.get('w')
if not q and not w:
return EmptySearchQuerySet()
sqs = SearchQuerySet().models(Exposition, Conference, Seminar, Webinar)
if q:
sqs = sqs.auto_query(q)
if w:
sqs = sqs.filter(where__contains=w)
return sqs

@ -128,20 +128,20 @@ class MetaSetting(TranslatableModel):
class SeoTextManager(TranslationManager): class SeoTextManager(TranslationManager):
cache_time = 120 cache_time = 3600
def cache_get(self, *args, **kwargs): def cache_get(self, *args, **kwargs):
url = kwargs.get('url') url = kwargs.get('url')
lang = kwargs.get('lang')[:2] or translation.get_language()[:2] lang = kwargs.get('lang')[:2] or translation.get_language()[:2]
key = 'seo_text_cache' key = 'seo_text_cache'
result = cache.get(key) if key in cache:
if result: result = cache.get(key)
return result.get("%s_%s" % (lang, url)) return result.get("%s_%s" % (lang, url))
else:
qs = list(SeoText.objects.language('all')) qs = list(SeoText.objects.language('all'))
value_dict = {obj.language_code+'_'+obj.url: obj for obj in qs} value_dict = {obj.language_code+'_'+obj.url: obj for obj in qs}
cache.set(key, value_dict, self.cache_time) cache.set(key, value_dict, self.cache_time)
return value_dict.get("%s_%s" % (lang, url)) return value_dict.get("%s_%s" % (lang, url))
class SeoText(TranslatableModel): class SeoText(TranslatableModel):

@ -493,7 +493,7 @@ else:
) )
# debug_toolbar settings # debug_toolbar settings
"""
if DEBUG: if DEBUG:
DEBUG_TOOLBAR_PATCH_SETTINGS = False DEBUG_TOOLBAR_PATCH_SETTINGS = False
INTERNAL_IPS = ('127.0.0.1','176.121.5.82', '176.121.11.162', '77.123.47.46') INTERNAL_IPS = ('127.0.0.1','176.121.5.82', '176.121.11.162', '77.123.47.46')
@ -508,23 +508,19 @@ if DEBUG:
JQUERY_URL = os.path.join(SITE_ROOT, 'static/client/js/jquery-ui-1.10.4.custom.min.js'), JQUERY_URL = os.path.join(SITE_ROOT, 'static/client/js/jquery-ui-1.10.4.custom.min.js'),
DEBUG_TOOLBAR_PANELS = [ DEBUG_TOOLBAR_PANELS = [
#'debug_toolbar.panels.versions.VersionsPanel', #'debug_toolbar.panels.versions.VersionsPanel',
#'debug_toolbar.panels.timer.TimerPanel', 'debug_toolbar.panels.timer.TimerPanel',
#'debug_toolbar.panels.settings.SettingsPanel', 'debug_toolbar.panels.settings.SettingsPanel',
#'debug_toolbar.panels.headers.HeadersPanel', 'debug_toolbar.panels.headers.HeadersPanel',
#'debug_toolbar.panels.request.RequestPanel', 'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel', 'debug_toolbar.panels.sql.SQLPanel',
#'debug_toolbar.panels.staticfiles.StaticFilesPanel', 'debug_toolbar.panels.staticfiles.StaticFilesPanel',
#'debug_toolbar.panels.templates.TemplatesPanel', 'debug_toolbar.panels.templates.TemplatesPanel',
#'debug_toolbar.panels.cache.CachePanel', 'debug_toolbar.panels.cache.CachePanel',
#'debug_toolbar.panels.signals.SignalsPanel', 'debug_toolbar.panels.signals.SignalsPanel',
#'debug_toolbar.panels.logging.LoggingPanel', 'debug_toolbar.panels.logging.LoggingPanel',
#'debug_toolbar.panels.redirects.RedirectsPanel', 'debug_toolbar.panels.redirects.RedirectsPanel',
] ]
#DEBUG_TOOLBAR_CONFIG = {
# 'INTERCEPT_REDIRECTS': False,
#}
"""
# -- PAGINATION -- #

@ -74,7 +74,11 @@ urlpatterns = patterns('',
url(r'^', include('settings.old_urls')), url(r'^', include('settings.old_urls')),
url(r'^', include('service.urls')), url(r'^', include('service.urls')),
) )
if settings.DEBUG:
import debug_toolbar
urlpatterns += patterns('',
url(r'^__debug__/', include(debug_toolbar.urls)),
)
# ajax urls # ajax urls
urlpatterns += patterns('', urlpatterns += patterns('',
@ -93,8 +97,3 @@ urlpatterns += patterns('',
) )
if settings.DEBUG:
import debug_toolbar
urlpatterns += patterns('',
url(r'^__debug__/', include(debug_toolbar.urls)),
)

@ -66,7 +66,7 @@ def error404(request):
class MainPageView(JitterCacheMixin, TemplateView): class MainPageView(JitterCacheMixin, TemplateView):
cache_range = settings.CACHE_RANGE cache_range = [60*3, 60*5]
template_name = 'client/index.html' template_name = 'client/index.html'
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.db.models import F
from django.db import models from django.db import models
from hvad.models import TranslatableModel, TranslatedFields, TranslationManager from hvad.models import TranslatableModel, TranslatedFields, TranslationManager
from functions.custom_fields import EnumField from functions.custom_fields import EnumField
@ -146,21 +147,16 @@ class CallBack(models.Model):
class Meta: class Meta:
ordering = ['-created'] ordering = ['-created']
from country.models import Country
from exposition.models import Exposition
from conference.models import Conference
from django.db.models import F
class LinkedService(models.Model): class LinkedService(models.Model):
service = models.ForeignKey(Service, blank=False) service = models.ForeignKey(Service, blank=False)
countries = models.ManyToManyField(Country, blank=True, verbose_name=u"Страны") countries = models.ManyToManyField('country.Country', blank=True, verbose_name=u"Страны")
exclude_countries = models.BooleanField(default=False, verbose_name=u"Исключить страны") exclude_countries = models.BooleanField(default=False, verbose_name=u"Исключить страны")
expositions = models.ManyToManyField(Exposition, blank=True, verbose_name= u"Выставки") expositions = models.ManyToManyField('exposition.Exposition', blank=True, verbose_name= u"Выставки")
conferences = models.ManyToManyField(Conference, blank=True, verbose_name=u'Конференции') conferences = models.ManyToManyField('conference.Conference', blank=True, verbose_name=u'Конференции')
def update_countries_flag(self): def update_countries_flag(self):
from country.models import Country
if self.exclude_countries: if self.exclude_countries:
'filter all countries except selected and set flag to true' 'filter all countries except selected and set flag to true'
Country.objects.language().exclude(id__in=[c.id for c in self.countries.all()]).update(services=F('services').bitor(getattr(Country.services, self.service.url))) Country.objects.language().exclude(id__in=[c.id for c in self.countries.all()]).update(services=F('services').bitor(getattr(Country.services, self.service.url)))
@ -172,12 +168,14 @@ class LinkedService(models.Model):
Country.objects.exclude(id__in=[c.id for c in self.countries.all()]).update(services=F('services').bitand(~getattr(Country.services, self.service.url))) Country.objects.exclude(id__in=[c.id for c in self.countries.all()]).update(services=F('services').bitand(~getattr(Country.services, self.service.url)))
def update_expositions_flag(self): def update_expositions_flag(self):
self.expositions.update(services=F('services').bitor(getattr(Exposition.services, self.service.url))) from exposition.models import Exposition
Exposition.objects.exclude(id__in=[c.id for c in self.expositions.all()]).update(services=F('services').bitand(~getattr(Exposition.services, self.service.url))) self.expositions.update(services=F('services').bitor(getattr(Exposition.services, self.service.url)))
Exposition.objects.exclude(id__in=[c.id for c in self.expositions.all()]).update(services=F('services').bitand(~getattr(Exposition.services, self.service.url)))
def update_conferences_flag(self): def update_conferences_flag(self):
self.conferences.update(services=F('services').bitor(getattr(Conference.services, self.service.url))) from conference.models import Conference
Conference.objects.exclude(id__in=[c.id for c in self.conferences.all()]).update(services=F('services').bitand(~getattr(Conference.services, self.service.url))) self.conferences.update(services=F('services').bitor(getattr(Conference.services, self.service.url)))
Conference.objects.exclude(id__in=[c.id for c in self.conferences.all()]).update(services=F('services').bitand(~getattr(Conference.services, self.service.url)))
def update_all_flags(self): def update_all_flags(self):
self.update_countries_flag() self.update_countries_flag()

@ -1,14 +1,38 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand
from django.test.client import RequestFactory
from django.utils import translation from django.utils import translation
from django.conf import settings from django.conf import settings
from exposition.views import ExpositionByCity from django.core.cache import cache
from exposition.models import Exposition
from conference.models import Conference
from article.models import Article
from city.models import City
from country.models import Country, Area
from theme.models import Theme, Tag
CACHE_TIME = 300
update_keys = {'expo_main_page_key_%s': Exposition.objects.expo_main,
'country_area_all_%s': Area.objects.all_sorted,
'conf_main_page_key_%s': Conference.objects.conf_main,
'main_page_news_%s': Article.objects.main_page_news,
'main_page_blogs_%s': Article.objects.main_page_blogs,
'used_expo_cities_%s': City.used.expo_cities,
'used_expo_cities_count_%s': City.used.expo_cities_with_count,
'used_conference_cities_count_%s': City.used.conference_cities_with_count,
'used_conference_cities_%s': City.used.conference_cities,
'used_cities_%s': City.used.cities,
'used_expo_countries_%s': Country.objects.expo_countries,
'used_expo_countries_count_%s': Country.objects.expo_countries_with_count,
'used_conference_countries_count_%s': Country.objects.conference_countries_with_count,
'used_conference_countries_%s': Country.objects.conference_countries,
'used_expo_themes_%s': Theme.active.expo_themes,
'used_expo_themes_count_%s': Theme.active.expo_themes_with_count,
'used_conference_themes_count_%s': Theme.active.conference_themes_with_count,
'used_conference_tags_%s': Tag.active.conference_tags,
'used_expo_tags_count_%s': Tag.active.expo_themes_with_count,
'used_conference_tags_count_%s': Tag.active.conference_themes_with_count}
class Command(BaseCommand): class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
@ -16,11 +40,18 @@ class Command(BaseCommand):
for lang in langs: for lang in langs:
translation.activate(lang) translation.activate(lang)
for k, func in update_keys.iteritems():
key = k % lang
print(key)
if key in cache:
print('exist')
else:
print('not exist')
result = func()
cache.set(key, result, CACHE_TIME)
request = RequestFactory().get('/expo/city/')
view = ExpositionByCity.as_view()
response = view(request)
print(lang)
print('success') print('success')

@ -240,7 +240,7 @@ def without_page(value):
@register.filter @register.filter
def note_by_user(obj, user): def note_by_user(obj, user):
if obj: if obj and user.is_authenticated():
return obj.get_note_by_user(user.id) return obj.get_note_by_user(user.id)
return '' return ''

@ -324,7 +324,7 @@ $(document).ready(function(){
} }
if( $("#id_main_page_news" ).length ) { if( $("#id_tag" ).length ) {
$('#id_tag').select2({ $('#id_tag').select2({
placeholder: "Теги", placeholder: "Теги",
width: '550px', width: '550px',

Binary file not shown.

@ -1,649 +0,0 @@
/* http://www.positioniseverything.net/easyclearing.html */
#djDebug .clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
#djDebug .clearfix {display: inline-block;}
/* Hides from IE-mac \*/
#djDebug .clearfix {display: block;}
* html #djDebug .clearfix {height: 1%;}
/* end hide from IE-mac */
/* Debug Toolbar CSS Reset, adapted from Eric Meyer's CSS Reset */
#djDebug {color:#000;background:#FFF;}
#djDebug, #djDebug div, #djDebug span, #djDebug applet, #djDebug object, #djDebug iframe,
#djDebug h1, #djDebug h2, #djDebug h3, #djDebug h4, #djDebug h5, #djDebug h6, #djDebug p, #djDebug blockquote, #djDebug pre,
#djDebug a, #djDebug abbr, #djDebug acronym, #djDebug address, #djDebug big, #djDebug cite, #djDebug code,
#djDebug del, #djDebug dfn, #djDebug em, #djDebug font, #djDebug img, #djDebug ins, #djDebug kbd, #djDebug q, #djDebug s, #djDebug samp,
#djDebug small, #djDebug strike, #djDebug strong, #djDebug sub, #djDebug sup, #djDebug tt, #djDebug var,
#djDebug b, #djDebug u, #djDebug i, #djDebug center,
#djDebug dl, #djDebug dt, #djDebug dd, #djDebug ol, #djDebug ul, #djDebug li,
#djDebug fieldset, #djDebug form, #djDebug label, #djDebug legend,
#djDebug table, #djDebug caption, #djDebug tbody, #djDebug tfoot, #djDebug thead, #djDebug tr, #djDebug th, #djDebug td,
#djDebug button {
margin:0;
padding:0;
min-width:0;
width:auto;
border:0;
outline:0;
font-size:12px;
line-height:1.5em;
color:#000;
vertical-align:baseline;
background-color:transparent;
font-family:sans-serif;
text-align:left;
text-shadow: none;
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
#djDebug button {
background-color: #eee;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #cccccc));
background-image: -webkit-linear-gradient(top, #eee, #cccccc);
background-image: -moz-linear-gradient(top, #eee, #cccccc);
background-image: -ms-linear-gradient(top, #eee, #cccccc);
background-image: -o-linear-gradient(top, #eee, #cccccc);
background-image: linear-gradient(top, #eee, #cccccc);
border: 1px solid #ccc;
border-bottom: 1px solid #bbb;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
color: #333;
line-height: 1;
padding: 0 8px;
text-align: center;
text-shadow: 0 1px 0 #eee;
}
#djDebug button:hover {
background-color: #ddd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ddd), color-stop(100%, #bbb));
background-image: -webkit-linear-gradient(top, #ddd, #bbb);
background-image: -moz-linear-gradient(top, #ddd, #bbb);
background-image: -ms-linear-gradient(top, #ddd, #bbb);
background-image: -o-linear-gradient(top, #ddd, #bbb);
background-image: linear-gradient(top, #ddd, #bbb);
border-color: #bbb;
border-bottom-color: #999;
cursor: pointer;
text-shadow: 0 1px 0 #ddd;
}
#djDebug button:active {
border: 1px solid #aaa;
border-bottom: 1px solid #888;
-webkit-box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
-moz-box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
}
#djDebug #djDebugToolbar {
background-color:#111;
width:200px;
z-index:100000000;
position:fixed;
top:0;
bottom:0;
right:0;
opacity:0.9;
overflow-y: auto;
}
#djDebug #djDebugToolbar small {
color:#999;
}
#djDebug #djDebugToolbar ul {
margin:0;
padding:0;
list-style:none;
}
#djDebug #djDebugToolbar li {
border-bottom:1px solid #222;
color:#fff;
display:block;
font-weight:bold;
float:none;
margin:0;
padding:0;
position:relative;
width:auto;
}
#djDebug #djDebugToolbar input[type=checkbox] {
float: right;
margin: 10px;
}
#djDebug #djDebugToolbar li>a,
#djDebug #djDebugToolbar li>div.contentless {
font-weight:normal;
font-style:normal;
text-decoration:none;
display:block;
font-size:16px;
padding:10px 10px 5px 25px;
color:#fff;
}
#djDebug #djDebugToolbar li>div.disabled {
font-style: italic;
color: #999;
}
#djDebug #djDebugToolbar li a:hover {
color:#111;
background-color:#ffc;
}
#djDebug #djDebugToolbar li.active {
background: #333 no-repeat left center;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAQAAAAngNWGAAABe0lEQVR4AW2SO0tDQRCFz+bGJxEUrKzsBBsb/4DYiIWdECvB/6CCYGtp6QNRjJ1FihSCVpZGMIhYSBAfIGKRx70xyY3JbrKOk7DJLp7DXm7Il9nMmREYQgQeAI1W1/zZUhR9ZI9gjSZb0iHMRSPbE1QzhhF2jN4H6YdRCHaPvOTjdDb1jWECBhiJoC1tg6Kotbw9WkxBoIUGaqiiQs8fSCj+t9qAIL1nlg9fKgSGKKNEJ2RUMqh7QCDIr58k31AlrIiA0CqhDTQJtUFAqsTFxjV85FGAz1XrkDZodPewkih8IkdwCRWu2U6VerQ0O3OzuTSJ/k62JiIXJI2NL0wBjDiTseQHW8fnGY6myf3+Dz49x88+vjr9SoPaoG6lLteuCApMiu1otAWG/s7BXtYEzv3yZOyrc5nV3XTZjPAv7Jqp2AVf9+dOyx4EFCTqCAnimZB1z9X38fk05RblfVQE1LkR5a6vwCivruANV2ynjU5FHpIE+AsCnCuNfgGtjt1gZaIn2wAAAABJRU5ErkJggg==");
padding-left:10px;
}
#djDebug #djDebugToolbar li.active a:hover {
color:#b36a60;
background-color:transparent;
}
#djDebug #djDebugToolbar li small {
font-size:12px;
color:#999;
font-style:normal;
text-decoration:none;
font-variant:small-caps;
}
#djDebug #djDebugToolbarHandle {
position:fixed;
background-color:#fff;
border:1px solid #111;
top:30px;
right:0;
z-index:100000000;
opacity:0.75;
}
#djDebug #djShowToolBarButton {
display:block;
height:75px;
width:30px;
border-right:none;
border-bottom:4px solid #fff;
border-top:4px solid #fff;
border-left:4px solid #fff;
color:#fff;
font-size:10px;
font-weight:bold;
text-decoration:none;
text-align:center;
text-indent:-999999px;
background: #000 no-repeat left center;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAABLCAIAAACN/FLOAAADOUlEQVR4Ae2WUWhSXxzHp5v+y4mGGkkEETIfIhyEUThaD0XlGg7qZTJdpGOzQSiVC9uWlCxsMmvW0k2WBDVJMzJWBAaG6ORfGZMexAd9EXzxwWFI9qB24K7DZUNRdlSC++H35P1yPpff/Z1zbCMgICAg2AECgUClUmk0msHBQRqN1jyxxWIp/6Wrq6s5UkKsVCrP1wCfz0csrpGlpaXWiFdXV1sjdrvdiMW5XG6jBoxG47801YTYbDZj1mKxyOPx2loLmUzmcDhcLpdKpTbDJxQKbTZbLBYrlUqw/+l02uVySSSShijpdDrYneWqhEIh0AOUVtDPcDhcroFkMslgMJCJTSZTuWasVisaK4vFyufzZRw+n89gMMjlcqlUqtfrvV4v/pMXCgU2m41ArFAo8EemWCzenhGJRGDE8LcnArHD4YArqtXqSjGZTAZjdrsdgRjMKlyRyWRWilEoFHDCYLFAIIBADHYt3K/Vk6lUCktGo1EE4kQigS2XzWbHqpLJZLBkPB5HIAavX66TSCSCQBwMBusV+/1+BGKPx1Ov2Ol0IhDrdLr1OtFqtTv3EjBYnWwuY0ux9jHI7eTGiu2Bm9/Ki9tr7deTl9+nhq6fIZFITRXDmns73hoxqJP9ggaKw78XPm88wirw04IXz6yMNFB8Z3kY//v+Q5x3yRns0fP/dc0TA/SOy9ijVz/06MXg+43q+0emL3T38LY8mn9/DRPPelSN+0NP2sOhgx1MoXbAHw/w9koUPYrJvqOn+Ih9h4UHb9uGXsfufi3Z4Ch9TM8aXaO9km6UJgiN/t8D9xjQVKlnoQnQA5RW0E9H+BYUVCkw2J2MXcjEatOlWqxY6axDyG6FYP4xfumnPs1Vw0Cf/MQ56TEw4WbvOP6TrxUWmOxOBGIwqHDRQG5eJD6yPSMQ8cCIwdiAsgeBGB4LoKTq05VifbLjMDZllyMQg1mFK9KZuyvFOijtX4qbDQenGwIx2LVwv1ZPfkgZsaQzOo1A7E1sHv3+7MOLY71V6lNmDku+id9DIAavD1tdY72ITCIQLwcn6hUv+m8gEIOrpl7xfecIAvEVnXhlfbquGtaebSMgICAgaBR/AF2yboPNdvDUAAAAAElFTkSuQmCC");
opacity:0.5;
}
#djDebug #djShowToolBarButton:hover {
background-color:#111;
border-top-color:#FFE761;
border-left-color:#FFE761;
border-bottom-color:#FFE761;
cursor:move;
opacity:1.0;
}
#djDebug code {
display:block;
font-family:Consolas, Monaco, "Bitstream Vera Sans Mono", "Lucida Console", monospace;
font-size: 12px;
white-space:pre;
overflow:auto;
}
#djDebug .djDebugOdd {
background-color:#f5f5f5;
}
#djDebug .panelContent {
display:none;
position:fixed;
margin:0;
top:0;
right:200px;
bottom:0;
left:0px;
background-color:#eee;
color:#666;
z-index:100000000;
}
#djDebug .panelContent > div {
border-bottom:1px solid #ddd;
}
#djDebug .djDebugPanelTitle {
position:absolute;
background-color:#ffc;
color:#666;
padding-left:20px;
top:0;
right:0;
left:0;
height:50px;
}
#djDebug .djDebugPanelTitle code {
display:inline;
font-size:inherit;
}
#djDebug .djDebugPanelContent {
position:absolute;
top:50px;
right:0;
bottom:0;
left:0;
height:auto;
padding:5px 0 0 20px;
}
#djDebug .djDebugPanelContent .loader {
display:block;
margin:80px auto;
}
#djDebug .djDebugPanelContent .scroll {
height:100%;
overflow:auto;
display:block;
padding:0 10px 0 0;
}
#djDebug h3 {
font-size:24px;
font-weight:normal;
line-height:50px;
}
#djDebug h4 {
font-size:20px;
font-weight:bold;
margin-top:0.8em;
}
#djDebug .panelContent table {
border:1px solid #ccc;
border-collapse:collapse;
width:100%;
background-color:#fff;
display:block;
margin-top:0.8em;
overflow: auto;
}
#djDebug .panelContent tbody td,
#djDebug .panelContent tbody th {
vertical-align:top;
padding:2px 3px;
}
#djDebug .panelContent tbody td.time {
text-align: center;
}
#djDebug .panelContent thead th {
padding:1px 6px 1px 3px;
text-align:left;
font-weight:bold;
font-size:14px;
white-space: nowrap;
}
#djDebug .panelContent tbody th {
width:12em;
text-align:right;
color:#666;
padding-right:.5em;
}
#djDebug .djTemplateHideContextDiv {
background-color:#fff;
}
/*
#djDebug .panelContent p a:hover, #djDebug .panelContent dd a:hover {
color:#111;
background-color:#ffc;
}
#djDebug .panelContent p {
padding:0 5px;
}
#djDebug .panelContent p, #djDebug .panelContent table, #djDebug .panelContent ol, #djDebug .panelContent ul, #djDebug .panelContent dl {
margin:5px 0 15px;
background-color:#fff;
}
#djDebug .panelContent table {
clear:both;
border:0;
padding:0;
margin:0;
border-collapse:collapse;
border-spacing:0;
}
#djDebug .panelContent table a {
color:#000;
padding:2px 4px;
}
#djDebug .panelContent table a:hover {
background-color:#ffc;
}
#djDebug .panelContent table th {
background-color:#333;
font-weight:bold;
color:#fff;
padding:3px 7px 3px;
text-align:left;
cursor:pointer;
}
#djDebug .panelContent table td {
padding:5px 10px;
font-size:14px;
background-color:#fff;
color:#000;
vertical-align:top;
border:0;
}
#djDebug .panelContent table tr.djDebugOdd td {
background-color:#eee;
}
*/
#djDebug .panelContent .djDebugClose {
text-indent:-9999999px;
display:block;
position:absolute;
top:4px;
right:15px;
height:40px;
width:40px;
background: no-repeat center center;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAQAAACQTsNJAAABuUlEQVR4Ab2WXeoaMRTFZxHz6pObcA0DeXUHhXktFl8LXYAPXYBLKhQGBOFqW3XS8YOW6vjHmnp6wWZyHU1maqHnQDAf/Ehu7twYhUQxdUixO/wr8ts3oeg9TQjCEx5R7SGvKCd4nPNsIyShD4QGf6QkBBkQWnrgg4zqS2fm01kbze3M3GFGjyBvCdLFqYRUySM1zLAOUXJ6dZAACcoPBOHkFpK5qY1BQBt5sExC0gAijEkriMuLfI9m8SqXNxbSd+QSbVSCnPtXyNjdCCoZ7PANF7C4/Y4tznASNzW+QqaP9lFcj4cLW4PY+vFepsSQ2Hbnp5vw2ShB231Cau72EkfUs53lC4R+YQkSXsBAiFdXc72IkupmDODDfKkhwKtdygUgHAuXw7gEIN7jCIQNsfc43sDuqlgsbC57A+u94q82nFVscv8Vy2Rbi72csGKQ+RPignvytGuZbPW0P6KNjvdpz97aIf3jLz/ArfuKXz9dCt7IojR9qihNAuUx33vL454grOqF+t2/F2rPk/H5pzaa2+Ynw3lIaOlh6BlVlDUCMlLND3pKhRdQUPof/1o4x9Qlxe6G/+T8BlqvQqkd4EyZAAAAAElFTkSuQmCC");
}
#djDebug .panelContent .djDebugClose:hover {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAACiUlEQVR4Ad2Yz2oTURSH+xCz7cqX6DMUZtudCxExigq2WhcKYtGFVLrwAboSKoVGxT+tJWpTa2lLTDsm6SSTjtZoIq0prf+2Hu8PcmHInJvJPYwuPPDBMDPn8DE5c+fcDEgjDENHMahwOwx2zg1IsE1wFXcVvoIM+J173L8hckrRUpAlLeSmITKsKNoKMHioJRUZU1DKjNmKTCUWDWpUL21RJbcAcIxz/chM9StyvVeh8rOHtH7nJi2dOc6Ba7gnSWY8ScQ1JVdfv6C1yQlegAH3+su5XjLDvUTKXNK77H0Ul4Bck0jZJJLhEry5GV1ULvNg1iSTiYlw64SfX0ShNEAtfp3pEhnhjJmekIJapqcyEhWZZt4OtuDqlXPUWHxKYXaGli+c1Ocpf/4E1Wfv0afcPK1dG+VyTW/TdFQk6Pdp7BfWSMdhtQIZSFDbe0s6DiqezVMJtIjTfXGnuv3b9Iib+RxF47C2Te3SJkUDsqZ81GZkHIgMdV+ora8YC62MnqbvH0Iyxa/WZ3pz+awxH7UZkSH9YaMolZfPdaJZZvd9XOJLU0sYQW1ucROJoCcOyh51x1G9ip4Ri1j9NLoxDaEbWPDTWDbrx/lHsZ740dilSKChBc1q+fp+3SyQjp/NBnoi1sB4KpLXl13QSo/n2GKFW1fpaKdG+8UNSEQbmPY2VulbWKfi5A0uFzUTFzR+ib/NFJSBWolLvKYd++i9WkhNxF9i35Y29/W9KB8DxDPJJU4EBP9wMPJFoyLmCetRUc8gPK5JRDOhIBOlJ9nE4Rn3yIdnwXYi2Crq7QSOU99OaGBNKTMu3XK63GQvADXcNDbhGcWeQAA5mf/ybwkOR3FM4XbAsSOt9wcLTn8FNtAKkQAAAABJRU5ErkJggg==");
}
#djDebug .panelContent .djDebugClose.djDebugBack {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAACBUlEQVR4Ad2Y0WriQBSGfYjc7tW+hM8g5HbfYMHbxcXbhT6AF30AH6cXvRCEttK0JgZi0qhQaRNtNWV2fuiADicZcxirdOCn45mccz4mMyczbXDbeDx2pH5IuRD6n7YGR3UdkPBSaiQlSoQxPOMeA+S3VIxENRXD1wZIS2rAANA1RCwuSAdBLKtTF6RnCur7fjGZTLZJkhQQ+rAdANM7FORfVaA0Td/zPBdlDWN4xgDTNYG4Zc7T6TQjASqA4jjOKmBaVSA3lNN8Pi8Es8GXBkEuGqTNh2DDtCkQvU5gal+FpYZYZJ3RQH5RxPqaWG82qmuw02uGyoHcuyB9anfowZ6el+I2jITellkOu9gWH5UwJbupvwvimWZDgVzdeWLohyqpAlF2zE7dWfEUiKMPBkGwNxt6QmjwEKik+Ltnz9ZvpTCITcA4AGnqA1EUreFkgrm+fwSEsuO3spfCIDYB0gRIi9gtlVsWSVRSAOzaMSOw4zVSDbGp4nZGIPxXg6TWXo39xarsjMV6LtuXLmiz2cx6QUNMuqAZSvxqtbJW4hHLVOKVFvpDSZK8HPmjt6C+vn9OcAz4S4FA3hcejEasoyKmlnFUVK+DklsFAl2c9vDMuE6EYbhR1wn0bV8nlEAtLKvLvXK62smeK8RwbVzC21IpAyCF77f8twQlR+onEkLow8aN9x+oYk85YNJqYQAAAABJRU5ErkJggg==");
}
#djDebug .panelContent .djDebugClose.djDebugBack:hover {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAYAAAA6RwvCAAACLElEQVR4Ad2YT8sSURTG/RCzbdWX8DMIs23XMrBlTLiTSIKKIqgP4C6KQAuKsLCycqGLRHNsXqck2giStIiiRdDtPtABuz0zNw+XkAYe3vHce57zY/7cOfetaI/VahVZHbOKIZz/ilU02jcBBW9YZVaGC2OYg7nhQU5ZrVlhj9bIDQFSs5ooAFzN4KUFSWASWMm+INe8pvnSvJ1PzaLfg3COmB8G3n8Jcq7MKH14z4yvXjCD0yepMIY5HpiGDyQuSj56+cSMrrQ4ABHmZi/6ZTC1MpCUJb3u3oa5SsjlIKjFQeosYda5JaZ6mLt3OAxquiBsncieP4ZRCMGLrjMuyAlG7D4To2Yi5/44eWZYDdTeBWmzt8M1W95sm09Z+kd8dv0S4maY1EthCt6m9i5ITq8GAcHx+cN7KSogEqdXx3NVcgGJ3MF3R29+MCMpiOPbx40Uxd/f4q8uNgth4E1gIoBU3YHleOgYcJjvX78AQuL4LfFCGHgTkCpAau7A4umj0nuNIlIUALtxXBEcuI0kF950cTsoEO2tQdGAtyb8w4rfiof1cF5fvqDN73dCL2jwpAuaf4m/fD7UEg8v7xIv2rqTsme9cB+9AX1btuzre0bdBuh7krMMBMr/YWOUaVpF9BP7t4rSg3DFvua5xRJF8wddb/OMOfrmWbGdyKcT2U7gPPh2QgRqE1gN7ZYzZp29Qim8QmzC61YbBcAGuf/hvyW4IqvjKAjhHDGt309H4mp9BS17eAAAAABJRU5ErkJggg==");
}
#djDebug .panelContent dt, #djDebug .panelContent dd {
display:block;
}
#djDebug .panelContent dt {
margin-top:0.75em;
}
#djDebug .panelContent dd {
margin-left:10px;
}
#djDebug a.toggleTemplate {
padding:4px;
background-color:#bbb;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
}
#djDebug a.toggleTemplate:hover {
padding:4px;
background-color:#444;
color:#ffe761;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
}
#djDebug a.djTemplateShowContext, #djDebug a.djTemplateShowContext span.toggleArrow {
color:#999;
}
#djDebug a.djTemplateShowContext:hover, #djDebug a.djTemplateShowContext:hover span.toggleArrow {
color:#000;
cursor:pointer;
}
#djDebug .djDebugSqlWrap {
position:relative;
}
#djDebug .djDebugCollapsed {
display: none;
text-decoration: none;
color: #333;
}
#djDebug .djDebugUncollapsed {
color: #333;
text-decoration: none;
}
#djDebug .djUnselected {
display: none;
}
#djDebug tr.djHiddenByDefault {
display: none;
}
#djDebug tr.djSelected {
display: table-row;
}
#djDebug .djDebugSql {
z-index:100000002;
}
#djDebug .djSQLDetailsDiv tbody th {
text-align: left;
}
#djDebug .djSqlExplain td {
white-space: pre;
}
#djDebug span.djDebugLineChart {
background-color:#777;
height:3px;
position:absolute;
bottom:0;
top:0;
left:0;
display:block;
z-index:1000000001;
}
#djDebug span.djDebugLineChartWarning {
background-color:#900;
}
#djDebug .highlight { color:#000; }
#djDebug .highlight .err { color:#000; } /* Error */
#djDebug .highlight .g { color:#000; } /* Generic */
#djDebug .highlight .k { color:#000; font-weight:bold } /* Keyword */
#djDebug .highlight .o { color:#000; } /* Operator */
#djDebug .highlight .n { color:#000; } /* Name */
#djDebug .highlight .mi { color:#000; font-weight:bold } /* Literal.Number.Integer */
#djDebug .highlight .l { color:#000; } /* Literal */
#djDebug .highlight .x { color:#000; } /* Other */
#djDebug .highlight .p { color:#000; } /* Punctuation */
#djDebug .highlight .m { color:#000; font-weight:bold } /* Literal.Number */
#djDebug .highlight .s { color:#333 } /* Literal.String */
#djDebug .highlight .w { color:#888888 } /* Text.Whitespace */
#djDebug .highlight .il { color:#000; font-weight:bold } /* Literal.Number.Integer.Long */
#djDebug .highlight .na { color:#333 } /* Name.Attribute */
#djDebug .highlight .nt { color:#000; font-weight:bold } /* Name.Tag */
#djDebug .highlight .nv { color:#333 } /* Name.Variable */
#djDebug .highlight .s2 { color:#333 } /* Literal.String.Double */
#djDebug .highlight .cp { color:#333 } /* Comment.Preproc */
#djDebug .timeline {
width: 30%;
}
#djDebug .djDebugTimeline {
position: relative;
height: 100%;
min-height: 100%;
}
#djDebug div.djDebugLineChart {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
vertical-align: middle;
}
#djDebug div.djDebugLineChart strong {
text-indent: -10000em;
display: block;
font-weight: normal;
vertical-align: middle;
background-color:#ccc;
}
#djDebug div.djDebugLineChartWarning strong {
background-color:#900;
}
#djDebug .djDebugInTransaction div.djDebugLineChart strong {
background-color: #d3ff82;
}
#djDebug .djDebugStartTransaction div.djDebugLineChart strong {
border-left: 1px solid #94b24d;
}
#djDebug .djDebugEndTransaction div.djDebugLineChart strong {
border-right: 1px solid #94b24d;
}
#djDebug .djDebugHover div.djDebugLineChart strong {
background-color: #000;
}
#djDebug .djDebugInTransaction.djDebugHover div.djDebugLineChart strong {
background-color: #94b24d;
}
#djDebug .panelContent ul.stats {
position: relative;
list-style-type: none;
}
#djDebug .panelContent ul.stats li {
width: 30%;
float: left;
}
#djDebug .panelContent ul.stats li strong.label {
display: block;
}
#djDebug .panelContent ul.stats li span.color {
height: 12px;
width: 3px;
display: inline-block;
}
#djDebug .panelContent ul.stats li span.info {
display: block;
padding-left: 5px;
}
#djDebug .panelcontent thead th {
white-space: nowrap;
}
#djDebug .djDebugRowWarning .time {
color: red;
}
#djdebug .panelcontent table .toggle {
width: 14px;
padding-top: 3px;
}
#djDebug .panelContent table .actions {
min-width: 70px;
white-space: nowrap;
}
#djdebug .panelcontent table .color {
width: 3px;
}
#djdebug .panelcontent table .color span {
width: 3px;
height: 12px;
overflow: hidden;
padding: 0;
}
#djDebug .djToggleSwitch {
text-decoration: none;
border: 1px solid #999;
height: 12px;
width: 12px;
line-height: 12px;
text-align: center;
color: #777;
display: inline-block;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFF', endColorstr='#DCDCDC'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#FFF), to(#DCDCDC)); /* for webkit browsers */
background:-moz-linear-gradient(center top , #FFFFFF 0pt, #DCDCDC 100%) repeat scroll 0 0 transparent;
}
#djDebug .djNoToggleSwitch {
height: 14px;
width: 14px;
display: inline-block;
}
#djDebug .djSQLDetailsDiv {
margin-top:0.8em;
}
#djDebug pre {
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS-3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
color: #555;
border:1px solid #ccc;
border-collapse:collapse;
background-color:#fff;
display:block;
overflow: auto;
padding:2px 3px;
margin-bottom: 3px;
font-family:Consolas, Monaco, "Bitstream Vera Sans Mono", "Lucida Console", monospace;
}
#djDebug .stack span {
color: #000;
font-weight: bold;
}
#djDebug .stack span.path {
color: #777;
font-weight: normal;
}
#djDebug .stack span.code {
font-weight: normal;
}
@media print {
#djDebug {
display: none;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 B

@ -1,284 +0,0 @@
(function ($) {
var djdt = {
handleDragged: false,
events: {
ready: []
},
isReady: false,
init: function() {
$('#djDebug').show();
var current = null;
$(document).on('click', '#djDebugPanelList li a', function() {
if (!this.className) {
return false;
}
current = $('#djDebug #' + this.className);
if (current.is(':visible')) {
$(document).trigger('close.djDebug');
$(this).parent().removeClass('active');
} else {
$('.panelContent').hide(); // Hide any that are already open
var inner = current.find('.djDebugPanelContent .scroll'),
store_id = $('#djDebug').data('store-id'),
render_panel_url = $('#djDebug').data('render-panel-url');
if (store_id !== '' && inner.children().length === 0) {
var ajax_data = {
data: {
store_id: store_id,
panel_id: this.className
},
type: 'GET',
url: render_panel_url
};
$.ajax(ajax_data).done(function(data){
inner.prev().remove(); // Remove AJAX loader
inner.html(data);
}).fail(function(xhr){
var message = '<div class="djDebugPanelTitle"><a class="djDebugClose djDebugBack" href="">Back</a><h3>'+xhr.status+': '+xhr.statusText+'</h3></div>';
$('#djDebugWindow').html(message).show();
});
}
current.show();
$('#djDebugToolbar li').removeClass('active');
$(this).parent().addClass('active');
}
return false;
});
$(document).on('click', '#djDebug a.djDebugClose', function() {
$(document).trigger('close.djDebug');
$('#djDebugToolbar li').removeClass('active');
return false;
});
$(document).on('click', '#djDebug .djDebugPanelButton input[type=checkbox]', function() {
djdt.cookie.set($(this).attr('data-cookie'), $(this).prop('checked') ? 'on' : 'off', {
path: '/',
expires: 10
});
});
// Used by the SQL and template panels
$(document).on('click', '#djDebug .remoteCall', function() {
var self = $(this);
var name = self[0].tagName.toLowerCase();
var ajax_data = {};
if (name == 'button') {
var form = self.parents('form:eq(0)');
ajax_data['url'] = self.attr('formaction');
if (form.length) {
ajax_data['data'] = form.serialize();
ajax_data['type'] = form.attr('method') || 'POST';
}
}
if (name == 'a') {
ajax_data['url'] = self.attr('href');
}
$.ajax(ajax_data).done(function(data){
$('#djDebugWindow').html(data).show();
}).fail(function(xhr){
var message = '<div class="djDebugPanelTitle"><a class="djDebugClose djDebugBack" href="">Back</a><h3>'+xhr.status+': '+xhr.statusText+'</h3></div>';
$('#djDebugWindow').html(message).show();
});
$(document).on('click', '#djDebugWindow a.djDebugBack', function() {
$(this).parent().parent().hide();
return false;
});
return false;
});
// Used by the cache, profiling and SQL panels
$(document).on('click', '#djDebug a.djToggleSwitch', function(e) {
e.preventDefault();
var btn = $(this);
var id = btn.attr('data-toggle-id');
var open_me = btn.text() == btn.attr('data-toggle-open');
if (id === '' || !id) {
return;
}
var name = btn.attr('data-toggle-name');
btn.parents('.djDebugPanelContent').find('#' + name + '_' + id).find('.djDebugCollapsed').toggle(open_me);
btn.parents('.djDebugPanelContent').find('#' + name + '_' + id).find('.djDebugUncollapsed').toggle(!open_me);
$(this).parents('.djDebugPanelContent').find('.djToggleDetails_' + id).each(function(){
var $this = $(this);
if (open_me) {
$this.addClass('djSelected');
$this.removeClass('djUnselected');
btn.text(btn.attr('data-toggle-close'));
$this.find('.djToggleSwitch').text(btn.text());
} else {
$this.removeClass('djSelected');
$this.addClass('djUnselected');
btn.text(btn.attr('data-toggle-open'));
$this.find('.djToggleSwitch').text(btn.text());
}
});
return;
});
$('#djHideToolBarButton').click(function() {
djdt.hide_toolbar(true);
return false;
});
$('#djShowToolBarButton').click(function() {
if (!djdt.handleDragged) {
djdt.show_toolbar();
}
return false;
});
var handle = $('#djDebugToolbarHandle');
$('#djShowToolBarButton').on('mousedown', function (event) {
var startPageY = event.pageY;
var baseY = handle.offset().top - startPageY;
$(document).on('mousemove.djDebug', function (event) {
// Chrome can send spurious mousemove events, so don't do anything unless the
// cursor really moved. Otherwise, it will be impossible to expand the toolbar
// due to djdt.handleDragged being set to true.
if (djdt.handleDragged || event.pageY != startPageY) {
var offset = handle.offset();
offset.top = baseY + event.pageY;
handle.offset(offset);
djdt.handleDragged = true;
}
});
return false;
});
$(document).on('mouseup', function () {
$(document).off('mousemove.djDebug');
if (djdt.handleDragged) {
var top = handle.offset().top;
djdt.cookie.set('djdttop', top, {
path: '/',
expires: 10
});
setTimeout(function () {
djdt.handleDragged = false;
}, 10);
return false;
}
});
$(document).bind('close.djDebug', function() {
// If a sub-panel is open, close that
if ($('#djDebugWindow').is(':visible')) {
$('#djDebugWindow').hide();
return;
}
// If a panel is open, close that
if ($('.panelContent').is(':visible')) {
$('.panelContent').hide();
$('#djDebugToolbar li').removeClass('active');
return;
}
// Otherwise, just minimize the toolbar
if ($('#djDebugToolbar').is(':visible')) {
djdt.hide_toolbar(true);
return;
}
});
if (djdt.cookie.get('djdt') == 'hide') {
djdt.hide_toolbar(false);
} else {
djdt.show_toolbar(false);
}
$('#djDebug .djDebugHoverable').hover(function(){
$(this).addClass('djDebugHover');
}, function(){
$(this).removeClass('djDebugHover');
});
djdt.isReady = true;
$.each(djdt.events.ready, function(_, callback){
callback(djdt);
});
},
close: function() {
$(document).trigger('close.djDebug');
return false;
},
hide_toolbar: function(setCookie) {
// close any sub panels
$('#djDebugWindow').hide();
// close all panels
$('.panelContent').hide();
$('#djDebugToolbar li').removeClass('active');
// finally close toolbar
$('#djDebugToolbar').hide('fast');
$('#djDebugToolbarHandle').show();
// set handle position
var handleTop = djdt.cookie.get('djdttop');
if (handleTop) {
$('#djDebugToolbarHandle').css({top: handleTop + 'px'});
}
// Unbind keydown
$(document).unbind('keydown.djDebug');
if (setCookie) {
djdt.cookie.set('djdt', 'hide', {
path: '/',
expires: 10
});
}
},
show_toolbar: function(animate) {
// Set up keybindings
$(document).bind('keydown.djDebug', function(e) {
if (e.keyCode == 27) {
djdt.close();
}
});
$('#djDebugToolbarHandle').hide();
if (animate) {
$('#djDebugToolbar').show('fast');
} else {
$('#djDebugToolbar').show();
}
djdt.cookie.set('djdt', 'show', {
path: '/',
expires: 10
});
},
ready: function(callback){
if (djdt.isReady) {
callback(djdt);
} else {
djdt.events.ready.push(callback);
}
},
cookie: {
get: function(key){
if (document.cookie.indexOf(key) === -1) return null;
var cookieArray = document.cookie.split('; '),
cookies = {};
cookieArray.forEach(function(e){
var parts = e.split('=');
cookies[ parts[0] ] = parts[1];
});
return cookies[ key ];
},
set: function(key, value, options){
options = options || {};
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setDate(t.getDate() + days);
}
document.cookie = [
encodeURIComponent(key) + '=' + String(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '',
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join('');
return value;
}
}
};
$(document).ready(djdt.init);
})(djdt.jQuery);

@ -1,20 +0,0 @@
(function ($) {
function getSubcalls(row) {
var id = row.attr('id');
return $('.djDebugProfileRow[id^="'+id+'_"]');
}
function getDirectSubcalls(row) {
var subcalls = getSubcalls(row);
var depth = parseInt(row.attr('depth'), 10) + 1;
return subcalls.filter('[depth='+depth+']');
}
$('.djDebugProfileRow .djDebugProfileToggle').on('click', function(){
var row = $(this).closest('.djDebugProfileRow');
var subcalls = getSubcalls(row);
if (subcalls.css('display') == 'none') {
getDirectSubcalls(row).show();
} else {
subcalls.hide();
}
});
})(djdt.jQuery);

@ -1,7 +0,0 @@
(function ($) {
$('#djDebug a.djDebugToggle').on('click', function(e) {
e.preventDefault();
$(this).parent().find('.djDebugCollapsed').toggle();
$(this).parent().find('.djDebugUncollapsed').toggle();
});
})(djdt.jQuery);

@ -1,11 +0,0 @@
(function ($) {
var uarr = String.fromCharCode(0x25b6),
darr = String.fromCharCode(0x25bc);
$('a.djTemplateShowContext').on('click', function() {
var arrow = $(this).children('.toggleArrow');
arrow.html(arrow.html() == uarr ? darr : uarr);
$(this).parent().next().toggle();
return false;
});
})(djdt.jQuery);

@ -1,48 +0,0 @@
(function ($) {
// Browser timing remains hidden unless we can successfully access the performance object
var perf = window.performance || window.msPerformance ||
window.webkitPerformance || window.mozPerformance;
if (!perf)
return;
var rowCount = 0,
timingOffset = perf.timing.navigationStart,
timingEnd = perf.timing.loadEventEnd,
totalTime = timingEnd - timingOffset;
function getLeft(stat) {
return ((perf.timing[stat] - timingOffset) / (totalTime)) * 100.0;
}
function getCSSWidth(stat, endStat) {
var width = ((perf.timing[endStat] - perf.timing[stat]) / (totalTime)) * 100.0;
// Calculate relative percent (same as sql panel logic)
width = 100.0 * width / (100.0 - getLeft(stat));
return (width < 1) ? "2px" : width + "%";
}
function addRow(stat, endStat) {
rowCount++;
var $row = $('<tr class="' + ((rowCount % 2) ? 'djDebugOdd' : 'djDebugEven') + '"></tr>');
if (endStat) {
// Render a start through end bar
$row.html('<td>' + stat.replace('Start', '') + '</td>' +
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart" style="left:' + getLeft(stat) + '%;"><strong style="width:' + getCSSWidth(stat, endStat) + ';">&nbsp;</strong></div></div></td>' +
'<td>' + (perf.timing[stat] - timingOffset) + ' (+' + (perf.timing[endStat] - perf.timing[stat]) + ')</td>');
} else {
// Render a point in time
$row.html('<td>' + stat + '</td>' +
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart" style="left:' + getLeft(stat) + '%;"><strong style="width:2px;">&nbsp;</strong></div></div></td>' +
'<td>' + (perf.timing[stat] - timingOffset) + '</td>');
}
$('#djDebugBrowserTimingTableBody').append($row);
}
// This is a reasonably complete and ordered set of timing periods (2 params) and events (1 param)
addRow('domainLookupStart', 'domainLookupEnd');
addRow('connectStart', 'connectEnd');
addRow('requestStart', 'responseEnd'); // There is no requestEnd
addRow('responseStart', 'responseEnd');
addRow('domLoading', 'domComplete'); // Spans the events below
addRow('domInteractive');
addRow('domContentLoadedEventStart', 'domContentLoadedEventEnd');
addRow('loadEventStart', 'loadEventEnd');
$('#djDebugBrowserTiming').css("display", "block");
})(djdt.jQuery);

@ -21,7 +21,7 @@
{% endblocktrans %}{% if expo.place %} {% endblocktrans %}{% if expo.place %}
{% blocktrans with name=expo.place.name url=expo.place.url %}Как добраться до выставочного центра {{ name }} можно {% blocktrans with name=expo.place.name url=expo.place.url %}Как добраться до выставочного центра {{ name }} можно
посмотреть посмотреть
<a href="/places/{{ url }}">здесь</a>.{% endblocktrans %} <a href="/places/{{ url }}/">здесь</a>.{% endblocktrans %}
{% endif %} {% endif %}
{% blocktrans with name=expo.name %} {% blocktrans with name=expo.name %}
Не забудьте проверить место и даты выставки на официальном сайте и в календаре выставочного комплекса. Не забудьте проверить место и даты выставки на официальном сайте и в календаре выставочного комплекса.

@ -90,7 +90,7 @@
<a class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a> <a class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a>
{% endif %} {% endif %}
{% if exposition.photogallery %} {% if exposition.photogallery_id %}
<a class="button blue icon-photo" href="{{ exposition.get_permanent_url }}photo/">{% trans 'фото' %}</a> <a class="button blue icon-photo" href="{{ exposition.get_permanent_url }}photo/">{% trans 'фото' %}</a>
{% endif %} {% endif %}
</div> </div>

@ -94,7 +94,7 @@
{% if request.user.is_admin %} {% if request.user.is_admin %}
<a target="_blank" class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a> <a target="_blank" class="button green " href="/admin/exposition/{{ object.url }}/">{% trans 'изменить' %}</a>
{% endif %} {% endif %}
{% if exposition.photogallery %} {% if exposition.photogallery_id %}
<a class="button blue icon-photo" href="{{ exposition.get_permanent_url }}photo/">{% trans 'фото' %}</a> <a class="button blue icon-photo" href="{{ exposition.get_permanent_url }}photo/">{% trans 'фото' %}</a>
{% endif %} {% endif %}
@ -105,7 +105,7 @@
<div class="i-divs clearfix"> <div class="i-divs clearfix">
<div class="i-subj"> <div class="i-subj">
<ul> <ul>
{% with themes=exposition.theme.all %} {% with themes=exposition.themes %}
{% for theme in themes %} {% for theme in themes %}
<li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.expositions_number }})</a></li> <li><a href="{{ object.catalog }}theme/{{ theme.url }}/">{{ theme.name }} ({{ theme.expositions_number }})</a></li>
{% endfor %} {% endfor %}
@ -113,7 +113,7 @@
</ul> </ul>
</div> </div>
<div class="i-tags"> <div class="i-tags">
{% with tags=exposition.tag.all %} {% with tags=exposition.tags %}
{% for tag in tags %} {% for tag in tags %}
<a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %} <a href="{{ object.catalog }}tag/{{ tag.url }}/">{{ tag.name }}</a>{% if forloop.counter != tags|length %},{% endif %}
{% endfor %} {% endfor %}

@ -45,7 +45,7 @@
</div> </div>
</div> </div>
<div class="re-tags"> <div class="re-tags">
{% with tags=event.tag.all %} {% with tags=event.tags %}
{% for tag in tags %} {% for tag in tags %}
<a href="{{ event.get_catalog_url }}tag/{{ tag.url }}">{{ tag }}</a>{% if forloop.counter < tags|length %},{% endif %} <a href="{{ event.get_catalog_url }}tag/{{ tag.url }}">{{ tag }}</a>{% if forloop.counter < tags|length %},{% endif %}
{% endfor %} {% endfor %}

@ -1,70 +0,0 @@
{% load i18n %}{% load static from staticfiles %}{% load url from future %}
<style type="text/css">
@media print { #djDebug {display:none;}}
</style>
<link rel="stylesheet" href="{% static 'debug_toolbar/css/toolbar.css' %}" type="text/css" />
{% if toolbar.config.JQUERY_URL %}
<!-- Prevent our copy of jQuery from registering as an AMD module on sites that use RequireJS. -->
<script>var _djdt_define_backup = window.define; window.define = undefined;</script>
<script src="{{ toolbar.config.JQUERY_URL }}"></script>
<script>var djdt = {jQuery: jQuery.noConflict(true)}; window.define = _djdt_define_backup;</script>
{% else %}
<script>var djdt = {jQuery: jQuery};</script>
{% endif %}
<script src="{% static 'debug_toolbar/js/toolbar.js' %}"></script>
<div id="djDebug" style="display:none;" dir="ltr"
data-store-id="{{ toolbar.store_id }}" data-render-panel-url="{% url 'djdt:render_panel' %}"
{{ toolbar.config.ROOT_TAG_EXTRA_ATTRS|safe }}>
<div style="display:none;" id="djDebugToolbar">
<ul id="djDebugPanelList">
{% if toolbar.panels %}
<li><a id="djHideToolBarButton" href="#" title="{% trans "Hide toolbar" %}">{% trans "Hide" %} &#187;</a></li>
{% else %}
<li id="djDebugButton">DEBUG</li>
{% endif %}
{% for panel in toolbar.panels %}
<li class="djDebugPanelButton">
<input type="checkbox" data-cookie="djdt{{ panel.panel_id }}" {% if panel.enabled %}checked="checked" title="{% trans "Disable for next and successive requests" %}"{% else %}title="{% trans "Enable for next and successive requests" %}"{% endif %} />
{% if panel.has_content and panel.enabled %}
<a href="#" title="{{ panel.title }}" class="{{ panel.panel_id }}">
{% else %}
<div class="djdt-contentless{% if not panel.enabled %} djdt-disabled{% endif %}">
{% endif %}
{{ panel.nav_title }}
{% if panel.enabled %}
{% with panel.nav_subtitle as subtitle %}
{% if subtitle %}<br /><small>{{ subtitle }}</small>{% endif %}
{% endwith %}
{% endif %}
{% if panel.has_content and panel.enabled %}
</a>
{% else %}
</div>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<div style="display:none;" id="djDebugToolbarHandle">
<span title="{% trans "Show toolbar" %}" id="djShowToolBarButton">&#171;</span>
</div>
{% for panel in toolbar.panels %}
{% if panel.has_content and panel.enabled %}
<div id="{{ panel.panel_id }}" class="djdt-panelContent">
<div class="djDebugPanelTitle">
<a href="" class="djDebugClose"></a>
<h3>{{ panel.title|safe }}</h3>
</div>
<div class="djDebugPanelContent">
{% if toolbar.store_id %}
<img src="{% static 'debug_toolbar/img/ajax-loader.gif' %}" alt="loading" class="djdt-loader" />
<div class="djdt-scroll"></div>
{% else %}
<div class="djdt-scroll">{{ panel.content }}</div>
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
<div id="djDebugWindow" class="djdt-panelContent"></div>
</div>

@ -1,69 +0,0 @@
{% load i18n %}
<h4>{% trans "Summary" %}</h4>
<table>
<thead>
<tr>
<th>{% trans "Total calls" %}</th>
<th>{% trans "Total time" %}</th>
<th>{% trans "Cache hits" %}</th>
<th>{% trans "Cache misses" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ total_calls }}</td>
<td>{{ total_time }} ms</td>
<td>{{ hits }}</td>
<td>{{ misses }}</td>
</tr>
</tbody>
</table>
<h4>{% trans "Commands" %}</h4>
<table>
<thead>
<tr>
{% for name in counts.keys %}
<th>{{ name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
{% for value in counts.values %}
<td>{{ value }}</td>
{% endfor %}
</tr>
</tbody>
</table>
{% if calls %}
<h4>{% trans "Calls" %}</h4>
<table>
<thead>
<tr>
<th colspan="2">{% trans "Time (ms)" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Arguments" %}</th>
<th>{% trans "Keyword arguments" %}</th>
<th>{% trans "Backend" %}</th>
</tr>
</thead>
<tbody>
{% for call in calls %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}" id="cacheMain_{{ forloop.counter }}">
<td class="djdt-toggle">
<a class="djToggleSwitch" data-toggle-name="cacheMain" data-toggle-id="{{ forloop.counter }}" data-toggle-open="+" data-toggle-close="-" href="javascript:void(0)">+</a>
</td>
<td>{{ call.time|floatformat:"4" }}</td>
<td>{{ call.name|escape }}</td>
<td>{{ call.args|escape }}</td>
<td>{{ call.kwargs|escape }}</td>
<td>{{ call.backend }}</td>
</tr>
<tr class="djUnselected djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %} djToggleDetails_{{ forloop.counter }}" id="cacheDetails_{{ forloop.counter }}">
<td colspan="1"></td>
<td colspan="5"><pre class="djdt-stack">{{ call.trace }}</pre></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}

@ -1,60 +0,0 @@
{% load i18n %}
<h4>{% trans "Request headers" %}</h4>
<table>
<thead>
<tr>
<th>{% trans "Key" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in request_headers.items %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans "Response headers" %}</h4>
<table>
<thead>
<tr>
<th>{% trans "Key" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in response_headers.items %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h4>{% trans "WSGI environ" %}</h4>
<p>{% trans "Since the WSGI environ inherits the environment of the server, only a significant subset is shown below." %}</p>
<table>
<thead>
<tr>
<th>{% trans "Key" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in environ.items %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>

@ -1,28 +0,0 @@
{% load i18n %}
{% if records %}
<table>
<thead>
<tr>
<th>{% trans "Level" %}</th>
<th>{% trans "Time" %}</th>
<th>{% trans "Channel" %}</th>
<th>{% trans "Message" %}</th>
<th>{% trans "Location" %}</th>
</tr>
</thead>
<tbody>
{% for record in records %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ record.level }}</td>
<td>{{ record.time|date:"h:i:s m/d/Y" }}</td>
<td>{{ record.channel|default:"-" }}</td>
<td>{{ record.message|linebreaksbr }}</td>
<td>{{ record.file }}:{{ record.line }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>{% trans "No messages logged" %}.</p>
{% endif %}

@ -1,37 +0,0 @@
{% load i18n %}{% load static from staticfiles %}
<table width="100%">
<thead>
<tr>
<th>{% trans "Call" %}</th>
<th>{% trans "CumTime" %}</th>
<th>{% trans "Per" %}</th>
<th>{% trans "TotTime" %}</th>
<th>{% trans "Per" %}</th>
<th>{% trans "Count" %}</th>
</tr>
</thead>
<tbody>
{% for call in func_list %}
<!-- style="background:{{ call.background }}" -->
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %} djDebugProfileRow{% for parent_id in call.parent_ids %} djToggleDetails_{{ parent_id }}{% endfor %}" depth="{{ call.depth }}">
<td>
<div style="padding-left: {{ call.indent }}px;">
{% if call.has_subfuncs %}
<a class="djProfileToggleDetails djToggleSwitch" data-toggle-id="{{ call.id }}" data-toggle-open="+" data-toggle-close="-" href="javascript:void(0)">-</a>
{% else %}
<span class="djNoToggleSwitch"></span>
{% endif %}
<span class="djdt-stack">{{ call.func_std_string }}</span>
</div>
</td>
<td>{{ call.cumtime|floatformat:3 }}</td>
<td>{{ call.cumtime_per_call|floatformat:3 }}</td>
<td>{{ call.tottime|floatformat:3 }}</td>
<td>{{ call.tottime_per_call|floatformat:3 }}</td>
<td>{{ call.count }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<script src="{% static 'debug_toolbar/js/toolbar.profiling.js' %}"></script>

@ -1,124 +0,0 @@
{% load i18n %}
<h4>{% trans "View information" %}</h4>
<table>
<thead>
<tr>
<th>{% trans "View function" %}</th>
<th>{% trans "Arguments" %}</th>
<th>{% trans "Keyword arguments" %}</th>
<th>{% trans "URL name" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="djDebugOdd"><code>{{ view_func }}</code></td>
<td class="djDebugEven"><code>{{ view_args|pprint }}</code></td>
<td class="djDebugOdd"><code>{{ view_kwargs|pprint }}</code></td>
<td class="djDebugEven"><code>{{ view_urlname }}</code></td>
</tr>
</tbody>
</table>
{% if cookies %}
<h4>{% trans "Cookies" %}</h4>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgroup>
<thead>
<tr>
<th>{% trans "Variable" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in cookies %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td><code>{{ key|pprint }}</code></td>
<td><code>{{ value|pprint }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>{% trans "No cookies" %}</h4>
{% endif %}
{% if session %}
<h4>{% trans "Session data" %}</h4>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgroup>
<thead>
<tr>
<th>{% trans "Variable" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in session %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td><code>{{ key|pprint }}</code></td>
<td><code>{{ value|pprint }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>{% trans "No session data" %}</h4>
{% endif %}
{% if get %}
<h4>{% trans "GET data" %}</h4>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgroup>
<thead>
<tr>
<th>{% trans "Variable" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in get %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td><code>{{ key|pprint }}</code></td>
<td><code>{{ value|pprint }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>{% trans "No GET data" %}</h4>
{% endif %}
{% if post %}
<h4>{% trans "POST data" %}</h4>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgr
<tr>
<th>{% trans "Variable" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in post %}
<tr class="{% cycle 'row1' 'row2' %}">
<td><code>{{ key|pprint }}</code></td>
<td><code>{{ value|pprint }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<h4>{% trans "No POST data" %}</h4>
{% endif %}

@ -1,17 +0,0 @@
{% load i18n %}
<table>
<thead>
<tr>
<th>{% trans "Setting" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for name, value in settings.items %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ name }}</td>
<td><code>{{ value|pprint }}</code></td>
</tr>
{% endfor %}
</tbody>
</table>

@ -1,19 +0,0 @@
{% load i18n %}
<table>
<thead>
<tr>
<th>{% trans "Signal" %}</th>
<th>{% trans "Providing" %}</th>
<th>{% trans "Receivers" %}</th>
</tr>
</thead>
<tbody>
{% for name, signal, receivers in signals %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ name|escape }}</td>
<td>{{ signal.providing_args|join:", " }}</td>
<td>{{ receivers|join:", " }}</td>
</tr>
{% endfor %}
</tbody>
</table>

@ -1,95 +0,0 @@
{% load i18n l10n %}{% load static from staticfiles %}{% load url from future %}
<div class="djdt-clearfix">
<ul class="djdt-stats">
{% for alias, info in databases %}
<li>
<strong class="djdt-label"><span style="background-color: rgb({{ info.rgb_color|join:", " }})" class="djdt-color">&#160;</span> {{ alias }}</strong>
<span class="djdt-info">{{ info.time_spent|floatformat:"2" }} ms ({% blocktrans count info.num_queries as num %}{{ num }} query{% plural %}{{ num }} queries{% endblocktrans %})</span>
</li>
{% endfor %}
</ul>
</div>
{% if queries %}
<table>
<thead>
<tr>
<th class="djdt-color">&#160;</th>
<th class="query" colspan="2">{% trans "Query" %}</th>
<th class="timeline">{% trans "Timeline" %}</th>
<th class="djdt-time">{% trans "Time (ms)" %}</th>
<th class="djdt-actions">{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for query in queries %}
<tr class="djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %}{% if query.starts_trans %} djDebugStartTransaction{% endif %}{% if query.ends_trans %} djDebugEndTransaction{% endif %}{% if query.in_trans %} djDebugInTransaction{% endif %}" id="sqlMain_{{ forloop.counter }}">
<td class="djdt-color"><span style="background-color: rgb({{ query.rgb_color|join:", " }});">&#160;</span></td>
<td class="djdt-toggle">
<a class="djToggleSwitch" data-toggle-name="sqlMain" data-toggle-id="{{ forloop.counter }}" data-toggle-open="+" data-toggle-close="-" href="javascript:void(0)">+</a>
</td>
<td class="query">
<div class="djDebugSqlWrap">
<div class="djDebugSql">{{ query.sql|safe }}</div>
</div>
</td>
<td class="timeline">
<div class="djDebugTimeline"><div class="djDebugLineChart{% if query.is_slow %} djDebugLineChartWarning{% endif %}" style="left:{{ query.start_offset|unlocalize }}%;"><strong style="width:{{ query.width_ratio_relative|unlocalize }}%; background-color:{{ query.trace_color }};">{{ query.width_ratio }}%</strong></div></div>
</td>
<td class="djdt-time">
{{ query.duration|floatformat:"2" }}
</td>
<td class="djdt-actions">
{% if query.params %}
{% if query.is_select %}
<form method="post">
{{ query.form }}
<button formaction="{% url 'djdt:sql_select' %}" class="remoteCall">Sel</button>
<button formaction="{% url 'djdt:sql_explain' %}" class="remoteCall">Expl</button>
{% if query.vendor == 'mysql' %}
<button formaction="{% url 'djdt:sql_profile' %}" class="remoteCall">Prof</button>
{% endif %}
</form>
{% endif %}
{% endif %}
</td>
</tr>
<tr class="djUnselected djDebugHoverable {% cycle 'djDebugOdd' 'djDebugEven' %}{% if query.is_slow %} djDebugRowWarning{% endif %} djToggleDetails_{{ forloop.counter }}" id="sqlDetails_{{ forloop.counter }}">
<td colspan="2"></td>
<td colspan="4">
<div class="djSQLDetailsDiv">
<p><strong>{% trans "Connection:" %}</strong> {{ query.alias }}</p>
{% if query.iso_level %}
<p><strong>{% trans "Isolation level:" %}</strong> {{ query.iso_level }}</p>
{% endif %}
{% if query.trans_status %}
<p><strong>{% trans "Transaction status:" %}</strong> {{ query.trans_status }}</p>
{% endif %}
{% if query.stacktrace %}
<pre class="djdt-stack">{{ query.stacktrace }}</pre>
{% endif %}
{% if query.template_info %}
<table>
{% for line in query.template_info.context %}
<tr>
<td>{{ line.num }}</td>
<td><code style="font-family: monospace;{% if line.highlight %}background-color: lightgrey{% endif %}">{{ line.content }}</code></td>
</tr>
{% endfor %}
</table>
<p><strong>{{ query.template_info.name|default:_("(unknown)") }}</strong></p>
{% endif %}
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>{% trans "No SQL queries were recorded during this request." %}</p>
{% endif %}
<script src="{% static 'debug_toolbar/js/toolbar.sql.js' %}"></script>

@ -1,37 +0,0 @@
{% load i18n %}{% load static from staticfiles %}
<div class="djDebugPanelTitle">
<a class="djDebugClose djDebugBack" href=""></a>
<h3>{% trans "SQL explained" %}</h3>
</div>
<div class="djDebugPanelContent">
<div class="djdt-scroll">
<dl>
<dt>{% trans "Executed SQL" %}</dt>
<dd>{{ sql|safe }}</dd>
<dt>{% trans "Time" %}</dt>
<dd>{{ duration }} ms</dd>
<dt>{% trans "Database" %}</dt>
<dd>{{ alias }}</dd>
</dl>
<table class="djSqlExplain">
<thead>
<tr>
{% for h in headers %}
<th>{{ h|upper }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in result %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<script src="{% static 'debug_toolbar/js/toolbar.sql.js' %}"></script>

@ -1,44 +0,0 @@
{% load i18n %}{% load static from staticfiles %}
<div class="djDebugPanelTitle">
<a class="djDebugClose djDebugBack" href=""></a>
<h3>{% trans "SQL profiled" %}</h3>
</div>
<div class="djDebugPanelContent">
<div class="djdt-scroll">
{% if result %}
<dl>
<dt>{% trans "Executed SQL" %}</dt>
<dd>{{ sql|safe }}</dd>
<dt>{% trans "Time" %}</dt>
<dd>{{ duration }} ms</dd>
<dt>{% trans "Database" %}</dt>
<dd>{{ alias }}</dd>
</dl>
<table class="djSqlProfile">
<thead>
<tr>
{% for h in headers %}
<th>{{ h|upper }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in result %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<dl>
<dt>{% trans "Error" %}</dt>
<dd>{{ result_error }}</dd>
</dl>
{% endif %}
</div>
</div>
<script src="{% static 'debug_toolbar/js/toolbar.sql.js' %}"></script>

@ -1,41 +0,0 @@
{% load i18n %}{% load static from staticfiles %}
<div class="djDebugPanelTitle">
<a class="djDebugClose djDebugBack" href=""></a>
<h3>{% trans "SQL selected" %}</h3>
</div>
<div class="djDebugPanelContent">
<div class="djdt-scroll">
<dl>
<dt>{% trans "Executed SQL" %}</dt>
<dd>{{ sql|safe }}</dd>
<dt>{% trans "Time" %}</dt>
<dd>{{ duration }} ms</dd>
<dt>{% trans "Database" %}</dt>
<dd>{{ alias }}</dd>
</dl>
{% if result %}
<table class="djSqlSelect">
<thead>
<tr>
{% for h in headers %}
<th>{{ h|upper }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in result %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
{% for column in row %}
<td>{{ column|escape }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>{% trans "Empty set" %}</p>
{% endif %}
</div>
</div>
<script src="{% static 'debug_toolbar/js/toolbar.sql.js' %}"></script>

@ -1,57 +0,0 @@
{% load i18n %}
{% load static from staticfiles%}
<h4>{% blocktrans count staticfiles_dirs|length as dirs_count %}Static file path{% plural %}Static file paths{% endblocktrans %}</h4>
{% if staticfiles_dirs %}
<ol>
{% for prefix, staticfiles_dir in staticfiles_dirs %}
<li>{{ staticfiles_dir }}{% if prefix %} {% blocktrans %}(prefix {{ prefix }}){% endblocktrans %}{% endif %}</li>
{% endfor %}
</ol>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}
<h4>{% blocktrans count staticfiles_apps|length as apps_count %}Static file app{% plural %}Static file apps{% endblocktrans %}</h4>
{% if staticfiles_apps %}
<ol>
{% for static_app in staticfiles_apps %}
<li>{{ static_app }}</li>
{% endfor %}
</ol>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}
<h4>{% blocktrans count staticfiles|length as staticfiles_count %}Static file{% plural %}Static files{% endblocktrans %}</h4>
{% if staticfiles %}
<dl>
{% for staticfile in staticfiles %}
<dt><strong><a class="toggleTemplate" href="{{ staticfile.url }}">{{ staticfile }}</a></strong></dt>
<dd><samp>{{ staticfile.real_path }}</samp></dd>
{% endfor %}
</dl>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}
{% for finder, payload in staticfiles_finders.items %}
<h4>{{ finder }} ({% blocktrans count payload|length as payload_count %}{{ payload_count }} file{% plural %}{{ payload_count }} files{% endblocktrans %})</h4>
<table>
<thead>
<tr>
<th>{% trans 'Path' %}</th>
<th>{% trans 'Location' %}</th>
</tr>
</thead>
<tbody>
{% for path, real_path in payload %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ path }}</td>
<td>{{ real_path }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}

@ -1,14 +0,0 @@
{% load i18n %}
<div class="djDebugPanelTitle">
<a class="djDebugClose djDebugBack" href=""></a>
<h3>{% trans "Template source:" %} <code>{{ template_name }}</code></h3>
</div>
<div class="djDebugPanelContent">
<div class="djdt-scroll">
{% if not source.pygmentized %}
<code>{{ source }}</code>
{% else %}
{{ source }}
{% endif %}
</div>
</div>

@ -1,46 +0,0 @@
{% load i18n %}{% load static from staticfiles %}{% load url from future %}
<h4>{% blocktrans count template_dirs|length as template_count %}Template path{% plural %}Template paths{% endblocktrans %}</h4>
{% if template_dirs %}
<ol>
{% for template in template_dirs %}
<li>{{ template }}</li>
{% endfor %}
</ol>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}
<h4>{% blocktrans count templates|length as template_count %}Template{% plural %}Templates{% endblocktrans %}</h4>
{% if templates %}
<dl>
{% for template in templates %}
<dt><strong><a class="remoteCall toggleTemplate" href="{% url 'djdt:template_source' %}?template={{ template.template.name }}">{{ template.template.name|addslashes }}</a></strong></dt>
<dd><samp>{{ template.template.origin_name|addslashes }}</samp></dd>
{% if template.context %}
<dd>
<div class="djTemplateShowContextDiv"><a class="djTemplateShowContext"><span class="toggleArrow">&#x25B6;</span> {% trans "Toggle context" %}</a></div>
<div class="djTemplateHideContextDiv" style="display:none;"><code>{{ template.context }}</code></div>
</dd>
{% endif %}
{% endfor %}
</dl>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}
<h4>{% blocktrans count context_processors|length as context_processors_count %}Context processor{% plural %}Context processors{% endblocktrans %}</h4>
{% if context_processors %}
<dl>
{% for key, value in context_processors.items %}
<dt><strong>{{ key|escape }}</strong></dt>
<dd>
<div class="djTemplateShowContextDiv"><a class="djTemplateShowContext"><span class="toggleArrow">&#x25B6;</span> {% trans "Toggle context" %}</a></div>
<div class="djTemplateHideContextDiv" style="display:none;"><code>{{ value|escape }}</code></div>
</dd>
{% endfor %}
</dl>
{% else %}
<p>{% trans "None" %}</p>
{% endif %}
<script src="{% static 'debug_toolbar/js/toolbar.template.js' %}"></script>

@ -1,44 +0,0 @@
{% load i18n %}{% load static from staticfiles %}
<h4>{% trans "Resource usage" %}</h4>
<table>
<colgroup>
<col style="width:20%"/>
<col/>
</colgroup>
<thead>
<tr>
<th>{% trans "Resource" %}</th>
<th>{% trans "Value" %}</th>
</tr>
</thead>
<tbody>
{% for key, value in rows %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ key|escape }}</td>
<td>{{ value|escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- This hidden div is populated and displayed by code in toolbar.timer.js -->
<div id="djDebugBrowserTiming" style="display:none">
<h4>{% trans "Browser timing" %}</h4>
<table>
<colgroup>
<col style="width:20%"/>
<col style="width:60%"/>
<col style="width:20%"/>
</colgroup>
<thead>
<tr>
<th>{% trans "Timing attribute" %}</th>
<th class="timeline">{% trans "Timeline" %}</th>
<th class="djdt-time">{% trans "Milliseconds since navigation start (+length)" %}</th>
</tr>
</thead>
<tbody id="djDebugBrowserTimingTableBody">
</tbody>
</table>
</div>
<script src="{% static 'debug_toolbar/js/toolbar.timer.js' %}"></script>

@ -1,17 +0,0 @@
{% load i18n %}
<table>
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Version" %}</th>
</tr>
</thead>
<tbody>
{% for package, version in versions.items %}
<tr class="{% cycle 'djDebugOdd' 'djDebugEven' %}">
<td>{{ package }}</td>
<td>{{ version }}</td>
</tr>
{% endfor %}
</tbody>
</table>

@ -1,16 +0,0 @@
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>{{ status_line }}</h1>
<h2>{% trans "Location:" %} <a id="redirect_to" href="{{ redirect_to }}">{{ redirect_to }}</a></h2>
<p class="notice">
{% trans "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal." %}
</p>
<script type="text/javascript">
document.getElementById('redirect_to').focus();
</script>
</body>
</html>

@ -38,23 +38,7 @@ class ThemeActiveManager(TranslationManager):
themes = list(self.language().filter(id__in=themes_id)) themes = list(self.language().filter(id__in=themes_id))
cache.set(key, themes, 300) cache.set(key, themes, 300)
return themes return themes
"""
def expo_themes_with_count(self):
lang = translation.get_language()
key = 'used_expo_themes_count_%s'%lang
cached_themes = cache.get(key)
if cached_themes:
return cached_themes
else:
from exposition.models import Exposition
sql = {'expo_count': 'SELECT COUNT(*) FROM exposition_exposition_theme WHERE exposition_exposition_theme.theme_id = theme_theme.id'}
# id of unique cities
themes_id = [item['theme'] for item in Exposition.objects.values('theme').distinct()]
themes = list(self.language().filter(id__in=themes_id).extra(select=sql))
cache.set(key, themes, 300)
return themes
"""
def expo_themes_with_count(self): def expo_themes_with_count(self):
lang = translation.get_language() lang = translation.get_language()
key = 'used_expo_themes_count_%s'%lang key = 'used_expo_themes_count_%s'%lang
@ -118,10 +102,9 @@ class TagActiveManager(TranslationManager):
cache.set(key, tags, 300) cache.set(key, tags, 300)
return tags return tags
def conference_tags(self): def conference_tags(self):
lang = translation.get_language() lang = translation.get_language()
key = 'used_conference_tags_count_%s'%lang key = 'used_conference_tags_%s'%lang
cached_tags = cache.get(key) cached_tags = cache.get(key)
if cached_tags: if cached_tags:
return cached_tags return cached_tags

@ -14,7 +14,6 @@ from functions.models_methods import ExpoManager
from manager import TagActiveManager, ThemeActiveManager from manager import TagActiveManager, ThemeActiveManager
class Theme(TranslatableModel): class Theme(TranslatableModel):
""" """
Create Theme model Create Theme model

Loading…
Cancel
Save