remotes/origin/1203
Назар Котюк 11 years ago
parent e100d260fe
commit fd1e88573a
  1. 24
      article/urls.py
  2. 6
      article/views.py
  3. 2
      place_exposition/urls.py
  4. 4
      proj/urls.py
  5. 1
      service/urls.py
  6. 36
      settings/management/commands/do_inflect.py
  7. 17
      templates/client/article/blog_list.html
  8. 7
      templates/client/article/catalog.html
  9. 16
      templates/client/includes/article/blog_list.html
  10. 2
      templates/client/includes/article/news_list.html
  11. 1
      templates/client/includes/header.html
  12. 11
      templates/client/index.html
  13. 286
      templates/client/robot.txt
  14. 1
      templates/robot.txt

@ -3,20 +3,20 @@ from django.conf.urls import patterns, url
from views import BlogList, NewsList, BlogDetail, NewsDetail, NewsTagCatalog, BlogsTagCatalog
urlpatterns = patterns('',
url(r'^blogs/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', BlogsTagCatalog.as_view()),
url(r'^blogs/page/(?P<page>\d+)/$', BlogList.as_view()),
url(r'^blogs/tag/(?P<slug>.*)/$', BlogsTagCatalog.as_view()),
url(r'^blogs/$', BlogList.as_view()),
url(r'^blogs/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', BlogsTagCatalog.as_view(), {'meta_id':75}),
url(r'^blogs/page/(?P<page>\d+)/$', BlogList.as_view(), {'meta_id':79}),
url(r'^blogs/tag/(?P<slug>.*)/$', BlogsTagCatalog.as_view(), {'meta_id':75}),
url(r'^blogs/$', BlogList.as_view(), {'meta_id':79}),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', NewsTagCatalog.as_view()),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', NewsTagCatalog.as_view()),
url(r'^news/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', NewsTagCatalog.as_view()),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', NewsTagCatalog.as_view()),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/$', NewsTagCatalog.as_view()),
url(r'^news/tag/(?P<slug>.*)/$', NewsTagCatalog.as_view()),
url(r'^news/page/(?P<page>\d+)/$', NewsList.as_view()),
url(r'^news/$', NewsList.as_view()),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/page/(?P<page>\d+)/$', NewsTagCatalog.as_view(), {'meta_id':77}),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/page/(?P<page>\d+)/$', NewsTagCatalog.as_view(), {'meta_id':76}),
url(r'^news/tag/(?P<slug>.*)/page/(?P<page>\d+)/$', NewsTagCatalog.as_view(), {'meta_id':74}),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/(?P<month>.*)/$', NewsTagCatalog.as_view(), {'meta_id':77}),
url(r'^news/tag/(?P<slug>.*)/(?P<year>\d+)/$', NewsTagCatalog.as_view(), {'meta_id':76}),
url(r'^news/tag/(?P<slug>.*)/$', NewsTagCatalog.as_view(), {'meta_id':74}),
url(r'^news/page/(?P<page>\d+)/$', NewsList.as_view(), {'meta_id':78}),
url(r'^news/$', NewsList.as_view(), {'meta_id':78}),
url(r'^blogs/(?P<slug>.*)/$', BlogDetail.as_view(), {'meta_id':19}),
url(r'^news/(?P<slug>.*)/$', NewsDetail.as_view(), {'meta_id':19}),
)

@ -9,7 +9,7 @@ from meta.views import MetadataMixin
class NewsList(ListView):
class NewsList(MetadataMixin, ListView):
model = Article
template_name = 'article/news_list.html'
paginate_by = 10
@ -59,7 +59,7 @@ class NewsDetail(MetadataMixin, DetailView):
template_name = 'article/news.html'
class BlogList(ListView):
class BlogList(MetadataMixin, ListView):
model = Article
template_name = 'article/blog_list.html'
paginate_by = 10
@ -126,6 +126,7 @@ class NewsTagCatalog(MetadataMixin, ListView):
def get_queryset(self):
slug = self.kwargs.get('slug')
tag = get_object_or_404(Tag, url=slug)
self.kwargs['tag'] = tag
self.filter_object = tag
qs = Article.objects.news().filter(tag=tag)
year = self.kwargs.get('year')
@ -172,6 +173,7 @@ class BlogsTagCatalog(MetadataMixin, ListView):
def get_queryset(self):
slug = self.kwargs.get('slug')
tag = get_object_or_404(Tag, url=slug)
self.kwargs['tag'] = tag
self.filter_object = tag
qs = Article.objects.blogs().filter(tag=tag)
year = self.kwargs.get('year')

@ -15,13 +15,11 @@ urlpatterns = patterns('',
#url(r'expo/city/$', ExpositionByCity.as_view()),
url(r'city/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCityCatalog.as_view(), {'meta_id':48}),
url(r'city/(?P<slug>.*)/$', PlaceCityCatalog.as_view(), {'meta_id':48}),
#!!!
url(r'(?P<slug>.*)/photo/page/(?P<page>\d+)/$', PlacePhoto.as_view()),
url(r'(?P<slug>.*)/photo/$', PlacePhoto.as_view()),
#url(r'expo/(?P<slug>.*)/service/(?P<url>.*)/$', ExpositionServiceView.as_view()),
url(r'page/(?P<page>\d+)/$', PlaceList.as_view(), {'meta_id':46}),
url(r'(?P<slug>.*)/$', PlaceDetail.as_view(), {'meta_id':47}),
url(r'$', PlaceList.as_view(), {'meta_id':46}),
)

@ -44,9 +44,8 @@ urlpatterns = patterns('',
url(r'^', include('password_reset.urls')),
url(r'^i18n/', include('django.conf.urls.i18n')),
#url(r'^social/', include('social_auth.urls')),
# admin part
#url(r'^', include('settings.old_urls')),
url(r'^search/', include('haystack.urls')),
#url(r'^search/', include('haystack.urls')),
url(r'^', include('service.urls')),
)
@ -65,7 +64,6 @@ urlpatterns += patterns('',
url(r'^search-form/autosearch/company/$', 'settings.views.company_autosearch'),
url(r'^', include('settings.old_urls')),
url(r'^', include('accounts.user_catalog_urls')),
)

@ -15,6 +15,5 @@ urlpatterns = patterns('',
url(r'service/com_rek/$', 'service.views.advertise'),
url(r'service/(?P<url>.*)/$', ServiceView.as_view()),
)

@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
import xlrd
from theme.models import Tag, Theme
from city.models import City
CITIES = settings.MEDIA_ROOT+'/import/cities_inflect.xls'
TAGS = settings.MEDIA_ROOT+'/import/tags_inflect.xls'
class Command(BaseCommand):
def handle(self, *args, **options):
f = open(TAGS, 'r')
book = xlrd.open_workbook(file_contents=f.read())
sheet = book.sheet_by_index(0)
row_list = [sheet.row_values(row_number) for row_number in range(sheet.nrows)]
print(row_list[2][0])
for row_number, row in enumerate(row_list[2:]):
url = row[1]
print(url)
inflect = row[3]
if inflect:
Tag.objects.filter(url=url).update(inflect=inflect)
#City.objects.filter(url=url).update(inflect=row[4])
#try:
# city = City.objects.get(id=id)
#except City.DoesNotExist:
# print()

@ -35,22 +35,7 @@
</div>
</form>
</div>
<div class="rq-to-hide">
<div class="s-comments">
<div class="cat-list sc-comments">
{% for blog in object_list %}
<div class="cl-item">
<div class="acticle_list_big">
{% include 'includes/article/article_preview.html' with obj=blog %}
<h3><a href="{{ blog.get_permanent_url }}" title="">{{ blog.main_title }}</a></h3>
{{ blog.preview|safe }}
<strong><span>{{ blog.created|date:"d E Y" }}</span>{% if blog.tag.all.exists %}{% include 'includes/article_tags.html' with obj=blog %}{% endif %}</strong>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% include 'client/includes/article/blog_list.html' with object_list=object_list %}
{% if request.GET.debug == '1' %}
<script src="{% static 'client/js/_modules/block.newsFilter.js' %}"></script>

@ -3,6 +3,7 @@
{% load i18n %}
{% block bread_scrumbs %}
<div class="bread-crumbs">
<a href="/">{% trans 'Главная страница' %}</a>
@ -38,5 +39,9 @@
{% endblock %}
{% block content_list %}
{% include 'client/includes/article/news_list.html' with object_list=object_list %}
{% ifequal catalog_url '/news/tag/' %}
{% include 'client/includes/article/news_list.html' with object_list=object_list %}
{% else %}
{% include 'client/includes/article/blog_list.html' with object_list=object_list %}
{% endifequal %}
{% endblock %}

@ -0,0 +1,16 @@
<div class="rq-to-hide">
<div class="s-comments">
<div class="cat-list sc-comments">
{% for blog in object_list %}
<div class="cl-item">
<div class="acticle_list_big">
{% include 'includes/article/article_preview.html' with obj=blog %}
<h3><a href="{{ blog.get_permanent_url }}" title="">{{ blog.main_title }}</a></h3>
{{ blog.preview|safe }}
<strong><span>{{ blog.created|date:"d E Y" }}</span>{% if blog.tag.all.exists %}{% include 'includes/article_tags.html' with obj=blog %}{% endif %}</strong>
</div>
</div>
{% endfor %}
</div>
</div>
</div>

@ -1,5 +1,3 @@
<div class="rq-to-hide">
<div class="cat-list sc-comments">
{% for news in object_list %}

@ -20,6 +20,7 @@
{% endif %}
<ul class="lang-switch">
{% for lang in LANGUAGES %}
<form style="float:left;" name="setLang{{ lang.1}}" action="/i18n/setlang/" method="POST">{% csrf_token %}

@ -77,10 +77,16 @@
<div class="mcl">
<div class="mp-photo-gallery">
<header class="clearfix">
<div class="pg-title"><a href="#">{% trans 'Фоторепортажи:' %}</a></div>
<h2><a href="#">Edinburgh International Festival 2013</a></h2>
<div class="pg-title"><a target="_blank" href="https://www.youtube.com/channel/UCE2QX9Q8YalEXHwaJoQf0MQ">{% trans ' Видеорепортажи' %}</a></div>
</header>
<div id="mp-photo-gallery" class="photo-gallery swiper-container">
<iframe width="100%" height="363" src="https://www.youtube.com/embed/O_JU21xVlsQ" frameborder="0" allowfullscreen></iframe>
</div>
{% comment %}
<div id="mp-photo-gallery" class="photo-gallery swiper-container">
<ul class="swiper-wrapper">
@ -110,6 +116,7 @@
<a class="next" href="#">&gt;</a>
</div>
</div>
{% endcomment %}
</div>
</div>

@ -1 +1,285 @@
111
User-agent: *
Disallow: /profile/
Disallow: /export/
Disallow: /download/
Disallow: /includes/
Disallow: /pub/
Disallow: /media/
Disallow: /forum/
Disallow: /*?
Disallow: /expo/search/
Disallow: /places/search/
Disallow: /members/search/
Disallow: /members/search/
Disallow: /admin/
Disallow: /theme/
Disallow: /conference/search/
conference/add-note/
conference-add-calendar/
conference-visit/
Disallow: /seminar/
Disallow: /webinar/
Disallow: /company/
Disallow: /photoreports/
Disallow: /country/
Disallow: /city/
Disallow: /organiser/
Disallow: /gallery/
Disallow: /send-to/
Disallow: /messages/
Disallow: /social/
Disallow: /login/
Disallow: /logout/
Disallow: /i18n/
Disallow: /accounts/
Disallow: /search-form/
Disallow: /callback/
Disallow: /register/
Disallow: /register-complete/
Disallow: /registration/reply/
Disallow: /address_book_process.php
Disallow: /account.php
Disallow: /account_edit.php
Disallow: /account_edit_process.php
Disallow: /account_history.php
Disallow: /account_history_info.php
Disallow: /address_book.php
Disallow: /checkout_process.php
Disallow: /advanced_search.php
Disallow: /advanced_search_result.php
Disallow: /checkout_address.php
Disallow: /checkout_confirmation.php
Disallow: /checkout_payment.php
Disallow: /checkout_success.php
Disallow: /contact_us.php
Disallow: /create_account.php
Disallow: /create_account_guest.php
Disallow: /create_account_process.php
Disallow: /create_account_success.php
Disallow: /info_shopping_cart.php
Disallow: /login.php
Disallow: /logoff.php
Disallow: /password_double_opt.php
Disallow: /popup_image.php
Disallow: /popup_search_help.php
Disallow: /privacy.php
Disallow: /product_notifications.php
Disallow: /product_reviews.php
Disallow: /product_reviews_info.php
Disallow: /reviews.php
Disallow: /shipping.php
Disallow: /content.php/coID/61/
Disallow: /content.php/coID/62/
Disallow: /content.php/coID/63/
Disallow: /content.php/coID/64/
Disallow: /reviews_expo.php
Disallow: /serv-hotels.php
Disallow: /vl_box_registration.php
Disallow: /*/catalog/alphabet/
Disallow: /*/catalog/time/
Disallow: /*/conference/time/
Disallow: /*/conference/alphabet/
Disallow: /*/serv-zaoch-info.php
Disallow: /*/serv-int-info.php
Disallow: /*/serv-visit-info.php
Disallow: /*/serv-translator-info.php
Disallow: /*/serv-ad-info.php
Disallow: /*/serv-personal-info.php
Disallow: /*/serv-buildstand-info.php
Disallow: /*/serv-mobilestand-info.php
Disallow: /*/serv-visa-info.php
Disallow: /*/serv-uchastie-info.php
Disallow: /*/serv-catalogue-info.php
Disallow: /*/serv-catalogs-info.php
Sitemap: http://expomap.ru/sitemap.xml
User-agent: Googlebot
Disallow: /profile/
Disallow: /export/
Disallow: /download/
Disallow: /includes/
Disallow: /pub/
Disallow: /media/
Disallow: /forum/
Disallow: /*?
Disallow: /expo/search/
Disallow: /places/search/
Disallow: /members/search/
Disallow: /members/search/
Disallow: /admin/
Disallow: /theme/
Disallow: /conference/search/
conference/add-note/
conference-add-calendar/
conference-visit/
Disallow: /seminar/
Disallow: /webinar/
Disallow: /company/
Disallow: /photoreports/
Disallow: /country/
Disallow: /city/
Disallow: /organiser/
Disallow: /gallery/
Disallow: /send-to/
Disallow: /messages/
Disallow: /social/
Disallow: /login/
Disallow: /logout/
Disallow: /i18n/
Disallow: /accounts/
Disallow: /search-form/
Disallow: /callback/
Disallow: /register/
Disallow: /register-complete/
Disallow: /registration/reply/
Disallow: /address_book_process.php
Disallow: /account.php
Disallow: /account_edit.php
Disallow: /account_edit_process.php
Disallow: /account_history.php
Disallow: /account_history_info.php
Disallow: /address_book.php
Disallow: /checkout_process.php
Disallow: /advanced_search.php
Disallow: /advanced_search_result.php
Disallow: /checkout_address.php
Disallow: /checkout_confirmation.php
Disallow: /checkout_payment.php
Disallow: /checkout_success.php
Disallow: /contact_us.php
Disallow: /create_account.php
Disallow: /create_account_guest.php
Disallow: /create_account_process.php
Disallow: /create_account_success.php
Disallow: /info_shopping_cart.php
Disallow: /login.php
Disallow: /logoff.php
Disallow: /password_double_opt.php
Disallow: /popup_image.php
Disallow: /popup_search_help.php
Disallow: /privacy.php
Disallow: /product_notifications.php
Disallow: /product_reviews.php
Disallow: /product_reviews_info.php
Disallow: /reviews.php
Disallow: /shipping.php
Disallow: /content.php/coID/61/
Disallow: /content.php/coID/62/
Disallow: /content.php/coID/63/
Disallow: /content.php/coID/64/
Disallow: /reviews_expo.php
Disallow: /serv-hotels.php
Disallow: /vl_box_registration.php
Disallow: /*/catalog/alphabet/
Disallow: /*/catalog/time/
Disallow: /*/conference/time/
Disallow: /*/conference/alphabet/
Disallow: /*/serv-zaoch-info.php
Disallow: /*/serv-int-info.php
Disallow: /*/serv-visit-info.php
Disallow: /*/serv-translator-info.php
Disallow: /*/serv-ad-info.php
Disallow: /*/serv-personal-info.php
Disallow: /*/serv-buildstand-info.php
Disallow: /*/serv-mobilestand-info.php
Disallow: /*/serv-visa-info.php
Disallow: /*/serv-uchastie-info.php
Disallow: /*/serv-catalogue-info.php
Disallow: /*/serv-catalogs-info.php
Sitemap: http://expomap.ru/sitemap.xml
User-agent: Yandex
Disallow: /profile/
Disallow: /export/
Disallow: /download/
Disallow: /includes/
Disallow: /pub/
Disallow: /media/
Disallow: /forum/
Disallow: /*?
Disallow: /expo/search/
Disallow: /places/search/
Disallow: /members/search/
Disallow: /members/search/
Disallow: /admin/
Disallow: /theme/
Disallow: /conference/search/
conference/add-note/
conference-add-calendar/
conference-visit/
Disallow: /seminar/
Disallow: /webinar/
Disallow: /company/
Disallow: /photoreports/
Disallow: /country/
Disallow: /city/
Disallow: /organiser/
Disallow: /gallery/
Disallow: /send-to/
Disallow: /messages/
Disallow: /social/
Disallow: /login/
Disallow: /logout/
Disallow: /i18n/
Disallow: /accounts/
Disallow: /search-form/
Disallow: /callback/
Disallow: /register/
Disallow: /register-complete/
Disallow: /registration/reply/
Disallow: /address_book_process.php
Disallow: /account.php
Disallow: /account_edit.php
Disallow: /account_edit_process.php
Disallow: /account_history.php
Disallow: /account_history_info.php
Disallow: /address_book.php
Disallow: /checkout_process.php
Disallow: /advanced_search.php
Disallow: /advanced_search_result.php
Disallow: /checkout_address.php
Disallow: /checkout_confirmation.php
Disallow: /checkout_payment.php
Disallow: /checkout_success.php
Disallow: /contact_us.php
Disallow: /create_account.php
Disallow: /create_account_guest.php
Disallow: /create_account_process.php
Disallow: /create_account_success.php
Disallow: /info_shopping_cart.php
Disallow: /login.php
Disallow: /logoff.php
Disallow: /password_double_opt.php
Disallow: /popup_image.php
Disallow: /popup_search_help.php
Disallow: /privacy.php
Disallow: /product_notifications.php
Disallow: /product_reviews.php
Disallow: /product_reviews_info.php
Disallow: /reviews.php
Disallow: /shipping.php
Disallow: /content.php/coID/61/
Disallow: /content.php/coID/62/
Disallow: /content.php/coID/63/
Disallow: /content.php/coID/64/
Disallow: /reviews_expo.php
Disallow: /serv-hotels.php
Disallow: /vl_box_registration.php
Disallow: /*/catalog/alphabet/
Disallow: /*/catalog/time/
Disallow: /*/conference/time/
Disallow: /*/conference/alphabet/
Disallow: /*/serv-zaoch-info.php
Disallow: /*/serv-int-info.php
Disallow: /*/serv-visit-info.php
Disallow: /*/serv-translator-info.php
Disallow: /*/serv-ad-info.php
Disallow: /*/serv-personal-info.php
Disallow: /*/serv-buildstand-info.php
Disallow: /*/serv-mobilestand-info.php
Disallow: /*/serv-visa-info.php
Disallow: /*/serv-uchastie-info.php
Disallow: /*/serv-catalogue-info.php
Disallow: /*/serv-catalogs-info.php
Host: expomap.ru
Sitemap: http://expomap.ru/sitemap.xml
Loading…
Cancel
Save