<commit_before>from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.conf.urls.static import static
from django.views.defaults import permission_denied, page_not_found

from accounts.urls import urlpatterns as accounts_patterns
from api_urls import urlpatterns as api_patterns
from checkouts.views import (
    CheckoutListView,
    CheckoutCreateView,
    CheckoutReadView,
    CheckoutOpenView,
    CheckoutSaveView,
    CheckoutCloseView)
import projects.urls
from users.views import (
    UsernameChangeView,
    UserSettingsView,
    UserSignupView,
    UserSigninView,
    UserSignoutView,
    BetaTokenView)
from views import (
    AboutView,
    ContactView,
    Error500View,
    HelpView,
    HomeView,
    IcoView,
    Test403View,
    Test404View,
    Test500View,
    PrivacyView,
    StatusView,
    TermsView)

urlpatterns = [
    # Project CRUD
    path('projects/', include(projects.urls)),

    # Checkout CRUD
    path('checkouts/', include([
        path('', CheckoutListView.as_view(), name='checkout_list'),
        path('create/', CheckoutCreateView.as_view(), name='checkout_create'),
        path('<int:pk>/', CheckoutReadView.as_view(), name='checkout_read'),
        path('<int:pk>/open/', CheckoutOpenView.as_view(), name='checkout_open'),
        path('<int:pk>/save/', CheckoutSaveView.as_view(), name='checkout_save'),
        path('<int:pk>/close/', CheckoutCloseView.as_view(), name='checkout_close')
    ])),
    # Shortcut to `checkout_create`
    path('open/', CheckoutCreateView.as_view(), name='checkout_create_shortcut'),

    # User sign in, settings etc
    path('beta/', BetaTokenView.as_view(), name='user_beta'),
    path('me/', UserSettingsView.as_view(), name='user_settings'),
    path('me/signup/', UserSignupView.as_view(), name='user_signup'),
    path('me/signin/', UserSigninView.as_view(), name='user_signin'),
    path('me/signout/', UserSignoutView.as_view(), name='user_signout'),
    path('me/username/', UsernameChangeView.as_view(), name='user_change_username'),
    path('me/avatar/', include('avatar.urls')),
    path('me/', include('allauth.urls')),

    # Staff admin
    path('admin/', admin.site.urls),

    # Home page
    path('', HomeView.as_view(), name='home'),

    # About pages etc
    path('about/', AboutView.as_view(), name='about'),
    path('about/contact/', ContactView.as_view(), name='contact'),
    path('about/help/', HelpView.as_view(), name='help'),
    path('about/privacy-policy/', PrivacyView.as_view(), name='privacy-policy'),
    path('about/terms-and-conditions/', TermsView.as_view(), name='terms-and-conditions'),

    # Accounts App
    path('accounts/', include(accounts_patterns)),

    # API
    path('api/', include(api_patterns)),

    # Testing errors
    path('test/403', Test403View.as_view()),
    path('test/404', Test404View.as_view()),
    path('test/500', Test500View.as_view()),

    # status
    path('status/', StatusView.as_view()),

    # ico for old browsers
    path('favicon.ico', IcoView.as_view())
]

handler403 = permission_denied
handler404 = page_not_found
handler500 = Error500View.as_view()

if settings.DEBUG:
    import debug_toolbar

    urlpatterns = [
        path('debug/', include(debug_toolbar.urls)),
    ] + urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)<commit_msg>feat: Add /system-status/ URL for parity with cloud system-status<commit_after>from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.conf.urls.static import static
from django.views.defaults import permission_denied, page_not_found

from accounts.urls import urlpatterns as accounts_patterns
from api_urls import urlpatterns as api_patterns
from checkouts.views import (
    CheckoutListView,
    CheckoutCreateView,
    CheckoutReadView,
    CheckoutOpenView,
    CheckoutSaveView,
    CheckoutCloseView)
import projects.urls
from users.views import (
    UsernameChangeView,
    UserSettingsView,
    UserSignupView,
    UserSigninView,
    UserSignoutView,
    BetaTokenView)
from views import (
    AboutView,
    ContactView,
    Error500View,
    HelpView,
    HomeView,
    IcoView,
    Test403View,
    Test404View,
    Test500View,
    PrivacyView,
    StatusView,
    TermsView)

urlpatterns = [
    # Project CRUD
    path('projects/', include(projects.urls)),

    # Checkout CRUD
    path('checkouts/', include([
        path('', CheckoutListView.as_view(), name='checkout_list'),
        path('create/', CheckoutCreateView.as_view(), name='checkout_create'),
        path('<int:pk>/', CheckoutReadView.as_view(), name='checkout_read'),
        path('<int:pk>/open/', CheckoutOpenView.as_view(), name='checkout_open'),
        path('<int:pk>/save/', CheckoutSaveView.as_view(), name='checkout_save'),
        path('<int:pk>/close/', CheckoutCloseView.as_view(), name='checkout_close')
    ])),
    # Shortcut to `checkout_create`
    path('open/', CheckoutCreateView.as_view(), name='checkout_create_shortcut'),

    # User sign in, settings etc
    path('beta/', BetaTokenView.as_view(), name='user_beta'),
    path('me/', UserSettingsView.as_view(), name='user_settings'),
    path('me/signup/', UserSignupView.as_view(), name='user_signup'),
    path('me/signin/', UserSigninView.as_view(), name='user_signin'),
    path('me/signout/', UserSignoutView.as_view(), name='user_signout'),
    path('me/username/', UsernameChangeView.as_view(), name='user_change_username'),
    path('me/avatar/', include('avatar.urls')),
    path('me/', include('allauth.urls')),

    # Staff admin
    path('admin/', admin.site.urls),

    # Home page
    path('', HomeView.as_view(), name='home'),

    # About pages etc
    path('about/', AboutView.as_view(), name='about'),
    path('about/contact/', ContactView.as_view(), name='contact'),
    path('about/help/', HelpView.as_view(), name='help'),
    path('about/privacy-policy/', PrivacyView.as_view(), name='privacy-policy'),
    path('about/terms-and-conditions/', TermsView.as_view(), name='terms-and-conditions'),

    # Accounts App
    path('accounts/', include(accounts_patterns)),

    # API
    path('api/', include(api_patterns)),

    # Testing errors
    path('test/403', Test403View.as_view()),
    path('test/404', Test404View.as_view()),
    path('test/500', Test500View.as_view()),

    # status
    path('status/', StatusView.as_view()),
    path('system-status/', StatusView.as_view()),  # for parity with cloud

    # ico for old browsers
    path('favicon.ico', IcoView.as_view())
]

handler403 = permission_denied
handler404 = page_not_found
handler500 = Error500View.as_view()

if settings.DEBUG:
    import debug_toolbar

    urlpatterns = [
        path('debug/', include(debug_toolbar.urls)),
    ] + urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
{'fraction_non_alphanumeric': 0.1487328023171615, 'fraction_numerical': 0.012165097755249819, 'mean_word_length': 4.223903177004539, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1598504', 'n_tokens_mistral': 2274, 'n_tokens_neox': 2194, 'n_words': 405}