<commit_before>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
                                 PhotoCreate, PhotoDelete)


urlpatterns = patterns('imager_images.views',
    url(r'^upload/$', login_required(PhotoCreate.as_view()), name='upload'),
    url(r'^delete/(?P<id>\d+)/$', login_required(PhotoDelete.as_view()), name='delete'),
    url(r'^album_create/$', login_required(AlbumCreate.as_view()), name='album_create'),
    url(r'^album_update/(?P<id>\d+)/$', login_required(AlbumUpdate.as_view()), name='album_update'),
    url(r'^album_delete/(?P<id>\d+)/$', login_required(AlbumDelete.as_view()), name='album_delete'),
)<commit_msg>Change url routes to use primary key instead of id<commit_after>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
                                 PhotoCreate, PhotoDelete)


urlpatterns = patterns('imager_images.views',
    url(r'^upload/$', login_required(PhotoCreate.as_view()), name='upload'),
    url(r'^delete/(?P<pk>\d+)/$', login_required(PhotoDelete.as_view()), name='delete'),
    url(r'^album_create/$', login_required(AlbumCreate.as_view()), name='album_create'),
    url(r'^album_update/(?P<pk>\d+)/$', login_required(AlbumUpdate.as_view()), name='album_update'),
    url(r'^album_delete/(?P<pk>\d+)/$', login_required(AlbumDelete.as_view()), name='album_delete'),
)
{'fraction_non_alphanumeric': 0.17413249211356466, 'fraction_numerical': 0.0, 'mean_word_length': 5.663865546218488, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3923132', 'n_tokens_mistral': 506, 'n_tokens_neox': 486, 'n_words': 79}