# Path: search/views.py
# class CountryResult(object):
#     def __init__(self, code, name):
# def search(request):
# 
# Path: rtei/views.py
# def latest_document(request):
# def document_by_year(request, year):
# def redirect_to_year(year):


from django.conf.urls.i18n import i18n_patterns
from django.conf.urls import include, url
from django.conf import settings
from django.contrib import admin
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.core import urls as wagtail_urls
from wagtail_feeds.feeds import ExtendedFeed
from search import views as search_views
from rtei import views as rtei_views
    from django.conf.urls.static import static
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    import debug_toolbar






urlpatterns = [
    url(r'^django-admin/', include(admin.site.urls)),

    url(r'^admin/', include(wagtailadmin_urls)),
    url(r'^documents/', include(wagtaildocs_urls)),

    # url(r'^search/$', search_views.search, name='search'),

    # url(r'', include(wagtail_urls)),
]

urlpatterns += i18n_patterns(
    # These URLs will have /<language_code>/ appended to the beginning
    url(r'^search/$', search_views.search, name='search'),
    url(r'', include(wagtail_urls)),
)

urlpatterns += [
    url(r'^documents/data/latest/', rtei_views.latest_document,
        name="latest_document"),

# Path: search/views.py
# class CountryResult(object):
#     def __init__(self, code, name):
# def search(request):
# 
# Path: rtei/views.py
# def latest_document(request):
# def document_by_year(request, year):
# def redirect_to_year(year):


# Path: rtei/urls.py
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls import include, url
from django.conf import settings
from django.contrib import admin
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.core import urls as wagtail_urls
from wagtail_feeds.feeds import ExtendedFeed
from search import views as search_views
from rtei import views as rtei_views
    from django.conf.urls.static import static
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    import debug_toolbar







urlpatterns = [
    url(r'^django-admin/', include(admin.site.urls)),

    url(r'^admin/', include(wagtailadmin_urls)),
    url(r'^documents/', include(wagtaildocs_urls)),

    # url(r'^search/$', search_views.search, name='search'),

    # url(r'', include(wagtail_urls)),
]

urlpatterns += i18n_patterns(
    # These URLs will have /<language_code>/ appended to the beginning
    url(r'^search/$', search_views.search, name='search'),
    url(r'', include(wagtail_urls)),
)

urlpatterns += [
    url(r'^documents/data/latest/', rtei_views.latest_document,
        name="latest_document"),

    url(r'^documents/data/(?P<year>[0-9]{4})/', rtei_views.document_by_year,