This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link type="text/css" rel="stylesheet" href="rickshaw.min.css"> | |
</head> | |
<body> | |
<div id="chartcontainer-31992208"> | |
<div id="chartyaxis-31992208"></div> | |
<div id="chart-31992208"></div> | |
</div> |
This file contains hidden or 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.db import models | |
from polymorphic.polymorphic_model import PolymorphicModel | |
from cms.models.fields import PlaceholderField | |
from django.db.models.signals import pre_save | |
from django.template.defaultfilters import slugify | |
class Slugifier(object): | |
def __init__(self, model, target, source): | |
self.model = product | |
self.target = slug |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from django.db.models.signals import pre_save | |
from django.template.defaultfilters import slugify | |
class Slugifier(object): | |
def __init__(self, model, target, source): | |
self.model = model | |
self.target = target | |
self.source = source | |
field = self.model._meta.get_field_by_name(self.target)[0] |
This file contains hidden or 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
#blueBarHolder { | |
position: fixed; | |
top: 0; | |
} | |
#globalContainer { | |
padding-top: 38px; | |
} | |
#leftCol { |
This file contains hidden or 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
$.fn.doubleOptIn = function(){ | |
return this.each(function(){ | |
var ele = $(this); | |
ele.bind('click', function(event){ | |
event.preventDefault(); | |
if (ele.attr('type') == 'submit'){ | |
ele.val(ele.attr('x-opt-in-text')); | |
} else { | |
ele.text(ele.attr('x-opt-in-text')); | |
} |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from django.db import models | |
from django.db.models.query import QuerySet | |
class ChainableManager(models.Manager): | |
""" | |
A manager that allows chaining of all methods defined on it. | |
Example: |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# IS IN FOLDER ./src/ (github doesn't allow slashes in filenames on gists) | |
import os | |
import re | |
DEBUG = False | |
TEMPLATE_DEBUG = DEBUG | |
DEBUG_PROPAGATE_EXCEPTIONS = False | |
IS_DEV_SERVER = False | |
PREPEND_WWW = False |
This file contains hidden or 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
========================= | |
How the menu system works | |
========================= | |
Basic concepts | |
============== | |
Registration | |
------------ |
This file contains hidden or 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
""" | |
Dummy code for my thoughts described in https://groups.google.com/forum/#!topic/django-cms-developers/bFbhE1a-rTs | |
Note that this pseudo-implementation has problems where between `cache.get(...)` | |
in `get_cached` and `cache.set(...)` the value *could* have changed in the cache, | |
so some kind of better way to prevent overwriting changes done by others should | |
be implemented. | |
""" | |
# the local python in-memory cache | |
LOCAL_CACHE = {} |