diff --git a/conference/urls.py b/conference/urls.py index f4cc71b7..a6b812a4 100644 --- a/conference/urls.py +++ b/conference/urls.py @@ -3,10 +3,10 @@ from django.conf.urls import patterns, include, url from views import ConferenceView urlpatterns = patterns('', - url(r'conferences/(?P.*)/(?P\d+)/$', ConferenceView.as_view()), - url(r'conferences/(?P\d+)/$', ConferenceView.as_view()), - url(r'conferences/(?P.*)/$', ConferenceView.as_view()), - url(r'conferences/$', ConferenceView.as_view()), + url(r'conference/(?P.*)/(?P\d+)/$', ConferenceView.as_view()), + url(r'conference/(?P\d+)/$', ConferenceView.as_view()), + url(r'conference/(?P.*)/$', ConferenceView.as_view()), + url(r'conference/$', ConferenceView.as_view()), # url(r'conference-add-calendar/(?P\d+)/$', 'conference.views.conference_add_calendar'), url(r'conference-remove-calendar/(?P\d+)/$', 'conference.views.conference_remove_calendar'), diff --git a/exposition/forms.py b/exposition/forms.py index 289e2523..d3c0bd3e 100644 --- a/exposition/forms.py +++ b/exposition/forms.py @@ -44,7 +44,7 @@ class ExpositionCreateForm(forms.Form): currencies = [(item, item) for item in CURRENCY] data_begin = forms.DateField(label=u'Дата начала', input_formats=['%Y-%m-%d', '%d.%m.%Y']) - data_end = forms.DateField(label=u'Дата окночания', input_formats=['%Y-%m-%d', '%d.%m.%Y']) + data_end = forms.DateField(label=u'Дата окончания', input_formats=['%Y-%m-%d', '%d.%m.%Y']) logo = forms.ImageField(label='Logo', required=False) organiser = forms.MultipleChoiceField(label=u'Организаторы', required=False, @@ -77,8 +77,8 @@ class ExpositionCreateForm(forms.Form): widget=forms.CheckboxSelectMultiple()) # currency = forms.ChoiceField(label=u'Валюта', choices=currencies, required=False) - application_deadline = forms.DateField(label=u'Срок подачи стэнда', required=False) - min_stand_size = forms.CharField(label=u'Минимальный размер стэнда', required=False) + application_deadline = forms.DateField(label=u'Срок подачи стенда', required=False) + min_stand_size = forms.CharField(label=u'Минимальный размер стенда', required=False) #price_day = forms.CharField(label=u'Цена за 1 день', required=False) #price_all = forms.CharField(label=u'Цена за все дни', required=False) diff --git a/proj/views.py b/proj/views.py index 512e0690..78be8e2e 100644 --- a/proj/views.py +++ b/proj/views.py @@ -38,12 +38,12 @@ class MainPageView(TemplateView): exposition_themes = Theme.objects.order_by('-main_page').filter(types=Theme.types.exposition)[:6] conference_themes = Theme.objects.order_by('-main_page').filter(types=Theme.types.conference)[:6] seminar_themes = Theme.objects.order_by('-main_page').filter(types=Theme.types.seminar)[:6] - news_list = News.objects.order_by('-main_page').all()[:3] - articles = Article.objects.order_by('-main_page').all()[:2] + news_list = Article.objects.news().filter(main_page=1) + blogs = Article.objects.blogs().filter(main_page=1) args = {'events': events, 'exposition_themes': exposition_themes, 'conference_themes': conference_themes, 'seminar_themes': seminar_themes, - 'news_list': news_list, 'articles': articles, 'search_form': EventSearchForm, + 'news_list': news_list, 'blogs': blogs, 'search_form': EventSearchForm, 'search_action': '/events/search/'} diff --git a/templates/admin/exposition/exposition.html b/templates/admin/exposition/exposition.html index 54d57c7b..c6543b7a 100644 --- a/templates/admin/exposition/exposition.html +++ b/templates/admin/exposition/exposition.html @@ -452,7 +452,7 @@ Добавить program {% else %} -

Деловую программу можна добавлять только после введения основных даных

+

Деловую программу можно добавлять только после введения основных данных

{% endif %} @@ -580,7 +580,7 @@ {# button that shows modal window with file form #} Добавить файл {% else %} -

Файлы можна добавлять только после введения основных даных

+

Файлы можно добавлять только после введения основных данных

{% endif %} {# this div shows list of files and refreshes when new file added #}
diff --git a/templates/admin/place_exposition/place_exposition.html b/templates/admin/place_exposition/place_exposition.html index a94fed0a..e8566217 100644 --- a/templates/admin/place_exposition/place_exposition.html +++ b/templates/admin/place_exposition/place_exposition.html @@ -221,7 +221,7 @@ {% else %} -

Павилионы можна добавлять только после введения основных даных

+

Павилионы можно добавлять только после введения основных данных

{% endif %}
@@ -333,7 +333,7 @@ {# button that shows modal window with file form #} Добавить файл {% else %} -

Файлы можна добавлять только после введения основных даных

+

Файлы можно добавлять только после введения основных данных

{% endif %} {# this div shows list of files and refreshes when new file added #}
diff --git a/templates/client/blank.html b/templates/client/blank.html index e2e0e81c..b94ab16a 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -75,7 +75,7 @@ This template include basic anf main styles and js files, -->
{% block header %} - {% include 'header.html' %} + {% include 'client/includes/header.html' %} {% endblock %} {% block main_part %} {% endblock %} @@ -99,7 +99,7 @@ This template include basic anf main styles and js files, {% endblock %} {% block footer %} - {% include 'footer.html' %} + {% include 'client/includes/footer.html' %} {% endblock %}
diff --git a/templates/client/includes/article/article_logo.html b/templates/client/includes/article/article_logo.html index 5db40983..13c76e5a 100644 --- a/templates/client/includes/article/article_logo.html +++ b/templates/client/includes/article/article_logo.html @@ -2,7 +2,7 @@ {% load thumbnail %} {% if obj.logo %} - {% thumbnail obj.logo "100x100" crop="center" as im %} + {% thumbnail obj.logo "100x100" as im %} {% endthumbnail %} {% else %} diff --git a/templates/client/includes/article/article_preview.html b/templates/client/includes/article/article_preview.html index 1d7ba514..74637b04 100644 --- a/templates/client/includes/article/article_preview.html +++ b/templates/client/includes/article/article_preview.html @@ -2,7 +2,7 @@ {% load thumbnail %} {% if obj.logo %} - {% thumbnail obj.logo "250x180" crop="center" as im %} + {% thumbnail obj.logo "250x180" as im %} {% endthumbnail %} {% else %} diff --git a/templates/client/includes/article/news_on_main_logo.html b/templates/client/includes/article/news_on_main_logo.html new file mode 100644 index 00000000..f1731671 --- /dev/null +++ b/templates/client/includes/article/news_on_main_logo.html @@ -0,0 +1,10 @@ +{% load static %} +{% load thumbnail %} + +{% if obj.logo %} + {% thumbnail obj.logo "80x80" as im %} + + {% endthumbnail %} +{% else %} + +{% endif %} \ No newline at end of file diff --git a/templates/client/includes/article/news_preview.html b/templates/client/includes/article/news_preview.html index da3d9686..323f860a 100644 --- a/templates/client/includes/article/news_preview.html +++ b/templates/client/includes/article/news_preview.html @@ -2,7 +2,7 @@ {% load thumbnail %} {% if obj.logo %} - {% thumbnail obj.logo "70x70" crop="center" as im %} + {% thumbnail obj.logo "70x70" as im %} {% endthumbnail %} {% else %} diff --git a/templates/client/includes/footer.html b/templates/client/includes/footer.html index dbba911c..60e9b9c9 100644 --- a/templates/client/includes/footer.html +++ b/templates/client/includes/footer.html @@ -5,7 +5,7 @@ @@ -121,26 +95,7 @@
diff --git a/theme/forms.py b/theme/forms.py index 54632b75..b57c75b5 100644 --- a/theme/forms.py +++ b/theme/forms.py @@ -10,6 +10,7 @@ from django.conf import settings from ckeditor.widgets import CKEditorWidget from functions.translate import fill_with_signal from functions.admin_forms import AdminFilterForm +from functions.form_check import translit_with_separator @@ -53,9 +54,13 @@ class ThemeForm(forms.Form): #generates bitfield flag = reduce(lambda x,y: x|y, (getattr(Theme.types, item) for item in data['types'])) theme.types = flag + #theme.save() fill_with_signal(Theme, theme, data) + if not theme.url: + theme.url = translit_with_separator(theme.name) + theme.save()