<commit_before># django imports
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template

# tagging imports
from tagging.views import tagged_object_list

# lfc imports
from lfc.feeds import PageTagFeed
from lfc.models import Page
from lfc.sitemap import PageSitemap

# Tags
urlpatterns = patterns("lfc.views",
    url(r'tag/(?P<slug>[-\w]+)/(?P<tag>[^/]+)/$', "lfc_tagged_object_list", name="page_tag_detail"),
)

# Comments
urlpatterns += patterns("",
    (r'^comments/', include('django.contrib.comments.urls')),
)

# Login / Logout
urlpatterns += patterns('django.contrib.auth.views',
    url('^login/?$',  "login",  { "template_name" : "lfc/login.html" },  name='lfc_login'),
    url('^logout/?$', "logout", { "template_name" : "lfc/logged_out.html" }, name='lfc_logout'),
)

# Feeds
feeds = {
    "rss" : PageTagFeed,
}
urlpatterns += patterns('',
    url(r'(?P<url>rss.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}, name="feed"),
)

# Sitemaps
urlpatterns += patterns("django.contrib.sitemaps.views",
    url(r'^sitemap.xml', 'sitemap', {'sitemaps': {"pages": PageSitemap}})
)

# Robots
urlpatterns += patterns('django.views.generic.simple',
    (r'^robots.txt', 'direct_to_template', {'template': 'lfc/robots.txt'}),
)

# LFC
urlpatterns += patterns('lfc.views',
    url(r'^(?P<language>[-\w]{2})/search-results', "search_results", name="lfc_search"),

    url(r'^set-language/(?P<language>[-\w]{2})/$', 'set_language', name="lfc_set_language"),
    url(r'^set-language/(?P<language>[-\w]{2})/(?P<id>\d+)/$', 'set_language', name="lfc_set_language"),
    
    url(r'^file/(?P<id>[-\w]*)', "file", name="lfc_file"),

    url(r'^(?P<language>[-\w]{2})/(?P<slug>.+)', "base_view", name="lfc_base_view"),
    url(r'^(?P<slug>.*)$', "base_view", name="lfc_base_view"),
)<commit_msg>Re-added urls for portal (for now)<commit_after># django imports
from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template

# tagging imports
from tagging.views import tagged_object_list

# lfc imports
from lfc.feeds import PageTagFeed
from lfc.models import Page
from lfc.sitemap import PageSitemap

# Tags
urlpatterns = patterns("lfc.views",
    url(r'tag/(?P<slug>[-\w]+)/(?P<tag>[^/]+)/$', "lfc_tagged_object_list", name="page_tag_detail"),
)

# Comments
urlpatterns += patterns("",
    (r'^comments/', include('django.contrib.comments.urls')),
)

# Login / Logout
urlpatterns += patterns('django.contrib.auth.views',
    url('^login/?$',  "login",  { "template_name" : "lfc/login.html" },  name='lfc_login'),
    url('^logout/?$', "logout", { "template_name" : "lfc/logged_out.html" }, name='lfc_logout'),
)

# Feeds
feeds = {
    "rss" : PageTagFeed,
}
urlpatterns += patterns('',
    url(r'(?P<url>rss.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}, name="feed"),
)

# Sitemaps
urlpatterns += patterns("django.contrib.sitemaps.views",
    url(r'^sitemap.xml', 'sitemap', {'sitemaps': {"pages": PageSitemap}})
)

# Robots
urlpatterns += patterns('django.views.generic.simple',
    (r'^robots.txt', 'direct_to_template', {'template': 'lfc/robots.txt'}),
)

# LFC
urlpatterns += patterns('lfc.views',
    url(r'^(?P<language>[-\w]{2})/search-results', "search_results", name="lfc_search"),

    url(r'^set-language/(?P<language>[-\w]{2})/$', 'set_language', name="lfc_set_language"),
    url(r'^set-language/(?P<language>[-\w]{2})/(?P<id>\d+)/$', 'set_language', name="lfc_set_language"),
    
    url(r'^file/(?P<id>[-\w]*)', "file", name="lfc_file"),

    url(r'^$', "portal", name="lfc_portal_view"),
    url(r'^(?P<language>[-\w]{2})/?$', "portal", name="lfc_portal_view"),
    
    url(r'^(?P<language>[-\w]{2})/(?P<slug>.+)', "base_view", name="lfc_base_view"),
    url(r'^(?P<slug>.*)$', "base_view", name="lfc_base_view"),
)
{'fraction_non_alphanumeric': 0.23249872253449158, 'fraction_numerical': 0.0022994379151762903, 'mean_word_length': 5.471074380165289, 'pattern_counts': {'":': 2, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5057598', 'n_tokens_mistral': 1541, 'n_tokens_neox': 1497, 'n_words': 223}