<commit_before>from django.conf.urls import patterns, include, url
from django.views.generic import ListView
from django.contrib import admin
from comicsite.models import ComicSite
 
admin.autodiscover()


urlpatterns = patterns('',
    
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),


    # main page 
    url(r'^$',ListView.as_view(model=ComicSite, template_name='index.html'),name = 'home'),
    #url(r'^Comic/$',ListView.as_view(model=ComicSite, template_name='index.html'),name = 'home'),
     
    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
        
    #specific view of single comicsite
    url(r'^site/(?P<site_short_name>\w+)/$','comicsite.views.site'),
    
    url(r'^site/(?P<site_short_name>\w+)/(?P<page_title>\w+)/$','comicsite.views.page'),

    url(r'^test/showData/$','comicsite.views.dataPage'),
    
    # requirement for social_auth
    #url(r'',include('social_auth.urls')),
)
    
<commit_msg>Now redirecting to page /Home for each site. So loading /site/VESSEL12 will redirect to /site/VESSEL12/Home/<commit_after>from django.conf.urls import patterns, include, url
from django.views.generic import ListView
from django.contrib import admin
from comicsite.models import ComicSite
from django.views.generic.simple import redirect_to

 
admin.autodiscover()


urlpatterns = patterns('',
    
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),


    # main page 
    url(r'^$',ListView.as_view(model=ComicSite, template_name='index.html'),name = 'home'),
    #url(r'^Comic/$',ListView.as_view(model=ComicSite, template_name='index.html'),name = 'home'),
     
    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
        
    #when viewing a site, redirect to /home page for that site
    url(r'^site/(?P<site_short_name>\w+)/$', redirect_to, {'url': '/site/%(site_short_name)s/Home'}),
    
    #this one is needed to be able make {% url work}  TODO: having two identical regexes here seems stinky.. can this be different?    
    url(r'^site/(?P<site_short_name>\w+)/$','comicsite.views.site'),
    
    url(r'^site/(?P<site_short_name>\w+)/(?P<page_title>\w+)/$','comicsite.views.page'),

    url(r'^test/showData/$','comicsite.views.dataPage'),
    
    # requirement for social_auth
    #url(r'',include('social_auth.urls')),
)
    

{'fraction_non_alphanumeric': 0.15977961432506887, 'fraction_numerical': 0.0015741833923652105, 'mean_word_length': 4.094188376753507, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '617164', 'n_tokens_mistral': 876, 'n_tokens_neox': 837, 'n_words': 174}