diff --git a/apps/city/admin.py b/apps/city/admin.py index 34a05fc7..fc5edef7 100644 --- a/apps/city/admin.py +++ b/apps/city/admin.py @@ -21,13 +21,6 @@ from functions.admin_views import AdminListView from functions.http import JsonResponse -def city_all(request): - """ - return list of all cities with pagination - """ - return objects_list(request, City, 'city_all.html') - - def city_add(request): """ Return form of city and post it on the server. @@ -35,6 +28,7 @@ def city_add(request): """ return add_object_with_file(request, CityForm, 'city_add.html', '/admin/city/all') + def city_delete(request, url): return delete_object(request, City, CityDeleteForm, url, '/admin/city/all/') diff --git a/apps/city/urls.py b/apps/city/urls.py index 2496e422..12aa719d 100644 --- a/apps/city/urls.py +++ b/apps/city/urls.py @@ -1,9 +1,6 @@ # -*- coding: utf-8 -*- from django.conf.urls import patterns, url -from views import CityView urlpatterns = patterns('', url(r'get-city/', 'city.views.get_city'), - # commented for good times - #url(r'(?P.*)', CityView.as_view()), ) diff --git a/apps/city/views.py b/apps/city/views.py index 0cf49417..9143c18c 100644 --- a/apps/city/views.py +++ b/apps/city/views.py @@ -7,15 +7,6 @@ from models import City from settings.views import get_by_lang -class CityView(DetailView): - """ - this view is not used yet - """ - model = City - slug_field = 'url' - template_name = 'client/city/city.html' - - def get_city(request): """ returns filtered cities in current language in json format @@ -39,4 +30,4 @@ def get_city(request): return HttpResponse(json.dumps(result, indent=4), content_type='application/json') else: - return HttpResponse('not ajax') \ No newline at end of file + return HttpResponse('not ajax') diff --git a/templates/client/city/city.html b/templates/client/city/city.html deleted file mode 100644 index ca5797a7..00000000 --- a/templates/client/city/city.html +++ /dev/null @@ -1,150 +0,0 @@ -{% extends 'base_catalog.html' %} -{% load static %} -{% load i18n %} - -{% block bread_scrumbs %} - -{% endblock %} - -{% block page_title %} -{% endblock %} - -{% if object.get_events %} - {% block head_scripts %} - {% include "client/includes/banners/tops_head_js.html" %} - {% endblock head_scripts %} -{% endif %} - -{% block content_list %} -
-
- - -
-
-

{{ object.name }}

-
- - - - - -
-
    - {% if object.population %} -
  • {% trans 'Население' %}:{{ object.population }} {% trans 'человек' %}
  • - {% endif %} - - {% if object.code_IATA %} -
  • Код IATA:{{ object.code_IATA.code }}
  • - {% endif %} - - {% if object.phone_code %} -
  • {% trans 'Телефонный код' %}:+{{ object.phone_code }}
  • - {% endif %} - {% if object.transport %} -
  • {% trans 'Транспорт' %}:{{ object.transport }}
  • - {% endif %} -
-
- - - -
-
- - {% if object.famous_places %} - - - - - {% endif %} - {% if object.shoping %} - - - - - {% endif %} -
{% trans 'Должны посетить' %}: - {{ object.famous_places }} -
{% trans 'Шоппинг' %}: - {{ object.shoping }} -
- - {% if object.description %} -
-
-

{% trans "Описание" %}

-
- {{ object.description }} -
-
- {% endif %} - - {% if object.get_photos %} -
-

{% trans "Фотогалерея" %}

- -
- {% endif %} -
- -{% if object.get_events %} -
-
- - {% include 'includes/exposition/exposition_list.html' with object_list=object.get_events %} -
-{% endif %} - -{% if object.get_places %} -
-
- - {% include 'includes/place/place_list.html' with object_list=object.get_places %} -
-{% endif %} - -{% if object.get_organisers %} -
-
- - {% include 'includes/organiser/organiser_list.html' with object_list=object.get_organisers %} -
-{% endif %} - -{% endblock %}