This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$(document).ready(function() { | |
}); | |
})(django.jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import django.conf.global_settings as DEFAULT_SETTINGS | |
TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + ( | |
'django.core.context_processors.request', | |
'website.context_processors.site', | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function JSObject(options) { | |
var self = this, | |
defaultOptions = { | |
target: '#selector' // The target container selector | |
}; | |
// Extend the options, required to prepare this object before doing anything else. | |
if (typeof options === 'object') { | |
options = $.extend(defaultOptions, options); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ostinato.pages.registry import page_templates | |
page_templates.autodiscover() | |
if settings.DEBUG: | |
from django.conf.urls.static import static | |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns | |
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | |
urlpatterns += staticfiles_urlpatterns() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
PROJECT_VERSION = getattr(settings, 'PROJECT_VERSION') | |
class ETAGMiddleware(object): | |
def process_response(self, request, response): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) | |
base_dir = lambda *p: os.path.join(BASE_DIR, *p) | |
BUILDOUT_ROOT = os.path.dirname(BUILDOUT_ROOT) | |
buildout_root = lambda *p: os.path.join(BUILDOUT_ROOT, *p) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before his backbone damaged | |
new horizons discovered | |
with better seating angle adopted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def format_date_for_sforce(timestamp): | |
""" | |
Returns a datetime formatted as 2012-02-15T19:03:32-0800 | |
""" | |
if not timestamp: | |
return timestamp | |
total_seconds = timestamp.utcoffset().total_seconds() | |
minutes, seconds = divmod(total_seconds, 60) | |
hours, minutes = divmod(minutes, 60) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import base64 | |
from subprocess import call | |
from django import http | |
from django.conf import settings | |
from django_seo_js.backends import SEOBackendBase | |
SITE_CONF = getattr(settings, 'SITE_CONF') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_template_names(self, **kwargs): | |
if self.template_name: | |
return self.template_name | |
return self.page.get_template() |
OlderNewer