<commit_before>import os

from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import login
from django.views.generic import TemplateView

from molo.profiles import views as molo_profile_views
from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailcore import urls as wagtail_urls

from nurseconnect import forms, views
from nurseconnect.forms import NurseconnectAuthenticationForm

# implement CAS URLs in a production setting
if settings.ENABLE_SSO:  # pragma: no cover
    urlpatterns = patterns(
        "",
        url(r"^admin/login/", "django_cas_ng.views.login"),
        url(r"^admin/logout/", "django_cas_ng.views.logout"),
        url(r"^admin/callback/", "django_cas_ng.views.callback"),
    )
else:
    urlpatterns = patterns("", )

urlpatterns += patterns(
    "",
    url(r"^django-admin/", include(admin.site.urls)),
    url(r"^admin/", include(wagtailadmin_urls)),
    url(r"^documents/", include(wagtaildocs_urls)),
    url(
        r"^search/$",
        login_required(views.SearchView.as_view(
            template_name="search/search.html"
        )),
        name="search"
    ),
    url(
        r"^search/results/$",
        login_required(views.search),
        name="search_query"
    ),
    url(
        r"^yourwords/",
        include("molo.yourwords.urls",
                namespace="molo.yourwords",
                app_name="molo.yourwords")
    ),
    url(
        r"^profiles/register/$",
        views.RegistrationView.as_view(),
        name="user_register"
    ),
    url(
        r"^profiles/register-msisdn/$",
        views.RegistrationMSISDNView.as_view(),
        name="user_register_msisdn"
    ),
    url(
        r"^profiles/register-security-questions/$",
        views.RegistrationSecurityQuestionsView.as_view(),
        name="user_register_security_questions"
    ),
    url(
        r"^profiles/register-clinic-code/$",
        views.RegistrationClinicCodeView.as_view(),
        name="user_register_clinic_code"
    ),
    url(
        r"^profiles/register-clinic-success/$",
        views.RegistrationClinicCodeSuccessView.as_view(),
        name="user_register_clinic_code_success"
    ),
    url(
        r"^profiles/register-complete/$",
        views.RegistrationCompleteView.as_view(),
        name="user_register_complete"
    ),
    url(
        r"^view/myprofile/$",
        login_required(views.MyProfileView.as_view(
            template_name="profiles/viewprofile.html"
        )),
        name="view_my_profile"
    ),
    url(
        r"^view/myprofile/(?P<edit>[\w-]+)/$",
        login_required(views.MyProfileView.as_view(
            template_name="profiles/viewprofile.html"
        )),
        name="edit_my_profile"
    ),
    url(
        r"^profiles/forgot-password/$",
        molo_profile_views.ForgotPasswordView.as_view(
            form_class=forms.ForgotPasswordForm
        ),
        name="forgot_password"
    ),
    url(
        r"^profiles/reset-password/$",
        molo_profile_views.ResetPasswordView.as_view(
            form_class=forms.ResetPasswordForm
        ),
        name="reset_password"
    ),
    url(
        r"^profiles/reset-password-success/$",
        TemplateView.as_view(
            template_name="profiles/reset_password_success.html"
        ),
        name="reset_password_success"
    ),
    url(
        r"^menu/$",
        login_required(views.MenuView.as_view()),
        name="menu"
    ),
    url(
        r"^$",
        views.HomePageView.as_view(
            template_name="core/main.html"
        ),
        name="home"
    ),
    url(
        r"^profiles/",
        include("molo.profiles.urls", namespace="molo.profiles")
    ),
    url(
        r"^login/$",
        login, {"authentication_form": NurseconnectAuthenticationForm},
        name="auth_login"
    ),

    url(r"^sections/$", include(wagtail_urls)),
    url(r"^comments/", include("molo.commenting.urls")),
    url(r'^surveys/',
        include('molo.surveys.urls',
                namespace='molo.surveys',
                app_name='molo.surveys')),

    url(r'', include('django_comments.urls')),
    url(r"", include("molo.core.urls")),
    url(r"", include(wagtail_urls)),
)

if settings.DEBUG:  # pragma: no cover
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns

    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(
        settings.MEDIA_URL + "images/",
        document_root=os.path.join(settings.MEDIA_ROOT, "images")
    )
    urlpatterns += \
        url(
            r"^styleguide/",
            include("styleguide.urls", namespace="styleguide")
        ),
<commit_msg>remove $<commit_after>import os

from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import login
from django.views.generic import TemplateView

from molo.profiles import views as molo_profile_views
from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailcore import urls as wagtail_urls

from nurseconnect import forms, views
from nurseconnect.forms import NurseconnectAuthenticationForm

# implement CAS URLs in a production setting
if settings.ENABLE_SSO:  # pragma: no cover
    urlpatterns = patterns(
        "",
        url(r"^admin/login/", "django_cas_ng.views.login"),
        url(r"^admin/logout/", "django_cas_ng.views.logout"),
        url(r"^admin/callback/", "django_cas_ng.views.callback"),
    )
else:
    urlpatterns = patterns("", )

urlpatterns += patterns(
    "",
    url(r"^django-admin/", include(admin.site.urls)),
    url(r"^admin/", include(wagtailadmin_urls)),
    url(r"^documents/", include(wagtaildocs_urls)),
    url(
        r"^search/$",
        login_required(views.SearchView.as_view(
            template_name="search/search.html"
        )),
        name="search"
    ),
    url(
        r"^search/results/$",
        login_required(views.search),
        name="search_query"
    ),
    url(
        r"^yourwords/",
        include("molo.yourwords.urls",
                namespace="molo.yourwords",
                app_name="molo.yourwords")
    ),
    url(
        r"^profiles/register/$",
        views.RegistrationView.as_view(),
        name="user_register"
    ),
    url(
        r"^profiles/register-msisdn/$",
        views.RegistrationMSISDNView.as_view(),
        name="user_register_msisdn"
    ),
    url(
        r"^profiles/register-security-questions/$",
        views.RegistrationSecurityQuestionsView.as_view(),
        name="user_register_security_questions"
    ),
    url(
        r"^profiles/register-clinic-code/$",
        views.RegistrationClinicCodeView.as_view(),
        name="user_register_clinic_code"
    ),
    url(
        r"^profiles/register-clinic-success/$",
        views.RegistrationClinicCodeSuccessView.as_view(),
        name="user_register_clinic_code_success"
    ),
    url(
        r"^profiles/register-complete/$",
        views.RegistrationCompleteView.as_view(),
        name="user_register_complete"
    ),
    url(
        r"^view/myprofile/$",
        login_required(views.MyProfileView.as_view(
            template_name="profiles/viewprofile.html"
        )),
        name="view_my_profile"
    ),
    url(
        r"^view/myprofile/(?P<edit>[\w-]+)/$",
        login_required(views.MyProfileView.as_view(
            template_name="profiles/viewprofile.html"
        )),
        name="edit_my_profile"
    ),
    url(
        r"^profiles/forgot-password/$",
        molo_profile_views.ForgotPasswordView.as_view(
            form_class=forms.ForgotPasswordForm
        ),
        name="forgot_password"
    ),
    url(
        r"^profiles/reset-password/$",
        molo_profile_views.ResetPasswordView.as_view(
            form_class=forms.ResetPasswordForm
        ),
        name="reset_password"
    ),
    url(
        r"^profiles/reset-password-success/$",
        TemplateView.as_view(
            template_name="profiles/reset_password_success.html"
        ),
        name="reset_password_success"
    ),
    url(
        r"^menu/$",
        login_required(views.MenuView.as_view()),
        name="menu"
    ),
    url(
        r"^$",
        views.HomePageView.as_view(
            template_name="core/main.html"
        ),
        name="home"
    ),
    url(
        r"^profiles/",
        include("molo.profiles.urls", namespace="molo.profiles")
    ),
    url(
        r"^login/$",
        login, {"authentication_form": NurseconnectAuthenticationForm},
        name="auth_login"
    ),

    url(r"^sections/", include(wagtail_urls)),
    url(r"^comments/", include("molo.commenting.urls")),
    url(r'^surveys/',
        include('molo.surveys.urls',
                namespace='molo.surveys',
                app_name='molo.surveys')),

    url(r'', include('django_comments.urls')),
    url(r"", include("molo.core.urls")),
    url(r"", include(wagtail_urls)),
)

if settings.DEBUG:  # pragma: no cover
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns

    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(
        settings.MEDIA_URL + "images/",
        document_root=os.path.join(settings.MEDIA_ROOT, "images")
    )
    urlpatterns += \
        url(
            r"^styleguide/",
            include("styleguide.urls", namespace="styleguide")
        ),

{'fraction_non_alphanumeric': 0.13083538083538085, 'fraction_numerical': 0.0, 'mean_word_length': 2.6047970479704796, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1737015', 'n_tokens_mistral': 3114, 'n_tokens_neox': 3104, 'n_words': 429}