<commit_before>from django.conf.urls.defaults import *
from django.views import static
from django.conf import settings   
from django.contrib import admin

from flightdeck.base import views as base_views

admin.autodiscover()

try:
	import grappelli
	urls = [(r'^grappelli/', include('grappelli.urls'))]
except:
	urls = []

urls.extend([
	# home
	# temporary fix - please uncomment after fixing landing page
	url(r'^$',base_views.homepage, name='home'),
	#url(r'^$', 'jetpack.views.gallery', {'type': 'jetpack'}, name='home'),

	# admin
	(r'^admin/doc/', include('django.contrib.admindocs.urls')),
	(r'^admin/', include(admin.site.urls)),

	# static files
	# this should be used only in development server
	url(r'^media/(?P<path>.*)$', static.serve, {'document_root': settings.MEDIA_ROOT}, name='media'),

	# API Browser
	(r'^api/', include('api.urls')),

	# Tutorial
	(r'^tutorial/', include('tutorial.urls')),

	# Jetpack
	(r'^user/', include('person.urls')),
	(r'', include('jetpack.urls'))
])
urlpatterns = patterns('', *urls)<commit_msg>switching off admin URL for servers with DEBUG=False<commit_after>from django.conf.urls.defaults import *
from django.views import static
from django.conf import settings   
from django.contrib import admin

from flightdeck.base import views as base_views

admin.autodiscover()


urls = [
	# home
	url(r'^$',base_views.homepage, name='home'),
	]

if settings.DEBUG:

	try:
		import grappelli
		urls.append((r'^grappelli/', include('grappelli.urls')))
	except:
		""
	# admin
	urls.extend([
		(r'^admin/doc/', include('django.contrib.admindocs.urls')),
		(r'^admin/', include(admin.site.urls))
	])

urls.extend([
	# static files
	# this should be used only in development server
	# please refer to http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-media-files
	url(r'^media/(?P<path>.*)$', static.serve, {'document_root': settings.MEDIA_ROOT}, name='media'),

	# API Browser
	(r'^api/', include('api.urls')),

	# Tutorial
	(r'^tutorial/', include('tutorial.urls')),

	# Jetpack
	(r'^user/', include('person.urls')),
	(r'', include('jetpack.urls'))
])
urlpatterns = patterns('', *urls)
{'fraction_non_alphanumeric': 0.1831314072693383, 'fraction_numerical': 0.0, 'mean_word_length': 5.169540229885057, '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': '4767778', 'n_tokens_mistral': 784, 'n_tokens_neox': 757, 'n_words': 163}