Permalink
Browse files

Working proof-of-concept separate app.

  • Loading branch information...
1 parent 082a5fa commit 62bf4d6b6e599852b5a4bbe421eed76abf12f100 @onyxfish onyxfish committed May 6, 2011
@@ -21,10 +21,14 @@
# Note: DATABASE_USER and DATABASE_PASSWORD are defined in the staging and
# production settings.py files. For local use, either define them in
# local_settings.py or ignore to use your local user.
-DATABASE_ENGINE = 'postgresql_psycopg2'
-DATABASE_HOST = 'localhost'
-DATABASE_PORT = '5432'
-DATABASE_NAME = 'boundaries'
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.contrib.gis.db.backends.postgis',
+ 'NAME': 'boundaries',
+ 'HOST': 'localhost',
+ 'PORT': '5432'
+ }
+}
# Local time
TIME_ZONE = 'America/Chicago'
@@ -56,9 +60,9 @@
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.load_template_source',
- 'django.template.loaders.app_directories.load_template_source',
- 'django.template.loaders.eggs.load_template_source',
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ 'django.template.loaders.eggs.Loader',
)
TEMPLATE_CONTEXT_PROCESSORS = (
@@ -94,7 +98,8 @@
'boundaryservice',
- 'boundaries.apps.api',
+ 'newsapps.templatelib',
+ 'boundaries.apps.demo',
)
# Predefined domain
@@ -6,11 +6,12 @@
urlpatterns = patterns('',
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
- (r'^admin/(.*)', admin.site.root),
+ (r'^admin/(.*)', admin.site.urls),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT
}),
+ (r'', include('boundaryservice.urls')),
(r'', include('demo.urls'))
)
@@ -5,10 +5,16 @@
TEMPLATE_DEBUG = DEBUG
# Database
-DATABASE_HOST = 'TODO'
-DATABASE_PORT = '5432'
-DATABASE_USER = 'boundaries'
-DATABASE_PASSWORD = 'TODO'
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.contrib.gis.db.backends.postgis',
+ 'NAME': 'boundaries',
+ 'HOST': 'TODO',
+ 'PORT': '5432',
+ 'USER': 'TODO',
+ 'PASSWORD': 'TODO'
+ }
+}
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
@@ -4,10 +4,16 @@
TEMPLATE_DEBUG = DEBUG
# Database
-DATABASE_HOST = 'TODO'
-DATABASE_PORT = '5433'
-DATABASE_USER = 'boundaries'
-DATABASE_PASSWORD = 'TODO'
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.contrib.gis.db.backends.postgis',
+ 'NAME': 'boundaries',
+ 'HOST': 'TODO',
+ 'PORT': '5432',
+ 'USER': 'TODO',
+ 'PASSWORD': 'TODO'
+ }
+}
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
View
No changes.
No changes.
@@ -0,0 +1,98 @@
+{# Omniture #}
+{% if settings.ENABLE_OMNITURE %}
+<img width="0" height="0" border="0" src="https://bp.specificclick.net?pixid=99017773" class=" cuyfopozpgpuztbxwbzq"/>
+<!-- SiteCatalyst code version: H.1. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com -->
+<script type="text/javascript" src="http://www.chicagotribune.com/hive/javascripts/metrics/s_code_trb.js"></script>
+<script language="JavaScript">
+ <!--
+
+ s.pageName="{{ page_name }}";
+ s.server="www.chicagotribune.com";
+ s.channel="Chicago Tribune:{{ settings.OMNITURE_SECTION }}:{{ settings.OMNITURE_SUBSECTION }}";
+
+ s.hier1="Chicago Tribune:{{ settings.OMNITURE_SECTION }}:{{ settings.OMNITURE_SUBSECTION }}:{{ settings.OMNITURE_APP_NAME }}";
+ s.hier2="{{ settings.OMNITURE_SECTION }}:{{ settings.OMNITURE_SUBSECTION }}:{{ settings.OMNITURE_APP_NAME }}";
+ s.hier4="{{ settings.OMNITURE_SECTION }}:{{ settings.OMNITURE_SUBSECTION }}:{{ settings.OMNITURE_APP_NAME }}";
+
+ //AD Block Detection
+ //Description: Check if any IMG, IFRAME, or SCRIPT elements are ad blocked (set to not display).
+ // Also check for the occurance of any Norton installed code to block popups or ads ( ie.)SymError ).
+ // Only need to find 1 occurrance of any of the above to confirm ad blocking is used.
+ // No need to continue searching through other portions of the page.
+
+ var imgArray = document.images;
+ var iframeArray = document.getElementsByTagName("iframe");
+ var scriptArray = document.getElementsByTagName("script");
+ var isAdBlocked = 0;
+
+
+ if(window.SymError || window.SymWinOpen || window.SymRealWinOpen)
+ { isAdBlocked=1; }
+
+ if (!isAdBlocked)
+ { for (var i=0; i<imgArray.length; i++)
+ { if(imgArray[i].style.display == 'none')
+ { isAdBlocked=1; break;} } }
+
+ if (!isAdBlocked)
+ { for (var j=0; j<iframeArray.length; j++)
+ { if (iframeArray[j].style.display == 'none')
+ { isAdBlocked=1; break;} } }
+
+ if (!isAdBlocked)
+ { for (var j=0; j<scriptArray.length; j++)
+ { if (scriptArray[j].style.display == 'none')
+ { isAdBlocked=1; break;} } }
+
+ if(isAdBlocked)
+ { s.prop50="ad blocking";}
+
+ /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
+ var s_code=s.t();if(s_code)document.write(s_code)//--> </script>
+<script language="JavaScript"><!--
+if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
+//--></script><!--/DO NOT REMOVE/-->
+<!-- End SiteCatalyst code version: H.1. -->
+
+<!-- START REVENUE SCIENCE PIXELLING CODE -->
+<script src="http://js.revsci.net/gateway/gw.js?csid=B08725"></script><script>
+ DM_addEncToLoc("Site", (s.server));
+ DM_addEncToLoc("channel", (s.channel));
+ DM_addEncToLoc("keyword", (s.prop3));
+ DM_cat(s.hier1);
+ DM_tag();
+</script>
+<!-- END REVENUE SCIENCE PIXELLING CODE -->
+{% endif %}
+
+{# Google Analytics #}
+{% if settings.ENABLE_GOOGLE_ANALYTICS %}
+<script type="text/javascript"> (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+</script>
+{% endif %}
+
+{# Chartbeat #}
+{% if settings.ENABLE_CHARTBEAT %}
+<script type="text/javascript">
+ var _sf_async_config={uid:3096,domain:"{{ settings.MY_SITE_DOMAIN }}"};
+ (function(){
+ function loadChartbeat() {
+ window._sf_endpt=(new Date()).getTime();
+ var e = document.createElement('script');
+ e.setAttribute('language', 'javascript');
+ e.setAttribute('type', 'text/javascript');
+ e.setAttribute('src',
+ (("https:" == document.location.protocol) ? "https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/" : "http://static.chartbeat.com/") +
+ "js/chartbeat.js");
+ document.body.appendChild(e);
+ }
+ var oldonload = window.onload;
+ window.onload = (typeof window.onload != 'function') ?
+ loadChartbeat : function() { oldonload(); loadChartbeat(); };
+ })();
+</script>
+{% endif %}
@@ -0,0 +1,13 @@
+{# Chartbeat #}
+{% if settings.ENABLE_CHARTBEAT %}
+<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
+{% endif %}
+
+{# Google Analytics #}
+{% if settings.ENABLE_GOOGLE_ANALYTICS %}
+<script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', '{{ settings.GOOGLE_ANALYTICS_KEY }}']);
+ _gaq.push(['_trackPageview']);
+</script>
+{% endif %}
Oops, something went wrong.

0 comments on commit 62bf4d6

Please sign in to comment.