<commit_before>from django.conf.urls import *
from django.conf import settings
from django.contrib.auth.decorators import login_required, permission_required
import signbank.registration.forms
from django.conf.urls.static import static
from django.views.generic import TemplateView

#These are needed for the urls below
import signbank.pages.views
import signbank.dictionary.urls
import signbank.feedback.urls
import signbank.feedback.views
import signbank.attachments.urls
import signbank.video.urls
import signbank.video.views
import signbank.registration.urls
import django.contrib.auth.views
import django.contrib.admindocs.urls
import django_summernote.urls

from signbank.dictionary.models import Gloss
from signbank.dictionary.adminviews import GlossListView, GlossDetailView, MorphemeListView, DatasetListView
from signbank.dictionary.views import add_image, delete_image, add_new_morpheme, add_handshape_image

from django.contrib import admin
admin.autodiscover()

from signbank.adminsite import publisher_admin

if settings.SHOW_NUMBERSIGNS:
    numbersigns_view = TemplateView.as_view(template_name='numbersigns/numbersigns.html')
else:
    numbersigns_view = TemplateView.as_view(template_name='numbersigns/underconstruction.html')


urlpatterns = [
    url(r'^$', signbank.pages.views.page, name='root_page'),

    url(r'^dictionary/', include(signbank.dictionary.urls, namespace='dictionary')),
    url(r'^feedback/', include(signbank.feedback.urls)),
    url(r'^attachments/', include(signbank.attachments.urls)),
    url(r'^video/', include(signbank.video.urls)),

    url(r'^image/upload/', add_image),
    url(r'^handshapeimage/upload/', add_handshape_image),
    url(r'^image/delete/(?P<pk>[0-9]+)$', delete_image),

    #(r'^register.html', 'signbank.views.index'),
    url(r'^logout.html', django.contrib.auth.views.logout,
                       {'next_page': settings.URL}, "logout"),

    url(r'^spell/twohanded.html$', TemplateView.as_view(template_name='fingerspell/fingerspellingtwohanded.html')),
    url(r'^spell/practice.html$', TemplateView.as_view(template_name='fingerspell/fingerspellingpractice.html')),
    url(r'^spell/onehanded.html$', TemplateView.as_view(template_name='fingerspell/fingerspellingonehanded.html')),
    url(r'^numbersigns.html$', numbersigns_view),

    #Hardcoding a number of special urls:
    url(r'^signs/dictionary/$', signbank.dictionary.views.search),
    url(r'^signs/search/$', GlossListView.as_view()),
    url(r'^signs/show_all/$', GlossListView.as_view(),{'show_all':True}),
    url(r'^signs/add/$', signbank.dictionary.views.add_new_sign),
    url(r'^signs/import_csv/$', signbank.dictionary.views.import_csv),
    url(r'^signs/homonyms/$', signbank.dictionary.views.find_homonyms),
    url(r'^signs/recently_added/$', signbank.dictionary.views.recently_added_glosses),
    url(r'^signs/proposed_new/$', signbank.dictionary.views.proposed_new_signs),
    url(r'^morphemes/dictionary/$', signbank.dictionary.views.search_morpheme),
    url(r'^morphemes/search/$', permission_required('dictionary.search_gloss')(MorphemeListView.as_view())),
    url(r'^morphemes/add/$', permission_required('dictionary.search_gloss')(add_new_morpheme)),
    url(r'^feedback/overview/$', signbank.feedback.views.showfeedback),

    # A standard view for setting the language
    url(r'^i18n/', include('django.conf.urls.i18n')),

    # compatibility with old links - intercept and return 401
    url(r'^index.cfm', TemplateView.as_view(template_name='compat.html')),

   # (r'^accounts/login/', 'django.contrib.auth.views.login'),

    url(r'^accounts/', include(signbank.registration.urls,namespace="registration")),<commit_msg>Made 'search handshape' menu item visible #365<commit_after>from django.conf.urls import *
from django.conf import settings
from django.contrib.auth.decorators import login_required, permission_required
import signbank.registration.forms
from django.conf.urls.static import static
from django.views.generic import TemplateView

#These are needed for the urls below
import signbank.pages.views
import signbank.dictionary.urls
import signbank.feedback.urls
import signbank.feedback.views
import signbank.attachments.urls
import signbank.video.urls
import signbank.video.views
import signbank.registration.urls
import django.contrib.auth.views
import django.contrib.admindocs.urls
import django_summernote.urls

from signbank.dictionary.models import Gloss
from signbank.dictionary.adminviews import GlossListView, GlossDetailView, MorphemeListView, DatasetListView, HandshapeListView
from signbank.dictionary.views import add_image, delete_image, add_new_morpheme, add_handshape_image

from django.contrib import admin
admin.autodiscover()

from signbank.adminsite import publisher_admin

if settings.SHOW_NUMBERSIGNS:
    numbersigns_view = TemplateView.as_view(template_name='numbersigns/numbersigns.html')
else:
    numbersigns_view = TemplateView.as_view(template_name='numbersigns/underconstruction.html')


urlpatterns = [
    url(r'^$', signbank.pages.views.page, name='root_page'),

    url(r'^dictionary/', include(signbank.dictionary.urls, namespace='dictionary')),
    url(r'^feedback/', include(signbank.feedback.urls)),
    url(r'^attachments/', include(signbank.attachments.urls)),
    url(r'^video/', include(signbank.video.urls)),

    url(r'^image/upload/', add_image),
    url(r'^handshapeimage/upload/', add_handshape_image),
    url(r'^image/delete/(?P<pk>[0-9]+)$', delete_image),

    #(r'^register.html', 'signbank.views.index'),
    url(r'^logout.html', django.contrib.auth.views.logout,
                       {'next_page': settings.URL}, "logout"),

    url(r'^spell/twohanded.html$', TemplateView.as_view(template_name='fingerspell/fingerspellingtwohanded.html')),
    url(r'^spell/practice.html$', TemplateView.as_view(template_name='fingerspell/fingerspellingpractice.html')),
    url(r'^spell/onehanded.html$', TemplateView.as_view(template_name='fingerspell/fingerspellingonehanded.html')),
    url(r'^numbersigns.html$', numbersigns_view),

    #Hardcoding a number of special urls:
    url(r'^signs/dictionary/$', signbank.dictionary.views.search),
    url(r'^signs/search/$', GlossListView.as_view()),
    url(r'^signs/show_all/$', GlossListView.as_view(),{'show_all':True}),
    url(r'^signs/add/$', signbank.dictionary.views.add_new_sign),
    url(r'^signs/import_csv/$', signbank.dictionary.views.import_csv),
    url(r'^signs/homonyms/$', signbank.dictionary.views.find_homonyms),
    url(r'^signs/recently_added/$', signbank.dictionary.views.recently_added_glosses),
    url(r'^signs/proposed_new/$', signbank.dictionary.views.proposed_new_signs),
    url(r'^signs/search_handshape/$', permission_required('dictionary.search_gloss')(HandshapeListView.as_view()), name='admin_handshape_list'),
    url(r'^morphemes/dictionary/$', signbank.dictionary.views.search_morpheme),
    url(r'^morphemes/search/$', permission_required('dictionary.search_gloss')(MorphemeListView.as_view())),
    url(r'^morphemes/add/$', permission_required('dictionary.search_gloss')(add_new_morpheme)),
    url(r'^feedback/overview/$', signbank.feedback.views.showfeedback),

    # A standard view for setting the language
    url(r'^i18n/', include('django.conf.urls.i18n')),

    # compatibility with old links - intercept and return 401
    url(r'^index.cfm', TemplateView.as_view(template_name='compat.html')),

   # (r'^accounts/login/', 'django.contrib.auth.views.login'),

    url(r'^accounts/', include(signbank.registration.urls,namespace="registration")),
{'fraction_non_alphanumeric': 0.14238454413126903, 'fraction_numerical': 0.00277888050813815, 'mean_word_length': 6.043802423112768, 'pattern_counts': {'":': 0, '<': 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': '6912430', 'n_tokens_mistral': 2616, 'n_tokens_neox': 2426, 'n_words': 353}