<commit_before>from django.conf.urls.defaults import *
from django.views.generic.simple import redirect_to

from loginurl.views import cleanup, login

urlpatterns = patterns('',
    (r'^cleanup/$', cleanup),
    (r'^(?P<key>[0-9A-Za-z]+-[a-z0-9-]+)/$', login), 
    (r'^$', redirect_to, {'url': None}),
)
<commit_msg>Redirect to the default log in page when opening the loginurl page without any key.<commit_after>from django.conf.urls.defaults import *
from django.views.generic.simple import redirect_to
from django.conf import settings

from loginurl.views import cleanup, login

urlpatterns = patterns('',
    (r'^cleanup/$', cleanup),
    (r'^(?P<key>[0-9A-Za-z]+-[a-z0-9-]+)/$', login), 
    (r'^$', redirect_to, {'url': settings.LOGIN_URL}),
)

{'fraction_non_alphanumeric': 0.18508655126498003, 'fraction_numerical': 0.010652463382157125, 'mean_word_length': 4.611940298507463, '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': '3344251', 'n_tokens_mistral': 270, 'n_tokens_neox': 255, 'n_words': 62}