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.
139 lines
5.7 KiB
139 lines
5.7 KiB
# -*- coding: utf-8 -*-
|
|
import debug_toolbar
|
|
from core.simple_index_view import (
|
|
AboutView,
|
|
AdvertisingView,
|
|
AdvertisingViewLanding,
|
|
ParticipationViewLanding
|
|
)
|
|
from django.conf import settings
|
|
from django.conf.urls import include, patterns, url
|
|
from django.conf.urls.static import static
|
|
from django.contrib.sitemaps import views
|
|
|
|
from django.views.generic.base import TemplateView
|
|
from sitemaps import (
|
|
Additional,
|
|
BlogsSiteMap,
|
|
ConfCard,
|
|
ConfCity,
|
|
ConfCountry,
|
|
ConfTag,
|
|
ConfTheme,
|
|
ExpoCard,
|
|
ExpoCity,
|
|
ExpoCountry,
|
|
ExpoTag,
|
|
ExpoTheme,
|
|
Important,
|
|
NewsSiteMap
|
|
)
|
|
from solid_i18n.urls import solid_i18n_patterns
|
|
from views import MainPageView
|
|
from views import TermsofUse
|
|
|
|
|
|
class Robot(TemplateView):
|
|
template_name = 'client/robots.txt'
|
|
content_type = 'text/plain'
|
|
|
|
class YandexCheck(TemplateView):
|
|
template_name = 'client/simple_pages/yandex_check.html'
|
|
|
|
|
|
|
|
|
|
sitemaps = {
|
|
'expo_card': ExpoCard(), 'news': NewsSiteMap(), 'blogs': BlogsSiteMap(), 'expo_city': ExpoCity(), \
|
|
'expo_country': ExpoCountry(), 'expo_theme': ExpoTheme(), \
|
|
'conference_card': ConfCard(), 'expo_tag': ExpoTag(), 'conference_city': ConfCity(), 'conference_country': ConfCountry(),\
|
|
'conference_theme': ConfTheme(), 'conference_tag': ConfTag(), 'main': Important(), 'additional': Additional()
|
|
}
|
|
|
|
handler404 = 'proj.views.error404'
|
|
|
|
urlpatterns = patterns('',
|
|
url(r'^acquire_email/$', 'registration.backends.default.views.acquire_email', name = 'acquire_email'),
|
|
url(r'^yandex_4c45d77eb3f781f8.html$', YandexCheck.as_view()),
|
|
url(r'^expo-b/', include('expobanner.urls')),
|
|
url(r'^social/', include('social.apps.django_app.urls', namespace='social')),
|
|
url(r'^login/', 'registration.backends.default.views.LoginView', name='login'),
|
|
url(r'^logout/', 'registration.backends.default.views.LogoutView'),
|
|
url(r'^accounts/', include('registration.backends.default.urls')),
|
|
url(r'^i18n/', include('django.conf.urls.i18n')),
|
|
url(r'^', include('settings.old_urls')),
|
|
)
|
|
|
|
urlpatterns += solid_i18n_patterns('',
|
|
url(r'^rss/', include('core.urls')),
|
|
url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap, {'sitemaps': sitemaps}),
|
|
url(r'^admin/', include('proj.admin_urls')),
|
|
|
|
url(r'^sitemap\.xml$', views.index, {'sitemaps': sitemaps}),
|
|
url(r'^sitemap-(?P<section>.+)\.xml$', views.sitemap, {'sitemaps': sitemaps}),
|
|
url(r'^robots.txt$', Robot.as_view()),
|
|
url(r'^$', MainPageView.as_view(), name='index'),
|
|
url(r'^user-agreement/$', TermsofUse.as_view(), name='termsofuse'),
|
|
url(r'^page/', include('core.simple_urls')),
|
|
url(r'^theme/', include('theme.urls')),
|
|
url(r'^places/', include('place_exposition.urls')),
|
|
#url(r'^translators/', include('translator.urls')),
|
|
url(r'^translators/', include('specialist_catalog.urls')),
|
|
url(r'^newsletters/', include('emencia.django.newsletter.urls')),
|
|
url(r'^', include('events.urls', namespace='events')),
|
|
url(r'^', include('accounts.urls')),
|
|
url(r'^', include('exposition.urls')),
|
|
url(r'^', include('settings.conference_old_urls')), # conference redirects from old version
|
|
url(r'^', include('conference.urls')),
|
|
url(r'^', include('seminar.urls')),
|
|
url(r'^', include('webinar.urls')),
|
|
url(r'^', include('company.urls')),
|
|
url(r'^', include('photoreport.urls')),
|
|
url(r'^', include('article.urls')),
|
|
url(r'^city/', include('city.urls')),
|
|
url(r'^organiser/', include('organiser.urls')),
|
|
url(r'^gallery/', include('photologue.client_urls')),
|
|
url(r'^', include('file.urls')),
|
|
url(r'^', include('django_messages.expomap_urls')),
|
|
url(r'^', include('review.urls')),
|
|
|
|
# url(r'^advertising/$', AdvertisingView.as_view(), {'meta_id':58}, name='expomap_advertising'),
|
|
url(r'^advertising/$', AdvertisingViewLanding.as_view(), {'meta_id':94}, name='expomap_advertising_landing'),
|
|
url(r'^service/participation/$', ParticipationViewLanding.as_view(), {'meta_id':94}, name='expomap_participation_landing'),
|
|
|
|
url(r'^about/$', AboutView.as_view(), {'meta_id':56}, name='expomap_about'),
|
|
url(r'^partners/$', AboutView.as_view(), {'meta_id':57}, name='expomap_partners'),
|
|
url(r'^contacts/$', AboutView.as_view(), {'meta_id':59}, name='expomap_contacts'),
|
|
url(r'^', include('password_reset.urls')),
|
|
url(r'^', include('service.urls')),
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += patterns(
|
|
'django.views.static',
|
|
(r'media/(?P<path>.*)',
|
|
'serve',
|
|
{'document_root': settings.MEDIA_ROOT}), )
|
|
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
|
|
import debug_toolbar
|
|
urlpatterns += patterns('',
|
|
url(r'^__debug__/', include(debug_toolbar.urls)),
|
|
)
|
|
|
|
# ajax urls
|
|
urlpatterns += solid_i18n_patterns('',
|
|
url(r'^registration/reply/$', 'registration.backends.default.views.RegisterReply'),
|
|
url(r'^register/validate/', 'registration.backends.default.views.registration_form_validate', name='registration_form_validate'),
|
|
url(r'^register/', 'registration.backends.default.views.RegisterAjaxView', name='register'),
|
|
url(r'^register-complete/', 'registration.backends.default.views.complete_registration'),
|
|
url(r'^callback/', 'core.simple_index_view.callback'),
|
|
url(r'^search-form/get-parent/$', 'settings.views.search_parent'),
|
|
url(r'^search-form/autocomplete/$', 'settings.views.search_autocomplete'),
|
|
url(r'^search-form/$', 'settings.views.sub_category'),
|
|
url(r'^search-form/autosearch/exposition/$', 'settings.views.expo_autosearch'),
|
|
url(r'^search-form/autosearch/place/$', 'settings.views.place_autosearch'),
|
|
url(r'^search-form/autosearch/company/$', 'settings.views.company_autosearch'),
|
|
url(r'^', include('settings.old_urls')),
|
|
url(r'^', include('accounts.user_catalog_urls')),
|
|
)
|
|
|