The production environment is broken out into a few directories
versions
myxer
vx.x.x
production
| class DataCell(object): | |
| def __init__(self, data): | |
| self.data = data | |
| def set(self, val): | |
| self.data = val | |
| def get(self): | |
| return self.data | |
| def playlist_worker(profile, station, data): | |
| logging.debug('start playlist worker') |
| custom_keyword_list = ['wireless-home-security-systems', 'custom-keyword-twi'] | |
| if keyword in custom_keyword_list: | |
| response = render_to_response('local-pages/%s.html' % keyword, | |
| crime_stats_ctx, context_instance=RequestContext(request)) | |
| else: | |
| response = render_to_response('local-pages/index.html', | |
| crime_stats_ctx, context_instance=RequestContext(request)) |
| # urllib3/connectionpool.py | |
| # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) | |
| # | |
| # This module is part of urllib3 and is released under | |
| # the MIT License: http://www.opensource.org/licenses/mit-license.php | |
| import logging | |
| import socket | |
| from socket import timeout as SocketTimeout |
| @import "colors.less"; | |
| @import "mixins.less"; | |
| @import "base.less"; | |
| #content { | |
| .station-section { | |
| .station-title { | |
| font-size: 24px; | |
| padding-left: 4px; |
| /* GRAYS */ | |
| @black: #000; | |
| @dddd-gray: #242424; | |
| @ddd-gray: #323232; | |
| @dd-gray: #8c8c8e; | |
| @d-gray: #c7c6cb; | |
| @gray: #e7e7e9; | |
| @white: #FFF; | |
| /* REDS */ |
| /* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */ | |
| html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} | |
| body { | |
| text-align: center; | |
| font-size: 12px; | |
| font-family: "Arial Narrow", Arial, sans-serif; | |
| letter-spacing: 1.2px; | |
| } |
| from django.conf import settings | |
| from django.contrib.auth.models import User, check_password | |
| from django.contrib.sites.models import Site | |
| from django.contrib.auth.backends import ModelBackend | |
| from apps.common.models import User2Site | |
| class SitesBackend(ModelBackend): | |
| def authenticate(self, username=None, password=None): |
| def example_view(request, id): | |
| obj = Model.objects.get(id=id) | |
| context = {} | |
| context['obj'] = obj | |
| reponse_html = render_to_string('path/to/template.html', context, context_instance=RequestContext(request)) | |
| if request.is_ajax(): | |
| context['html'] = response_html | |
| return HttpResponse(json.dumps(context), mimetype="application/json") | |
| return HttpResponse(response_html) |
| $("#home-security-button-choice").click(function(){ | |
| var animated = false; | |
| if (!animated) { | |
| animated = true; | |
| $('.big-info').slideUp('fast',function() { | |
| $('.button-link > .active').fadeIn('slow'); | |
| $('.button-link > .active').removeClass('active'); | |
| $('#home-security-button-choice').fadeOut('fast'); | |
| $('#white-arrow').animate({left: '-925px'}, 500, function() { | |
| $('#home-security-choice').slideDown('fast'); |