parent
e100d260fe
commit
fd1e88573a
14 changed files with 371 additions and 43 deletions
@ -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() |
||||
|
||||
@ -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 +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 |
||||
@ -1 +0,0 @@ |
||||
111 |
||||
Loading…
Reference in new issue