parent
65af81714f
commit
4f32564647
6 changed files with 96 additions and 23 deletions
@ -1,30 +1,57 @@ |
|||||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||||
from django.conf.urls import include, patterns, url |
from django.conf.urls import patterns, url |
||||||
|
|
||||||
from .views import ( |
from .views import ( |
||||||
PlaceCityCatalog, |
PlaceCityCatalog, PlaceCountryCatalog, PlaceDetail, PlaceList, PlacePhoto, |
||||||
PlaceCountryCatalog, |
PlaceByCountry, PlaceByCity, PlaceExpositionListView |
||||||
PlaceDetail, |
|
||||||
PlaceList, |
|
||||||
PlacePhoto, |
|
||||||
PlaceByCountry, |
|
||||||
PlaceByCity, |
|
||||||
) |
) |
||||||
|
|
||||||
urlpatterns = patterns('', |
urlpatterns = patterns( |
||||||
|
'', |
||||||
url(r'^country/$', PlaceByCountry.as_view(), {'meta_id': 49}), |
url(r'^country/$', PlaceByCountry.as_view(), {'meta_id': 49}), |
||||||
url(r'^country/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCountryCatalog.as_view(), {'meta_id': 49}), |
url( |
||||||
url(r'^country/(?P<slug>.*)/$', PlaceCountryCatalog.as_view(), {'meta_id': 49}, name='place_country'), |
r'^country/(?P<slug>.*)/page/(?P<page>\d+)/$', |
||||||
|
PlaceCountryCatalog.as_view(), |
||||||
|
{'meta_id': 49} |
||||||
|
), |
||||||
|
url( |
||||||
|
r'^country/(?P<slug>.*)/$', |
||||||
|
PlaceCountryCatalog.as_view(), |
||||||
|
{'meta_id': 49}, |
||||||
|
name='place_country' |
||||||
|
), |
||||||
|
|
||||||
url(r'^city/$', PlaceByCity.as_view(), {'meta_id': 48}), |
url(r'^city/$', PlaceByCity.as_view(), {'meta_id': 48}), |
||||||
url(r'^city/(?P<slug>.*)/page/(?P<page>\d+)/$', PlaceCityCatalog.as_view(), {'meta_id': 48}), |
url( |
||||||
url(r'^city/(?P<slug>.*)/$', PlaceCityCatalog.as_view(), {'meta_id': 48}, name='place_city'), |
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}, |
||||||
|
name='place_city' |
||||||
|
), |
||||||
|
|
||||||
url(r'^(?P<slug>.*)/photo/page/(?P<page>\d+)/$', PlacePhoto.as_view(), {'meta_id': 91}), |
url( |
||||||
|
r'^(?P<slug>.*)/photo/page/(?P<page>\d+)/$', |
||||||
|
PlacePhoto.as_view(), |
||||||
|
{'meta_id': 91} |
||||||
|
), |
||||||
url(r'^(?P<slug>.*)/photo/$', PlacePhoto.as_view(), {'meta_id': 91}), |
url(r'^(?P<slug>.*)/photo/$', PlacePhoto.as_view(), {'meta_id': 91}), |
||||||
|
|
||||||
url(r'^page/(?P<page>\d+)/$', PlaceList.as_view(), {'meta_id': 46}), |
url(r'^page/(?P<page>\d+)/$', PlaceList.as_view(), {'meta_id': 46}), |
||||||
url(r'^(?P<slug>.*)/$', PlaceDetail.as_view(), {'meta_id': 47}), |
url( |
||||||
url(r'^$', PlaceList.as_view(), {'meta_id':46}), |
r'^(?P<slug>.*)/expositions/$', |
||||||
) |
PlaceExpositionListView.as_view(), |
||||||
|
name='place_exposition_list' |
||||||
|
), |
||||||
|
url( |
||||||
|
r'^(?P<slug>.*)/$', |
||||||
|
PlaceDetail.as_view(), |
||||||
|
{'meta_id': 47}, |
||||||
|
name='place_detail' |
||||||
|
), |
||||||
|
url(r'^$', PlaceList.as_view(), {'meta_id': 46}), |
||||||
|
) |
||||||
|
|||||||
@ -0,0 +1,21 @@ |
|||||||
|
{% extends 'client/base_catalog.html' %} |
||||||
|
{% load i18n %} |
||||||
|
|
||||||
|
{% block bread_scrumbs %} |
||||||
|
<div class="bread-crumbs"> |
||||||
|
<a href="{% url 'index' %}">{% trans 'Главная страница' %}</a> |
||||||
|
<a href="{{ object.catalog }}">{% trans 'Места' %}</a> |
||||||
|
<a href="{{ object.catalog }}country/{{ object.country.url }}/">{{ object.country }}</a> |
||||||
|
<a href="{{ object.catalog }}city/{{ object.city.url }}/">{{ object.city }}</a> |
||||||
|
<a href="{{ object.get_absolute_url }}">{{ object.name }}</a> |
||||||
|
<strong>{% trans 'Все события' %}</strong> |
||||||
|
</div> |
||||||
|
{% endblock %} |
||||||
|
|
||||||
|
{% block content_list %} |
||||||
|
<h1>{% trans 'Все события' %} {{ object.name }}</h1> |
||||||
|
|
||||||
|
{% for item in object_list %} |
||||||
|
{{ item }} |
||||||
|
{% endfor %} |
||||||
|
{% endblock %} |
||||||
Loading…
Reference in new issue