Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 065ccae0f8
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (16 sloc) 0.639 kB
from collections import defaultdict
from django.conf import settings
DEFAULT_LIKE_CONFIG = getattr(settings, "PHILEO_DEFAULT_LIKE_CONFIG", {
"css_class_on": "icon-heart",
"css_class_off": "icon-heart-empty",
"like_text_on": "Unlike",
"like_text_off": "Like",
"count_text_singular": "like",
"count_text_plural": "likes"
})
LIKABLE_MODELS = getattr(settings, "PHILEO_LIKABLE_MODELS", defaultdict(dict))
for model in LIKABLE_MODELS:
custom_data = LIKABLE_MODELS[model].copy()
default_data = DEFAULT_LIKE_CONFIG.copy()
LIKABLE_MODELS[model] = default_data
LIKABLE_MODELS[model].update(custom_data)
Jump to Line
Something went wrong with that request. Please try again.