You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

129 lines
4.9 KiB

from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.http import HttpResponse
from api.views import call_order
from news.views import NewsSitemap
from promo.views import PromoSitemap
from store.views import order_view, order_print, ProductSitemap, CategorySitemap, order_kkb, kkb_result, set_currency
from main.views import *
from rest_framework import routers
# from api.urls import router
from rest_framework import routers
from api.views import *
from django.contrib import sitemaps
from django.core.urlresolvers import reverse
from django.contrib.sitemaps.views import sitemap
# Serializers define the API representation.
# Routers provide an easy way of automatically determining the URL conf.
router = routers.DefaultRouter(trailing_slash=True)
admin.site.site_header = 'Админка Batiskaf-kz.kz'
admin.site.site_title = 'Админка Batiskaf-kz.kz'
admin.site.index_title = 'Модели'
class StaticViewSitemap(sitemaps.Sitemap):
priority = 0.9
changefreq = 'daily'
def items(self):
return [
'size_index', 'size_beuchat',
'size_omer_sporasub', 'size_sargan', 'size_scorpena',
'size_aqua_discovery', 'size_aqualung', 'size_aquatics', 'size_cressi',
'advantages', 'payment', 'delivery',
'contacts', 'faq',
'store_cart_detail', 'store_search', 'store_sale',
'accounts_index', 'accounts_login', 'news_index',
]
def location(self, item):
return reverse(item)
class MainStaticViewSitemap(sitemaps.Sitemap):
priority = 1
changefreq = 'daily'
def items(self):
return [
'index',
]
def location(self, item):
return reverse(item)
sitemaps1 = {
'mainstatic': MainStaticViewSitemap,
'static': StaticViewSitemap,
'items': ProductSitemap,
'news': NewsSitemap,
'promo': PromoSitemap,
'categories': CategorySitemap,
}
urlpatterns = (
url(r'^$', 'main.views.index',
name='index'),
url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps1},
name='django.contrib.sitemaps.views.sitemap'),
url(r'^robots\.txt$', lambda r: HttpResponse(
"User-agent: *\nDisallow: \nHost: batiskaf-kz.kz\nSitemap: http://batiskaf-kz.kz/sitemap.xml",
content_type="text/plain")),
url(r'^size/$', 'main.views.size_index',
name='size_index'),
url(r'^feedback/$', 'main.views.feedback',
name='feedback'),
url(r'^oferta/$', 'main.views.oferta',
name='oferta'),
url(r'^size/beuchat/$', 'main.views.size_beuchat',
name='size_beuchat'),
url(r'^size/omer-sporasub/$', 'main.views.size_omer_sporasub',
name='size_omer_sporasub'),
url(r'^size/sargan/$', 'main.views.size_sargan',
name='size_sargan'),
url(r'^size/scorpena/$', 'main.views.size_scorpena', name='size_scorpena'),
url(r'^size/aqua-discovery/$', 'main.views.size_aqua_discovery',
name='size_aqua_discovery'),
url(r'^size/aqualung/$', 'main.views.size_aqualung',
name='size_aqualung'),
url(r'^size/aquatics/$', 'main.views.size_aquatics',
name='size_aquatics'),
url(r'^size/cressi/$', 'main.views.size_cressi',
name='size_cressi'),
url(r'^size/mares/$', 'main.views.size_mares',
name='size_mares'),
url(r'^size/elios/$', 'main.views.size_elios',
name='size_elios'),
url(r'^api/item/(?P<article>.+)/$', 'main.views.temp_count_update', name='temp_count_update'),
url(r'^api/', include(router.urls)),
url(r'^news/', include('news.urls')),
url(r'^promo/', include('promo.urls')),
url(r'^get_order_amount/$', 'store.views.get_order_amount'),
url(r'^get_order_kazpost_amount/$', 'store.views.get_order_kazpost_amount'),
url(r'^order_call/$', 'api.views.call_order'),
url(r'^order_order/$', 'api.views.order_order'),
url(r'^order/(?P<order>.+)/print/$', order_print,
name='store_order_print'),
url(r'^order/(?P<order>.+)/kkb/$', order_kkb,
name='store_order_kkb'),
url(r'^kkb_result/$', kkb_result,
name='kkb_result'),
url(r'^order/(?P<order>.+)/$', order_view,
name='store_order_view'),
url(r'^store/', include('store.urls')),
url(r'^account/', include('accounts.urls')),
url(r'^advantages/$', advantages, name='advantages'),
url(r'^payment/$', payment, name='payment'),
url(r'^delivery/$', delivery, name='delivery'),
url(r'^contacts/$', contacts, name='contacts'),
url(r'^faq/$', faq, name='faq'),
url(r'^fest/$', fest, name='fest'),
url(r'^fest_success/$', fest_success, name='fest_success'),
url(r'^currencies/(?P<currency_code>.+)/$', set_currency, name='set_currency'),
url(r'^admin2517_garpun/', include(admin.site.urls)),
)