#!/usr/bin/env python import os # Edit this if necessary or override the variable in your environment. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'fjord.settings') from fjord import manage_utils manage_utils.setup_environ(__file__) from fjord.base import monkeypatches monkeypatches.patch() SKIP_CHECK = os.environ.get('SKIP_CHECK', '0') USING_VENDOR = os.environ.get('USING_VENDOR', '0') if USING_VENDOR == '0' and SKIP_CHECK != '1': manage_utils.check_dependencies() if __name__ == "__main__": manage_utils.main()
from django.conf import settings from django.conf.urls import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.http import HttpResponse # Note: This must come before importing admin because it patches the # admin. from fjord.base.monkeypatches import patch patch() from django.contrib import admin urlpatterns = patterns( '', (r'', include('fjord.analytics.urls')), (r'', include('fjord.base.urls')), (r'', include('fjord.events.urls')), (r'', include('fjord.feedback.urls')), (r'', include('fjord.heartbeat.urls')), # Generate a robots.txt ( r'^robots\.txt$', lambda r: HttpResponse( ("User-agent: *\n%s: /" % ( 'Allow' if settings.ENGAGE_ROBOTS else 'Disallow')), content_type="text/plain" ) ),