<commit_before>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from devices.views import *
from network.views import *
from devicetypes.views import *
from main.views import *
from api.views import *
from mail.views import *
from users.views import ProfileView, UsersettingsView
from django.views.generic import TemplateView
from rest_framework.urlpatterns import format_suffix_patterns
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()

urlpatterns = patterns('',
    url(r'^$', Home.as_view(), name="home"),

    url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html', }),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'logout.html'}),

    url(r'^devices/$', login_required(DeviceList.as_view()), name="device-list"),
    url(r'^devices/page/(?P<page>[0-9]*)$', login_required(DeviceList.as_view()), name="device-list"),
    url(r'^devices/filter/(?P<filter>.*)$', login_required(DeviceList.as_view()), name="device-list-filtered"),
    url(r'^devices/page/(?P<page>[0-9]*)/filter/(?P<filter>.*)$', login_required(DeviceList.as_view()), name="device-list-filtered"),
    url(r'^devices/globalhistory/$', login_required(DeviceGlobalhistory.as_view()), name="device-globalhistory"),
    url(r'^devices/globalhistory/(?P<page>[0-9]*)$', login_required(DeviceGlobalhistory.as_view()), name="device-globalhistory"),
    url(r'^devices/add$', login_required(DeviceCreate.as_view()), name="device-add"),
    url(r'^devices/add/template/(?P<templateid>[0-9]*)$', login_required(DeviceCreate.as_view()), name="device-add"),
    url(r'^devices/add/copy/(?P<copyid>[0-9]*)$', login_required(DeviceCreate.as_view()), name="device-add-copy"),
    url(r'^devices/(?P<pk>[0-9]*)$', login_required(DeviceDetail.as_view()), name="device-detail"),
    url(r'^devices/(?P<pk>[0-9]*)/edit/$', login_required(DeviceUpdate.as_view()), name="device-edit"),
    url(r'^devices/(?P<pk>[0-9]*)/delete/$', login_required(DeviceDelete.as_view()), name="device-delete"),
    url(r'^devices/(?P<pk>[0-9]*)/archive/$', login_required(DeviceArchive.as_view()), name="device-archive"),
    url(r'^devices/(?P<pk>[0-9]*)/lend/$', login_required(DeviceLend.as_view()), name="device-lend"),
    url(r'^devices/(?P<pk>[0-9]*)/return/$', login_required(DeviceReturn.as_view()), name="device-return"),
    url(r'^devices/(?P<pk>[0-9]*)/ipaddress/$', login_required(DeviceIpAddress.as_view()), name="device-ipaddress"),
    url(r'^devices/(?P<pk>[0-9]*)/ipaddress/(?P<ipaddress>[0-9]*)$', login_required(DeviceIpAddressRemove.as_view()), name="device-ipaddress-remove"),
    url(r'^devices/(?P<pk>[0-9]*)/history/$', login_required(DeviceHistoryList.as_view()), name="device-history-list"),
    url(r'^devices/(?P<pk>[0-9]*)/history/(?P<revision>[0-9]*)$', login_required(DeviceHistory.as_view()), name="device-history"),

     url(r'^templates/$', login_required(TemplateList.as_view()), name="template-list"),
    url(r'^templates/add$', login_required(TemplateCreate.as_view()), name="template-add"),
    url(r'^templates/(?P<pk>[0-9]*)/edit/$', login_required(TemplateUpdate.as_view()), name="template-edit"),
    url(r'^templates/(?P<pk>[0-9]*)/delete/$', login_required(TemplateDelete.as_view()), name="template-delete"),

    url(r'^types/$', login_required(TypeList.as_view()), name="type-list"),
    url(r'^types/(?P<page>[0-9]*)$', login_required(TypeList.as_view()), name="type-list"),
    url(r'^types/add$', login_required(TypeCreate.as_view()), name="type-add"),
    url(r'^types/edit/(?P<pk>[0-9]*)$', login_required(TypeUpdate.as_view()), name="type-edit"),
    url(r'^types/delete/(?P<pk>[0-9]*)$', login_required(TypeDelete.as_view()), name="type-delete"),
    url(r'^types/view/(?P<pk>[0-9]*)$', login_required(TypeDetail.as_view()), name="type-detail"),
    url(r'^types/merge/(?P<oldpk>[0-9]*)/(?P<newpk>[0-9]*)$', login_required(TypeMerge.as_view()), name="type-merge"),
    url(r'^types/attribute/add$', login_required(TypeAttributeCreate.as_view()), name="typeattribute-add"),
    url(r'^types/attribute/edit/(?P<pk>[0-9]*)$', login_required(TypeAttributeUpdate.as_view()), name="typeattribute-edit"),
    url(r'^types/attribute/delete/(?P<pk>[0-9]*)$', login_required(TypeAttributeDelete.as_view()), name="typeattribute-delete"),


    url(r'^rooms/$', login_required(RoomList.as_view()), name="room-list"),
    url(r'^rooms/(?P<page>[0-9]*)$', login_required(RoomList.as_view()), name="room-list"),
    url(r'^rooms/add$', login_required(RoomCreate.as_view()), name="room-add"),
    url(r'^rooms/edit/(?P<pk>.*)$', login_required(RoomUpdate.as_view()), name="room-edit"),
    url(r'^rooms/delete/(?P<pk>.*)$', login_required(RoomDelete.as_view()), name="room-delete"),
    url(r'^rooms/view/(?P<pk>.*)$', login_required(RoomDetail.as_view()), name="room-detail"),<commit_msg>devicetemplates belong to devices<commit_after>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from devices.views import *
from network.views import *
from devicetypes.views import *
from main.views import *
from api.views import *
from mail.views import *
from users.views import ProfileView, UsersettingsView
from django.views.generic import TemplateView
from rest_framework.urlpatterns import format_suffix_patterns
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()

urlpatterns = patterns('',
    url(r'^$', Home.as_view(), name="home"),

    url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html', }),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'template_name': 'logout.html'}),

    url(r'^devices/$', login_required(DeviceList.as_view()), name="device-list"),
    url(r'^devices/page/(?P<page>[0-9]*)$', login_required(DeviceList.as_view()), name="device-list"),
    url(r'^devices/filter/(?P<filter>.*)$', login_required(DeviceList.as_view()), name="device-list-filtered"),
    url(r'^devices/page/(?P<page>[0-9]*)/filter/(?P<filter>.*)$', login_required(DeviceList.as_view()), name="device-list-filtered"),
    url(r'^devices/globalhistory/$', login_required(DeviceGlobalhistory.as_view()), name="device-globalhistory"),
    url(r'^devices/globalhistory/(?P<page>[0-9]*)$', login_required(DeviceGlobalhistory.as_view()), name="device-globalhistory"),
    url(r'^devices/add$', login_required(DeviceCreate.as_view()), name="device-add"),
    url(r'^devices/add/template/(?P<templateid>[0-9]*)$', login_required(DeviceCreate.as_view()), name="device-add"),
    url(r'^devices/add/copy/(?P<copyid>[0-9]*)$', login_required(DeviceCreate.as_view()), name="device-add-copy"),
    url(r'^devices/(?P<pk>[0-9]*)$', login_required(DeviceDetail.as_view()), name="device-detail"),
    url(r'^devices/(?P<pk>[0-9]*)/edit/$', login_required(DeviceUpdate.as_view()), name="device-edit"),
    url(r'^devices/(?P<pk>[0-9]*)/delete/$', login_required(DeviceDelete.as_view()), name="device-delete"),
    url(r'^devices/(?P<pk>[0-9]*)/archive/$', login_required(DeviceArchive.as_view()), name="device-archive"),
    url(r'^devices/(?P<pk>[0-9]*)/lend/$', login_required(DeviceLend.as_view()), name="device-lend"),
    url(r'^devices/(?P<pk>[0-9]*)/return/$', login_required(DeviceReturn.as_view()), name="device-return"),
    url(r'^devices/(?P<pk>[0-9]*)/ipaddress/$', login_required(DeviceIpAddress.as_view()), name="device-ipaddress"),
    url(r'^devices/(?P<pk>[0-9]*)/ipaddress/(?P<ipaddress>[0-9]*)$', login_required(DeviceIpAddressRemove.as_view()), name="device-ipaddress-remove"),
    url(r'^devices/(?P<pk>[0-9]*)/history/$', login_required(DeviceHistoryList.as_view()), name="device-history-list"),
    url(r'^devices/(?P<pk>[0-9]*)/history/(?P<revision>[0-9]*)$', login_required(DeviceHistory.as_view()), name="device-history"),

     url(r'^devices/templates/$', login_required(TemplateList.as_view()), name="template-list"),
    url(r'^devices/templates/add$', login_required(TemplateCreate.as_view()), name="template-add"),
    url(r'^devices/templates/(?P<pk>[0-9]*)/edit/$', login_required(TemplateUpdate.as_view()), name="template-edit"),
    url(r'^devices/templates/(?P<pk>[0-9]*)/delete/$', login_required(TemplateDelete.as_view()), name="template-delete"),

    url(r'^types/$', login_required(TypeList.as_view()), name="type-list"),
    url(r'^types/(?P<page>[0-9]*)$', login_required(TypeList.as_view()), name="type-list"),
    url(r'^types/add$', login_required(TypeCreate.as_view()), name="type-add"),
    url(r'^types/edit/(?P<pk>[0-9]*)$', login_required(TypeUpdate.as_view()), name="type-edit"),
    url(r'^types/delete/(?P<pk>[0-9]*)$', login_required(TypeDelete.as_view()), name="type-delete"),
    url(r'^types/view/(?P<pk>[0-9]*)$', login_required(TypeDetail.as_view()), name="type-detail"),
    url(r'^types/merge/(?P<oldpk>[0-9]*)/(?P<newpk>[0-9]*)$', login_required(TypeMerge.as_view()), name="type-merge"),
    url(r'^types/attribute/add$', login_required(TypeAttributeCreate.as_view()), name="typeattribute-add"),
    url(r'^types/attribute/edit/(?P<pk>[0-9]*)$', login_required(TypeAttributeUpdate.as_view()), name="typeattribute-edit"),
    url(r'^types/attribute/delete/(?P<pk>[0-9]*)$', login_required(TypeAttributeDelete.as_view()), name="typeattribute-delete"),


    url(r'^rooms/$', login_required(RoomList.as_view()), name="room-list"),
    url(r'^rooms/(?P<page>[0-9]*)$', login_required(RoomList.as_view()), name="room-list"),
    url(r'^rooms/add$', login_required(RoomCreate.as_view()), name="room-add"),
    url(r'^rooms/edit/(?P<pk>.*)$', login_required(RoomUpdate.as_view()), name="room-edit"),
    url(r'^rooms/delete/(?P<pk>.*)$', login_required(RoomDelete.as_view()), name="room-delete"),
    url(r'^rooms/view/(?P<pk>.*)$', login_required(RoomDetail.as_view()), name="room-detail"),
{'fraction_non_alphanumeric': 0.23433188805675995, 'fraction_numerical': 0.01103665746945211, 'mean_word_length': 7.264657980456026, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '3172214', 'n_tokens_mistral': 3643, 'n_tokens_neox': 3457, 'n_words': 384}