<commit_before>from django.conf.urls import patterns, include, url
from django.utils.translation import ugettext_lazy as _
from django.contrib.sitemaps.views import sitemap

import contracts.urls
import deputies.urls
import law.urls
from . import views
from .sitemaps import Sitemap

sitemaps = {
    'sitemaps': Sitemap,
}

urlpatterns = patterns('',
                       url(r'^$', views.home, name='home'),
                       url(r'^%s$' % _('about'), views.about, name='about'),
                       url(r'^', include(contracts.urls, app_name='contracts')),
                       url(r'^', include(deputies.urls, app_name='deputies')),
                       url(r'^', include(law.urls, app_name='law')),
                       (r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}),
                       (r'^robots\.txt$', views.robots),
                       (r'^i18n/', include('django.conf.urls.i18n')),
                       )

from django.conf import settings
if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
                            url(r'^__debug__/', include(debug_toolbar.urls)),
                            )
<commit_msg>Fixed 404 error on changing language.<commit_after>from django.conf.urls import patterns, include, url
from django.utils.translation import ugettext_lazy as _
from django.contrib.sitemaps.views import sitemap

import contracts.urls
import deputies.urls
import law.urls
from . import views
from .sitemaps import Sitemap

sitemaps = {
    'sitemaps': Sitemap,
}

urlpatterns = patterns('',
                       (r'^i18n/', include('django.conf.urls.i18n')),
                       url(r'^$', views.home, name='home'),
                       url(r'^%s$' % _('about'), views.about, name='about'),
                       url(r'^', include(contracts.urls, app_name='contracts')),
                       url(r'^', include(deputies.urls, app_name='deputies')),
                       url(r'^', include(law.urls, app_name='law')),
                       (r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}),
                       (r'^robots\.txt$', views.robots),
                       )

from django.conf import settings
if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
                            url(r'^__debug__/', include(debug_toolbar.urls)),
                            )

{'fraction_non_alphanumeric': 0.14087468460891506, 'fraction_numerical': 0.004625735912531539, 'mean_word_length': 2.0383141762452106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3981334', 'n_tokens_mistral': 729, 'n_tokens_neox': 687, 'n_words': 143}