text
stringlengths
0
1.05M
meta
dict
from django import template from django.contrib.contenttypes.models import ContentType from types import ListType,TupleType from xformmanager.models import * from hq.models import * from reporters.models import Reporter, ReporterGroup import xformmanager.adapter.querytools as qtools import hq.utils as utils im...
{ "repo_name": "commtrack/commtrack-old-to-del", "path": "apps/hq/registration.py", "copies": "1", "size": "2076", "license": "bsd-3-clause", "hash": -2815490555785412600, "line_mean": 28.6714285714, "line_max": 132, "alpha_frac": 0.6281310212, "autogenerated": false, "ratio": 4.038910505836576, ...
from django import template from django.contrib.contenttypes.models import ContentType from types import ListType,TupleType from xformmanager.models import * from hq.models import * import xformmanager.adapter.querytools as qtools import hq.utils as utils import time from datetime import timedelta import gra...
{ "repo_name": "commtrack/commtrack-core", "path": "apps/hq/reporter/inspector.py", "copies": "3", "size": "8100", "license": "bsd-3-clause", "hash": -8546935492206662000, "line_mean": 38.9014778325, "line_max": 132, "alpha_frac": 0.620617284, "autogenerated": false, "ratio": 3.877453326950694, ...
from django import template from django.contrib.contenttypes.models import ContentType import random from ..models import Block, Teaser, Template register = template.Library() @register.assignment_tag def random_teasers(block_slug, *args, **kwargs): block = Block.objects.get(slug=block_slug) try: l...
{ "repo_name": "evgeny-dmi3ev/django-teasers", "path": "teasers/templatetags/teasers_tags.py", "copies": "1", "size": "1694", "license": "unlicense", "hash": 8431598326071075000, "line_mean": 30.3703703704, "line_max": 69, "alpha_frac": 0.5590318772, "autogenerated": false, "ratio": 3.841269841269...
from django import template from django.contrib.contenttypes.models import ContentType from coffin.template.loader import render_to_string from tcc import api from tcc.forms import CommentForm from tcc.utils import get_content_types from tcc.views import _get_comment_form register = template.Library() @register.si...
{ "repo_name": "pterk/django-tcc", "path": "tcc/templatetags/tcc_tags.py", "copies": "1", "size": "1132", "license": "mit", "hash": 4070126028475286000, "line_mean": 32.2941176471, "line_max": 61, "alpha_frac": 0.6643109541, "autogenerated": false, "ratio": 3.723684210526316, "config_test": fals...
from django import template from django.contrib.contenttypes.models import ContentType from ..conf import settings register = template.Library() @register.inclusion_tag("pinax/referrals/_create_referral_form.html", takes_context=True) def create_referral(context, url, obj=None): if obj: context.update( ...
{ "repo_name": "pinax/pinax-referrals", "path": "pinax/referrals/templatetags/pinax_referrals_tags.py", "copies": "1", "size": "1462", "license": "mit", "hash": -5217297804167136000, "line_mean": 27.1153846154, "line_max": 89, "alpha_frac": 0.6313269494, "autogenerated": false, "ratio": 3.53140096...
from django import template from django.contrib.contenttypes.models import ContentType from ella_newman.conf import newman_settings from ella.ellacomments.newman_admin import MODELS_WITH_COMMENTS from ella.core.models.publishable import Publishable from ella.positions.models import Position register = template.Librar...
{ "repo_name": "ella/ella-newman", "path": "ella_newman/templatetags/newman_frontend_tags.py", "copies": "1", "size": "2828", "license": "bsd-3-clause", "hash": 7621096260213939000, "line_mean": 32.2705882353, "line_max": 125, "alpha_frac": 0.6432107496, "autogenerated": false, "ratio": 3.39495798...
from django import template from django.contrib.contenttypes.models import ContentType from molo.commenting.models import MoloComment # NOTE: heavily inspired by # https://github.com/santiagobasulto/django-comments-utils register = template.Library() def get_molo_comments(parser, token): """ Get a l...
{ "repo_name": "praekelt/molo.commenting", "path": "molo/commenting/templatetags/molo_commenting_tags.py", "copies": "1", "size": "5536", "license": "bsd-2-clause", "hash": -3437208367617208300, "line_mean": 31.7573964497, "line_max": 98, "alpha_frac": 0.6268063584, "autogenerated": false, "ratio"...
from django import template from django.contrib.contenttypes.models import ContentType from topics.models import Topic register = template.Library() def show_topic(context, topic): return { "topic": topic, "group": context.get("group"), } register.inclusion_tag("topics/topic_item.html", takes...
{ "repo_name": "ericholscher/pinax", "path": "pinax/apps/topics/templatetags/topics_tags.py", "copies": "2", "size": "1418", "license": "mit", "hash": -6797030528501844000, "line_mean": 33.6097560976, "line_max": 84, "alpha_frac": 0.6622002821, "autogenerated": false, "ratio": 3.8324324324324324, ...
from django import template from django.contrib.contenttypes.models import ContentType from votes.models import Vote register = template.Library() @register.tag def vote_form(parser, token): bits = token.split_contents() return VoteFormNode(*bits[1:]) class VoteFormNode(template.Node): def __init__(self, obj, tp...
{ "repo_name": "sheshkovsky/jaryan", "path": "votes/templatetags/votes_tags.py", "copies": "1", "size": "2314", "license": "apache-2.0", "hash": -1424340707074069200, "line_mean": 30.7123287671, "line_max": 96, "alpha_frac": 0.6672428695, "autogenerated": false, "ratio": 3.5709876543209877, "con...
from django import template from django.contrib.contenttypes.models import ContentType import re from links.models import ObjectLink register = template.Library() """ @register.inclusion_tag('links/cms_plugins/links.html', takes_context = True) def links(context): # print "in links" #Publishes all the links...
{ "repo_name": "evildmp/Arkestra", "path": "links/templatetags/link_tags.py", "copies": "2", "size": "2919", "license": "bsd-2-clause", "hash": 1708722139930903300, "line_mean": 35.9493670886, "line_max": 140, "alpha_frac": 0.6128811237, "autogenerated": false, "ratio": 3.9024064171122994, "conf...
from django import template from django.contrib.contenttypes.models import ContentType register = template.Library() @register.simple_tag def create_object_count(app=None): """fetches all models of the passed in app and returns a dict containg the name of each class and the number of instances""" if ap...
{ "repo_name": "vanyh/handkeinzungen-app", "path": "stats/templatetags/stats_extras.py", "copies": "1", "size": "1349", "license": "mit", "hash": 8845338280336902000, "line_mean": 28.9777777778, "line_max": 71, "alpha_frac": 0.4996293551, "autogenerated": false, "ratio": 4.76678445229682, "confi...
from django import template from django.contrib.gis.geoip2 import GeoIP2 from django.utils import timezone from django.utils.translation import gettext as _ import pytz from geoip2.errors import GeoIP2Error from ipware.ip import get_real_ip from ua_parser import user_agent_parser register = template.Library() @regi...
{ "repo_name": "richardcornish/richardcornish", "path": "richardcornish/utils/templatetags/user_tags.py", "copies": "1", "size": "2050", "license": "bsd-3-clause", "hash": 4897792079001711000, "line_mean": 29.5970149254, "line_max": 83, "alpha_frac": 0.6024390244, "autogenerated": false, "ratio": ...
from django import template from django.contrib.humanize.templatetags.humanize import intcomma from django.conf import settings from django.db.models import Count, Case, When, Value, IntegerField from midnight_catalog.models import Section from midnight_main.services import mark_current_menus register = template.Libr...
{ "repo_name": "webadmin87/midnight", "path": "midnight_catalog/templatetags/midnight_catalog.py", "copies": "1", "size": "3619", "license": "bsd-3-clause", "hash": 5684580267702569000, "line_mean": 31.4042553191, "line_max": 142, "alpha_frac": 0.6910702561, "autogenerated": false, "ratio": 2.5553...
from django import template from django.contrib.humanize.templatetags.humanize import intcomma from django.core.paginator import Paginator from django.template import loader from django.utils.encoding import force_text from django.utils.safestring import mark_safe from six.moves.urllib.parse import parse_qsl import six...
{ "repo_name": "imsweb/django-seeker", "path": "seeker/templatetags/seeker.py", "copies": "1", "size": "3649", "license": "bsd-2-clause", "hash": -5283038799287921000, "line_mean": 30.7304347826, "line_max": 113, "alpha_frac": 0.6522334886, "autogenerated": false, "ratio": 3.5086538461538463, "c...
from django import template from django.contrib.humanize.templatetags.humanize import intcomma from django.urls import reverse try: import locale locale.setlocale(locale.LC_ALL, 'es_MX.UTF-8') except Exception: try: locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') except Exception as e: p...
{ "repo_name": "SGC-Tlaxcala/cmi", "path": "cerebro/core/templatetags/sgc.py", "copies": "1", "size": "5965", "license": "mit", "hash": -7525732472554143000, "line_mean": 22.9518072289, "line_max": 116, "alpha_frac": 0.5860160966, "autogenerated": false, "ratio": 3.2030075187969924, "config_test...
from django import template from django.contrib.humanize.templatetags.humanize import intcomma from datetime import datetime register = template.Library() @register.filter(name='formatnumber') def format_number(value, arg=0): try: rounded_value = round(float(value), arg) int_part = intcomma(int(r...
{ "repo_name": "nyrocron/evedashboard", "path": "charinfo/templatetags/charinfo_filters.py", "copies": "1", "size": "1317", "license": "mpl-2.0", "hash": -6459508774798319000, "line_mean": 26.4375, "line_max": 76, "alpha_frac": 0.5975702354, "autogenerated": false, "ratio": 3.7308781869688383, "...
from django import template from django.contrib.humanize.templatetags.humanize import naturaltime from datetime import timedelta, date as date_module from django.utils import timezone from bleach import clean register = template.Library() @register.filter(name='pretty_date') def date_prettifier(date): """ Th...
{ "repo_name": "GreatBizTools/django-threaded-messages", "path": "threaded_messages/templatetags/threaded_azul.py", "copies": "1", "size": "4271", "license": "mit", "hash": -6273291815598537000, "line_mean": 32.3671875, "line_max": 125, "alpha_frac": 0.6443455865, "autogenerated": false, "ratio": ...
from django import template from django.contrib import admin from django.core.urlresolvers import reverse from django.db.models import Q from gipsy.dashboard.models import GipsyDashboardMenu from gipsy.dashboard.settings import GIPSY_DASHBOARD_URL,\ GIPSY_VANILLA_INDEX_URL, GIPSY_THEME, GIPSY_DASHBOARD_TITLE,\ ...
{ "repo_name": "RevSquare/gipsy", "path": "gipsy/dashboard/templatetags/gipsy_dashboard.py", "copies": "1", "size": "5626", "license": "mit", "hash": 1363388053258869000, "line_mean": 30.9659090909, "line_max": 108, "alpha_frac": 0.6372200498, "autogenerated": false, "ratio": 3.7332448573324486, ...
from django import template from django.contrib import comments from django.contrib.comments.models import CommentFlag from django.core.exceptions import ObjectDoesNotExist from scipy_central.person.models import User from scipy_central.comments.forms import SpcCommentEditForm register = template.Library() @register....
{ "repo_name": "oswalpalash/OctaveCodeShare", "path": "scipy_central/comments/templatetags/SpcComments.py", "copies": "5", "size": "1501", "license": "bsd-3-clause", "hash": -108147710887598820, "line_mean": 29.6326530612, "line_max": 72, "alpha_frac": 0.6822118588, "autogenerated": false, "ratio"...
from django import template from django.contrib import messages from django.contrib.admin import helpers from django.shortcuts import render_to_response from django.utils.translation import ugettext as _ import object_tools from superhero.forms import ImportForm from superhero.models import Superhero class Superher...
{ "repo_name": "praekelt/jmbo-superhero", "path": "superhero/tools.py", "copies": "1", "size": "1487", "license": "bsd-3-clause", "hash": -683179834516169100, "line_mean": 30.6382978723, "line_max": 79, "alpha_frac": 0.6267652993, "autogenerated": false, "ratio": 4.492447129909365, "config_test"...
from django import template from django.contrib.messages import constants from django.utils.translation import ugettext_lazy as _ register = template.Library() @register.simple_tag def join_strings(strs, last_join_word, join_word): """ Joins a list of strings with 'join_word' and the last one 'l...
{ "repo_name": "calendall/calendall", "path": "calendall/core/templatetags/core_tags.py", "copies": "1", "size": "1194", "license": "bsd-3-clause", "hash": -1285008784067186200, "line_mean": 23.3673469388, "line_max": 65, "alpha_frac": 0.6139028476, "autogenerated": false, "ratio": 3.6513761467889...
from django import template from django.contrib.messages.utils import get_level_tags from django.utils.encoding import force_text LEVEL_TAGS = get_level_tags() register = template.Library() @register.simple_tag() def get_message_tags(message): """ Returns the message's level_tag prefixed with Bootstrap's "...
{ "repo_name": "GotlingSystem/apnea", "path": "src/apps/pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py", "copies": "1", "size": "1108", "license": "mit", "hash": 4747369010780179000, "line_mean": 28.1578947368, "line_max": 80, "alpha_frac": 0.6678700361, "autogenerated": false, "...
from django import template from django.contrib.sites.models import get_current_site from content_edit.models import CmsContent register = template.Library() class CmsContentNode(template.Node): def __init__(self, content_name): self.content_name = content_name def render(self, context): site ...
{ "repo_name": "avinashdevicode/django-content-edit-master", "path": "content_edit/templatetags/content_edit_tags.py", "copies": "1", "size": "1395", "license": "bsd-3-clause", "hash": -7529974098535611000, "line_mean": 37.75, "line_max": 132, "alpha_frac": 0.6358422939, "autogenerated": false, "r...
from django import template from django.contrib.sites.models import Site from django.conf import settings from ..utils import string_to_dict, roundrobin register = template.Library() @register.tag def opengraph_meta(parser, token): try: tag_name, properties = token.split_contents() except ValueError: ...
{ "repo_name": "saippuakauppias/django-simple-open-graph", "path": "simple_open_graph/templatetags/simple_open_graph.py", "copies": "1", "size": "1873", "license": "isc", "hash": -7434837616283129000, "line_mean": 35.7254901961, "line_max": 97, "alpha_frac": 0.6001067806, "autogenerated": false, "...
from django import template from django.contrib.sites.models import Site from django.templatetags.static import StaticNode from django.contrib.staticfiles.storage import staticfiles_storage from sitesngine.hosts.middleware import site_folder_name from sitesngine.hosts.utils import current_site_id __author__ = 'fearles...
{ "repo_name": "eggforsale/django-sitesngine", "path": "sitesngine/hosts/templatetags/sitesngine_static.py", "copies": "1", "size": "1180", "license": "mit", "hash": -9008234886826080000, "line_mean": 25.8409090909, "line_max": 78, "alpha_frac": 0.6966101695, "autogenerated": false, "ratio": 3.769...
from django import template from django.contrib.sites.shortcuts import get_current_site from django.contrib.contenttypes.models import ContentType register = template.Library() @register.inclusion_tag('includes/social_links.html', takes_context=True) def social_links(context, object, user=None, authed=False, downabl...
{ "repo_name": "tBaxter/tango-shared-core", "path": "tango_shared/templatetags/social_tags.py", "copies": "2", "size": "1115", "license": "mit", "hash": 1811643787228215000, "line_mean": 31.7941176471, "line_max": 95, "alpha_frac": 0.6582959641, "autogenerated": false, "ratio": 3.8850174216027873,...
from django import template from django.contrib.staticfiles.finders import AppDirectoriesFinder from django.contrib.staticfiles.storage import staticfiles_storage from django.urls import resolve, reverse register = template.Library() @register.simple_tag def tango_admin_css(): """ Inserts tango_admin css lin...
{ "repo_name": "tBaxter/tango-admin", "path": "tango_admin/templatetags/tango_admin_tags.py", "copies": "1", "size": "1734", "license": "mit", "hash": 5308145643831802000, "line_mean": 32.3461538462, "line_max": 86, "alpha_frac": 0.6562860438, "autogenerated": false, "ratio": 3.7532467532467533, ...
from django import template from django.contrib.staticfiles import finders from django.core.files.storage import default_storage from django.core.mail import make_msgid from email.mime.image import MIMEImage register = template.Library() @register.simple_tag(takes_context=True, name="emailimage_static") def emailima...
{ "repo_name": "jonge-democraten/hemres", "path": "hemres/templatetags/hemres_email.py", "copies": "1", "size": "2390", "license": "mit", "hash": 6198496061671751000, "line_mean": 26.4712643678, "line_max": 84, "alpha_frac": 0.610460251, "autogenerated": false, "ratio": 3.7169517884914463, "conf...
from django import template from django.contrib.staticfiles.storage import staticfiles_storage from django.templatetags.static import StaticNode from django.conf import settings from ..models import SiteInstance from ..helpers import get_current_site register = template.Library() @register.inclusion_tag('djangocms_s...
{ "repo_name": "ptMuta/djangocms-siteselector", "path": "templatetags/site_selector.py", "copies": "1", "size": "1106", "license": "mit", "hash": -4260607080966720000, "line_mean": 30.6, "line_max": 121, "alpha_frac": 0.7197106691, "autogenerated": false, "ratio": 3.8137931034482757, "config_tes...
from django import template from django.contrib.staticfiles.storage import staticfiles_storage from urlparse import urlparse import time import re twitter_username_re = re.compile(r'@([A-Za-z0-9_]+)') register = template.Library() def fill(template, path): static_path = staticfiles_storage.url(path) retur...
{ "repo_name": "haystack/eyebrowse-server", "path": "common/templatetags/filters.py", "copies": "1", "size": "1252", "license": "mit", "hash": 2472793814954557400, "line_mean": 20.5862068966, "line_max": 140, "alpha_frac": 0.6661341853, "autogenerated": false, "ratio": 3.286089238845144, "config...
from django import template from django.contrib.staticfiles.templatetags.staticfiles import static from django.contrib.staticfiles.storage import staticfiles_storage register = template.Library() class IfStaticNode(template.Node): child_nodelists = ('nodelist_true', 'nodelist_false') def __init__(self, var1, n...
{ "repo_name": "luminousflux/lflux", "path": "lfluxproject/ltools/templatetags/ifstatic.py", "copies": "1", "size": "1776", "license": "mit", "hash": 4806308824001777000, "line_mean": 31.2909090909, "line_max": 79, "alpha_frac": 0.625, "autogenerated": false, "ratio": 3.903296703296703, "config_...
from django import template from django.core.cache import cache from django.contrib.sites.models import Site from simpleblocks.models import SimpleBlock from simpleblocks.utils import get_cache_key, get_setting register = template.Library() def get_simple_block(parser, token): """ Returns a block according ...
{ "repo_name": "alfredo/django-simpleblocks", "path": "src/simpleblocks/templatetags/simpleblocks_tags.py", "copies": "1", "size": "1394", "license": "bsd-3-clause", "hash": -2061699118697867800, "line_mean": 29.9777777778, "line_max": 91, "alpha_frac": 0.6319942611, "autogenerated": false, "ratio...
from django import template from django.core.cache import cache from django.core.urlresolvers import resolve, reverse, Resolver404 from django.db.models import Count from articles.models import Article, Tag from datetime import datetime import math register = template.Library() class GetCategoriesNode(template.Node):...
{ "repo_name": "codekoala/django-articles", "path": "articles/templatetags/article_tags.py", "copies": "5", "size": "9814", "license": "bsd-3-clause", "hash": -4992962025936674000, "line_mean": 30.8636363636, "line_max": 131, "alpha_frac": 0.5992459751, "autogenerated": false, "ratio": 4.120067170...
from django import template from django.core.cache import cache from django.core.urlresolvers import resolve, reverse, Resolver404 from django.db.models import Count from fle_site.apps.articles.models import Article, Tag from datetime import datetime import math register = template.Library() class GetCategoriesNode(t...
{ "repo_name": "fle-internal/fle-home", "path": "fle_site/apps/articles/templatetags/article_tags.py", "copies": "5", "size": "9828", "license": "mit", "hash": 4330188494936443400, "line_mean": 30.9090909091, "line_max": 131, "alpha_frac": 0.5995115995, "autogenerated": false, "ratio": 4.113855169...
from django import template from django.core.cache import cache from django.core.urlresolvers import resolve, reverse, Resolver404 from portfolio.models import Project, Category register = template.Library() class GetFeaturedProjectsNode(template.Node): """ Retrieves all features projects """ def __i...
{ "repo_name": "olofsj/tokotoko-portfolio", "path": "portfolio/templatetags/portfolio_tags.py", "copies": "1", "size": "2042", "license": "bsd-3-clause", "hash": -1873944223738108200, "line_mean": 25.8684210526, "line_max": 97, "alpha_frac": 0.6738491675, "autogenerated": false, "ratio": 4.5478841...
from django import template from django.core.cache import cache from django.db.models import signals from django.contrib.sites.models import Site from ..models import Keycode from ..utils import get_providers_by_alias # sitemetrics keykodes are stored in Django cache for a year (60 * 60 * 24 * 365 = 31536000 sec). #...
{ "repo_name": "andresriancho/django-sitemetrics", "path": "sitemetrics/templatetags/sitemetrics.py", "copies": "1", "size": "3054", "license": "bsd-3-clause", "hash": 7327415077441222000, "line_mean": 36.7037037037, "line_max": 166, "alpha_frac": 0.6519318926, "autogenerated": false, "ratio": 3.9...
from django import template from django.core.cache import cache from django.db.models import Sum from crate.web.packages.models import Package, Release, ReleaseFile, ChangeLog register = template.Library() @register.assignment_tag def package_download_count(package_name=None): if package_name is None: c...
{ "repo_name": "crateio/crate.web", "path": "crate/web/packages/templatetags/package_tags.py", "copies": "1", "size": "2913", "license": "bsd-2-clause", "hash": 7318133370305382000, "line_mean": 27.2815533981, "line_max": 169, "alpha_frac": 0.6666666667, "autogenerated": false, "ratio": 3.63670411...
from django import template from django.core.cache import cache from django.db.models import Sum from packages.models import Package, Release, ReleaseFile, ChangeLog register = template.Library() @register.assignment_tag def package_download_count(package_name=None): if package_name is None: cached = ca...
{ "repo_name": "crate-archive/crate-site", "path": "crateweb/apps/packages/templatetags/package_tags.py", "copies": "1", "size": "2903", "license": "bsd-2-clause", "hash": 6095568106344020000, "line_mean": 27.1844660194, "line_max": 169, "alpha_frac": 0.6662073717, "autogenerated": false, "ratio":...
from django import template from django.core.cache import cache from django.template.defaultfilters import stringfilter from django.template.loader import render_to_string from django.utils.html import conditional_escape from django.utils.safestring import mark_safe register = template.Library() def __get_cached_aut...
{ "repo_name": "dominicrodger/django-magazine", "path": "magazine/templatetags/magazine_tags.py", "copies": "1", "size": "1978", "license": "mit", "hash": -2023993152246017800, "line_mean": 27.2571428571, "line_max": 79, "alpha_frac": 0.6122345804, "autogenerated": false, "ratio": 3.94810379241516...
from django import template from django.core.cache import cache from django.template import loader from ietf.idtracker.models import Area register = template.Library() @register.filter(name='std_level_prompt') def std_level_prompt(doc): """ Returns the name from the std level names table corresponding to ...
{ "repo_name": "mcr/ietfdb", "path": "ietf/idrfc/templatetags/mail_filters.py", "copies": "1", "size": "1342", "license": "bsd-3-clause", "hash": 4350020629404495400, "line_mean": 33.4102564103, "line_max": 97, "alpha_frac": 0.6877794337, "autogenerated": false, "ratio": 3.7591036414565826, "con...
from django import template from django.core.cache import cache from django.template import Node, TemplateSyntaxError, Variable from django.template import resolve_variable register = template.Library() class CacheNode(Node): def __init__(self, nodelist, expire_time, key): self.nodelist = nodelist ...
{ "repo_name": "thread/django-sensible-caching", "path": "cache_toolbox/templatetags/cache_toolbox.py", "copies": "4", "size": "2055", "license": "bsd-3-clause", "hash": -5565949947036332000, "line_mean": 28.7826086957, "line_max": 80, "alpha_frac": 0.6486618005, "autogenerated": false, "ratio": 4...
from django import template from django.core.cache import cache from django.template import Node, TemplateSyntaxError, Variable register = template.Library() class CacheNode(Node): def __init__(self, nodelist, expire_time, key): self.nodelist = nodelist self.expire_time = Variable(expire_time) ...
{ "repo_name": "lamby/django-cache-toolbox", "path": "cache_toolbox/templatetags/cache_toolbox.py", "copies": "1", "size": "2014", "license": "bsd-3-clause", "hash": -3891380380396165600, "line_mean": 26.9722222222, "line_max": 80, "alpha_frac": 0.6425024826, "autogenerated": false, "ratio": 4.052...
from django import template from django.core.cache import cache from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ObjectDoesNotExist from idioticon.models import Term register = template.Library() @register.inclusion_tag('popover_enabled_icon.html') def popover_info(term_slug,...
{ "repo_name": "DeppSRL/open_bilanci", "path": "bilanci_project/idioticon/templatetags/popover_info.py", "copies": "1", "size": "1223", "license": "mit", "hash": 8135857557337716000, "line_mean": 30.358974359, "line_max": 93, "alpha_frac": 0.5944399019, "autogenerated": false, "ratio": 4.104026845...
from django import template from django.core.cache import cache from docutils import nodes from docutils.core import publish_parts from docutils.parsers.rst import directives, Directive from docutils.core import publish_cmdline, default_description from pygments import highlight from pygments.lexers import get_lexer_by...
{ "repo_name": "Justasic/StackSmash", "path": "StackSmash/apps/lib/templatetags/restructuredtext_filter.py", "copies": "1", "size": "3821", "license": "bsd-2-clause", "hash": -8405356434134755000, "line_mean": 40.989010989, "line_max": 103, "alpha_frac": 0.6370060194, "autogenerated": false, "rati...
from django import template from django.core.cache import cache from djsilver.config import DATABASE_NAME from djsilver.models import FacultyHomePageLive register = template.Library() class GetProf(template.Node): def __init__(self, bits): self.varname = bits[2] self.email=bits[3] def __re...
{ "repo_name": "carthagecollege/django-djsilver", "path": "djsilver/templatetags/get_professor.py", "copies": "1", "size": "1340", "license": "unlicense", "hash": -3929602084702119400, "line_mean": 27.5106382979, "line_max": 99, "alpha_frac": 0.5962686567, "autogenerated": false, "ratio": 3.681318...
from django import template from django.core.cache import cache register = template.Library() class CacheStats(template.Node): """ Reads the cache stats out of the memcached cache backend. Returns `None` if no cache stats supported. """ def render(self, context): try: cache_sta...
{ "repo_name": "edisonlz/fruit", "path": "web_project/base/site-packages/memcache_status/templatetags/memcache_status_tags.py", "copies": "1", "size": "2502", "license": "apache-2.0", "hash": -5476135414154243000, "line_mean": 29.5243902439, "line_max": 76, "alpha_frac": 0.5955235811, "autogenerated...
from django import template from django.core.cache import cache register = template.Library() @register.tag def sass(parser, token): nodelist = parser.parse(('endsass',)) parser.delete_first_token() return SASSNode(nodelist) class SASSNode(template.Node): def __init__(self, nodelist): self....
{ "repo_name": "silviogutierrez/django-foundation-sass", "path": "foundation/templatetags/foundation.py", "copies": "1", "size": "4943", "license": "mit", "hash": -4335058136115483000, "line_mean": 27.9064327485, "line_max": 122, "alpha_frac": 0.5646368602, "autogenerated": false, "ratio": 4.11231...
from django import template from django.core.exceptions import FieldError from concepts.models import ConceptItem, Concept from django.contrib.contenttypes.models import ContentType register = template.Library() class ConceptsNode(template.Node): """ Sets a context variable to the concepts linked to the obj...
{ "repo_name": "callowayproject/django-concepts", "path": "concepts/templatetags/concepts_tags.py", "copies": "1", "size": "1211", "license": "apache-2.0", "hash": 6241914495907590000, "line_mean": 28.5365853659, "line_max": 111, "alpha_frac": 0.6837324525, "autogenerated": false, "ratio": 3.76086...
from django import template from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.contrib.auth.models import AnonymousUser from authority import get_check from authority import permissions from authority.compat import get_user_model from authority.models impor...
{ "repo_name": "MikkCZ/kitsune", "path": "authority/templatetags/permissions.py", "copies": "5", "size": "15494", "license": "bsd-3-clause", "hash": -2322422879119693000, "line_mean": 33.127753304, "line_max": 96, "alpha_frac": 0.5886149477, "autogenerated": false, "ratio": 4.2344902978956, "con...
from django import template from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.contrib.auth.models import AnonymousUser from authority.utils import get_check from authority import permissions from authority.compat import get_user_model from authority.models...
{ "repo_name": "PolicyStat/django-authority", "path": "authority/templatetags/permissions.py", "copies": "1", "size": "15493", "license": "bsd-3-clause", "hash": 585904858915735200, "line_mean": 33.1255506608, "line_max": 96, "alpha_frac": 0.5865874911, "autogenerated": false, "ratio": 4.241171639...
from django import template from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.template.defaulttags import token_kwargs from allauth.socialaccount.models import SocialApp from allauth.socialaccount.app_settings import QUERY_EMAIL from allauth.socialaccount....
{ "repo_name": "uroslates/django-allauth", "path": "allauth/socialaccount/providers/facebook/templatetags/facebook_tags.py", "copies": "1", "size": "1752", "license": "mit", "hash": -7124416141577130000, "line_mean": 32.6923076923, "line_max": 92, "alpha_frac": 0.676369863, "autogenerated": false, ...
from django import template from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django.utils.encoding import smart_str from django.utils.translation import ugettext_lazy as _ from django.template.defaulttags import kwarg...
{ "repo_name": "tzangms/PyConTW", "path": "pycon_project/apps/boxes/templatetags/boxes_tags.py", "copies": "1", "size": "3189", "license": "bsd-3-clause", "hash": 8879232870119036000, "line_mean": 33.2903225806, "line_max": 146, "alpha_frac": 0.5813734713, "autogenerated": false, "ratio": 4.404696...
from django import template from django.core.exceptions import ImproperlyConfigured from django.db import models from oida.decorators import is_app_installed def do_if_app(parser, token): """ An if statement that validates to True if an app is loaded. Example (the else tag is optional): {% if_ap...
{ "repo_name": "fabiant7t/django-oida", "path": "oida/templatetags/apps.py", "copies": "1", "size": "1470", "license": "bsd-3-clause", "hash": 1225587596903178000, "line_mean": 29.625, "line_max": 74, "alpha_frac": 0.6340136054, "autogenerated": false, "ratio": 3.8786279683377307, "config_test":...
from django import template from django.core.exceptions import ImproperlyConfigured from django.utils import six from compressor.cache import (cache_get, cache_set, get_offline_hexdigest, get_offline_manifest, get_templatetag_cachekey) from compressor.conf import settings from compressor....
{ "repo_name": "sivaprakashniet/push_pull", "path": "p2p/lib/python2.7/site-packages/compressor/templatetags/compress.py", "copies": "1", "size": "6708", "license": "bsd-3-clause", "hash": -6415879959880551000, "line_mean": 33.9375, "line_max": 117, "alpha_frac": 0.6341681574, "autogenerated": false...
from django import template from django.core.exceptions import ImproperlyConfigured from django.utils.safestring import mark_safe from ..processors import AssetRegistry register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(...
{ "repo_name": "funkybob/django-amn", "path": "src/damn/templatetags/damn.py", "copies": "1", "size": "1876", "license": "bsd-2-clause", "hash": 3285554143359278600, "line_mean": 27.8615384615, "line_max": 94, "alpha_frac": 0.657249467, "autogenerated": false, "ratio": 4.372960372960373, "config...
from django import template from django.core.exceptions import ImproperlyConfigured from classytags.exceptions import InvalidFlag from classytags.utils import NULL, TemplateConstant, mixin from classytags.values import ( ChoiceValue, DictValue, IntegerValue, ListValue, StrictStringValue, StringValue, ) class...
{ "repo_name": "ojii/django-classy-tags", "path": "classytags/arguments.py", "copies": "1", "size": "7189", "license": "bsd-3-clause", "hash": -3914516131776674000, "line_mean": 29.8540772532, "line_max": 79, "alpha_frac": 0.5682292391, "autogenerated": false, "ratio": 4.304790419161677, "config...
from django import template from django.core.exceptions import ImproperlyConfigured from compressor.cache import (cache_get, cache_set, get_offline_hexdigest, get_offline_manifest, get_templatetag_cachekey) from compressor.conf import settings from compressor.exceptions import OfflineGene...
{ "repo_name": "neumerance/cloudloon2", "path": ".venv/lib/python2.7/site-packages/compressor/templatetags/compress.py", "copies": "3", "size": "7548", "license": "apache-2.0", "hash": 506658015254795840, "line_mean": 34.6037735849, "line_max": 117, "alpha_frac": 0.6279809221, "autogenerated": false...
from django import template from django.core.exceptions import ImproperlyConfigured from pinax.apps.account.utils import has_openid register = template.Library() class IfOpenidNode(template.Node): def __init__(self, nodelist_true, nodelist_false): self.nodelist_true = nodelist_true self.no...
{ "repo_name": "manufacturedba/pinax", "path": "pinax/apps/account/templatetags/openid_tags.py", "copies": "3", "size": "1188", "license": "mit", "hash": 3877149114765458000, "line_mean": 28.7, "line_max": 78, "alpha_frac": 0.6397306397, "autogenerated": false, "ratio": 4.32, "config_test": fals...
from django import template from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import SiteProfileNotAvailable from django_messaging.models import DmUser register = template.Library() @register.tag def messaging(parser,token): nodelist=parser.parse(('endmessaging',)) parser.delet...
{ "repo_name": "PaulcyMboungou/django-messaging", "path": "django_messaging/templatetags/messaging.py", "copies": "1", "size": "1236", "license": "bsd-3-clause", "hash": -3011028460533563400, "line_mean": 29.1463414634, "line_max": 63, "alpha_frac": 0.7160194175, "autogenerated": false, "ratio": 3...
from django import template from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import NoReverseMatch, reverse from django.db.models import ForeignKey from django.template.defaulttags import NowNode from django.utils.safestring import mark_safe from suit.config import get_config from sui...
{ "repo_name": "zaresdelweb/tecnoservicio", "path": "suit/templatetags/suit_tags.py", "copies": "2", "size": "2354", "license": "bsd-3-clause", "hash": 5706878055333845000, "line_mean": 27.7073170732, "line_max": 78, "alpha_frac": 0.6779949023, "autogenerated": false, "ratio": 3.809061488673139, ...
from django import template from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.template.base import Parser, Token class NextPreviousNode(template.Node): def __init__( self, direction: str, queryset: models.QuerySet, date_field: str, varname: str ): (...
{ "repo_name": "ubernostrum/b_list", "path": "blog/templatetags/next_previous.py", "copies": "1", "size": "2326", "license": "bsd-3-clause", "hash": -1772895716912440800, "line_mean": 30.4324324324, "line_max": 86, "alpha_frac": 0.6397248495, "autogenerated": false, "ratio": 4.252285191956124, "...
from django import template from django.core.exceptions import ObjectDoesNotExist from django.utils.html import escape from django.utils.safestring import mark_safe from django.template.defaultfilters import urlize, linebreaks from django.contrib.markup.templatetags.markup import markdown, restructuredtext from pubman...
{ "repo_name": "nathangeffen/django-pubman", "path": "pubman/templatetags/pubmantags.py", "copies": "1", "size": "2168", "license": "mit", "hash": -717293239724840000, "line_mean": 32.875, "line_max": 87, "alpha_frac": 0.588099631, "autogenerated": false, "ratio": 4.850111856823267, "config_test...
from django import template from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import User from askmeanything.models import Poll register = template.Library() @register.tag def show_poll(parser, token): try: (tag_name, poll_variable) = token.split_contents() except...
{ "repo_name": "MidwestCommunications/django-askmeanything", "path": "askmeanything/templatetags/poll_tags.py", "copies": "1", "size": "2015", "license": "mit", "hash": -545062246828092540, "line_mean": 32.0327868852, "line_max": 110, "alpha_frac": 0.6332506203, "autogenerated": false, "ratio": 4....
from django import template from django.core.exceptions import ObjectDoesNotExist class NextPreviousNode(template.Node): def __init__(self, direction, queryset, date_field, varname): (self.direction, self.date_field, self.varname) = (direction, date_field, ...
{ "repo_name": "ubernostrum/blog", "path": "blog/templatetags/next_previous.py", "copies": "1", "size": "2229", "license": "bsd-3-clause", "hash": -137614600846157170, "line_mean": 29.5342465753, "line_max": 77, "alpha_frac": 0.6137281292, "autogenerated": false, "ratio": 4.396449704142012, "con...
from django import template from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import quote, model_ngettext, get_deleted_objects from django.db import router from django.shortcuts import render_to_response from django.template.response import Temp...
{ "repo_name": "johnsensible/django-publish", "path": "publish/actions.py", "copies": "1", "size": "7930", "license": "bsd-3-clause", "hash": -7019877499791260000, "line_mean": 36.4056603774, "line_max": 99, "alpha_frac": 0.6491803279, "autogenerated": false, "ratio": 3.900639449090015, "config_...
from django import template from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.db import models, transaction from django.forms.models import modelform_factory from django.http import Http404, HttpResponse from django.utils.encoding import force_text, smart_text from django.utils.html im...
{ "repo_name": "sshwsfc/django-xadmin", "path": "xadmin/plugins/editable.py", "copies": "11", "size": "6727", "license": "bsd-3-clause", "hash": 3936812232882484700, "line_mean": 41.04375, "line_max": 131, "alpha_frac": 0.5937267727, "autogenerated": false, "ratio": 3.9500880798590723, "config_t...
from django import template from django.core import cache from django.conf import settings register = template.Library() DETAILED_STATS = ('redis_version', 'connected_clients', 'used_cpu_sys', 'used_cpu_user', 'used_memory_human', ...
{ "repo_name": "erussell/django-redis-status", "path": "redis_status/templatetags/redis_status_tags.py", "copies": "1", "size": "2541", "license": "bsd-3-clause", "hash": 8595761923697627000, "line_mean": 35.8260869565, "line_max": 128, "alpha_frac": 0.5572609209, "autogenerated": false, "ratio": ...
from django import template from django.core import urlresolvers from django.contrib.contenttypes.models import ContentType from ..forms import CommentForm from ..models import Comment register = template.Library() @register.inclusion_tag('comments/post-form.html', takes_context = True) def post_form(context, targe...
{ "repo_name": "CooCooooo/cococomments", "path": "comments/templatetags/comments.py", "copies": "1", "size": "1150", "license": "apache-2.0", "hash": 4066906636425351700, "line_mean": 26.4047619048, "line_max": 154, "alpha_frac": 0.6765217391, "autogenerated": false, "ratio": 3.872053872053872, ...
from django import template from django.core import urlresolvers from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailadmin import hooks from wagtail.wagtailadmin.menu import MenuItem from wagtail.wagtailcore.models import get_navigation_menu_items from wagtail.wagtailsnippets.permissions impo...
{ "repo_name": "h2oloopan/easymerge", "path": "EasyMerge/tests/wagtail/wagtail/wagtailadmin/templatetags/wagtailadmin_nav.py", "copies": "3", "size": "2513", "license": "mit", "hash": -590119090337332900, "line_mean": 32.5066666667, "line_max": 170, "alpha_frac": 0.6800636689, "autogenerated": false...
from django import template from django.core import urlresolvers register = template.Library() @register.simple_tag(takes_context = True) def current(context, urlName, className = 'active', **kwargs): ''' Return a class name (string) if the current URL matches the route name specified in ``className``. If any ...
{ "repo_name": "ze-phyr-us/django-libretto", "path": "django_libretto/templatetags/navigation.py", "copies": "1", "size": "1486", "license": "mit", "hash": -3054027239862116000, "line_mean": 32.0222222222, "line_max": 110, "alpha_frac": 0.7388963661, "autogenerated": false, "ratio": 3.724310776942...
from django import template from django.core import urlresolvers register = template.Library() @register.filter def dimension(value, arg): """ Dimension integers If value, append arg, otherwise output nothing """ if value: return str(value) + " " + arg return "" @register.filter de...
{ "repo_name": "uq-eresearch/uqam", "path": "common/templatetags/uqam.py", "copies": "1", "size": "2189", "license": "bsd-3-clause", "hash": 2831354278353679000, "line_mean": 24.4534883721, "line_max": 78, "alpha_frac": 0.6386477844, "autogenerated": false, "ratio": 3.8471001757469243, "config_t...
from django import template from django.core.paginator import EmptyPage from django.urls import reverse from django.utils.safestring import mark_safe register = template.Library() @register.filter def formatted(widget): if widget.type == "countdown": return mark_safe( "<time class='countdown'...
{ "repo_name": "kfdm/django-simplestats", "path": "quickstats/templatetags/quickstats.py", "copies": "1", "size": "2596", "license": "mit", "hash": -4647595101247273000, "line_mean": 29.5411764706, "line_max": 89, "alpha_frac": 0.6348228043, "autogenerated": false, "ratio": 3.9393019726858878, "...
from django import template from django.core.paginator import Paginator, EmptyPage from django.contrib.sites.models import Site current_site = Site.objects.get_current() register = template.Library() @register.simple_tag(takes_context=True) def get_livechat_for_article(context, article, var_name): livechats = ar...
{ "repo_name": "praekelt/ummeli", "path": "ummeli/livechat/templatetags/livechat_tags.py", "copies": "1", "size": "2155", "license": "bsd-3-clause", "hash": -7372619345221147000, "line_mean": 29.7857142857, "line_max": 79, "alpha_frac": 0.6459396752, "autogenerated": false, "ratio": 3.567880794701...
from django import template from django.core.paginator import Paginator, InvalidPage from django.template.loader import get_template from django.http import HttpResponse, HttpResponseRedirect from django.utils.functional import allow_lazy from django.template.defaultfilters import stringfilter from django.conf import s...
{ "repo_name": "artminster/artminster", "path": "core/templatetags/common_tags.py", "copies": "1", "size": "5985", "license": "mit", "hash": -6249794127209069000, "line_mean": 28.3382352941, "line_max": 127, "alpha_frac": 0.6260651629, "autogenerated": false, "ratio": 3.7903736542115265, "config...
from django import template from django.core.paginator import Paginator from ..models import Article register = template.Library() @register.simple_tag(takes_context=True) def get_site_root(context): """ Returns the root page by looking in the request for the current site. """ return context['reques...
{ "repo_name": "svenvandescheur/svenv.nl-2017", "path": "svenv/blog/templatetags/blog_tags.py", "copies": "1", "size": "2386", "license": "mit", "hash": -5441267432869878000, "line_mean": 22.86, "line_max": 74, "alpha_frac": 0.6492036882, "autogenerated": false, "ratio": 3.6539050535987747, "con...
from django import template from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage register = template.Library() @register.simple_tag(takes_context=True) def paginate(context, object_list, page_count): left = 3 right = 3 paginator = Paginator(object_list, page_count) page = context...
{ "repo_name": "a0919610611/My-blog", "path": "article/templatetags/paginate_tags.py", "copies": "2", "size": "1968", "license": "mit", "hash": 3439129800275551700, "line_mean": 32.9482758621, "line_max": 120, "alpha_frac": 0.5995934959, "autogenerated": false, "ratio": 3.6785046728971964, "conf...
from django import template from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage register = template.Library() # 这是定义模板标签要用到的 @register.simple_tag(takes_context=True) def paginate(context, object_list, page_count): # context是Context 对象,object_list是你要分页的对象,page_count表示每页的数量 left = 3 rig...
{ "repo_name": "tomming233/blog", "path": "app/templatetags/paginate_tags.py", "copies": "1", "size": "2741", "license": "mit", "hash": 1076840389993749800, "line_mean": 28.9054054054, "line_max": 96, "alpha_frac": 0.612742883, "autogenerated": false, "ratio": 2.1932606541129833, "config_test": ...
from django import template from django.core.urlresolvers import NoReverseMatch from django.template.defaulttags import url as django_url register = template.Library() class LocalSiteURLNode(template.Node): def __init__(self, url_node): self.url_node = url_node self.args = list(url_node.args) ...
{ "repo_name": "chazy/reviewboard", "path": "reviewboard/site/templatetags/localsite.py", "copies": "3", "size": "1669", "license": "mit", "hash": -3122963624953310700, "line_mean": 31.7254901961, "line_max": 72, "alpha_frac": 0.6195326543, "autogenerated": false, "ratio": 4.041162227602905, "co...
from django import template from django.core.urlresolvers import NoReverseMatch from django.template import TemplateSyntaxError from django.template.base import kwarg_re from django.template.defaulttags import URLNode from django.utils.encoding import smart_text from django.utils.html import conditional_escape registe...
{ "repo_name": "Flamacue/pretix", "path": "src/pretix/multidomain/templatetags/eventurl.py", "copies": "2", "size": "2328", "license": "apache-2.0", "hash": -871891821464655100, "line_mean": 31.7887323944, "line_max": 115, "alpha_frac": 0.6099656357, "autogenerated": false, "ratio": 4.217391304347...
from django import template from django.core.urlresolvers import NoReverseMatch from django.template import TemplateSyntaxError from django.template.defaulttags import kwarg_re from django.utils.encoding import smart_str # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_frag...
{ "repo_name": "pjdelport/feincms", "path": "feincms/templatetags/applicationcontent_tags.py", "copies": "1", "size": "4288", "license": "bsd-3-clause", "hash": 4146313393905731600, "line_mean": 33.8617886179, "line_max": 83, "alpha_frac": 0.6485541045, "autogenerated": false, "ratio": 4.175267770...
from django import template from django.core.urlresolvers import NoReverseMatch, reverse from django.template.base import kwarg_re, TemplateSyntaxError from django.utils.encoding import smart_text register = template.Library() @register.tag def navitem(parser, token): bits = token.split_contents() template_...
{ "repo_name": "noxan/django-bootstrap-navtags", "path": "bootstrapnavtags/templatetags/bootstrapnavtags.py", "copies": "1", "size": "2393", "license": "bsd-3-clause", "hash": -2521361985580065000, "line_mean": 31.3378378378, "line_max": 117, "alpha_frac": 0.6126201421, "autogenerated": false, "ra...
from django import template from django.core.urlresolvers import resolve from django.utils.safestring import mark_safe from website.apps.core.models import Language import re register = template.Library() @register.filter(name='onlyone') def only_one(listofobjects): return len(listofobjects) == 1 @register.fil...
{ "repo_name": "shh-dlce/pulotu", "path": "website/apps/core/templatetags/website_tags.py", "copies": "1", "size": "3320", "license": "apache-2.0", "hash": 4127393563183999000, "line_mean": 22.5460992908, "line_max": 109, "alpha_frac": 0.6548192771, "autogenerated": false, "ratio": 3.3133732534930...
from django import template from django.core.urlresolvers import Resolver404, resolve from django.utils import six from django.utils.six.moves.urllib import parse from django.utils.translation import ugettext_lazy as _ from oscar.apps.customer import history from oscar.core.compat import assignment_tag from oscar.core...
{ "repo_name": "anandsimmy/ecommerce", "path": "src/oscar/templatetags/history_tags.py", "copies": "5", "size": "2148", "license": "bsd-3-clause", "hash": 3755827172833272000, "line_mean": 28.8333333333, "line_max": 76, "alpha_frac": 0.667132216, "autogenerated": false, "ratio": 4.083650190114068,...
from django import template from django.core.urlresolvers import reverse from base.models import * from django.contrib.admin.templatetags.admin_list import result_list from django.db.models import Q, Count import re, urllib from django.contrib.admin.views.main import (ALL_VAR, EMPTY_CHANGELIST_VALUE, ORDER_VAR, PAG...
{ "repo_name": "sashafr/uronline", "path": "base/templatetags/base_tags.py", "copies": "1", "size": "24099", "license": "bsd-3-clause", "hash": -249877562376137150, "line_mean": 33.9275362319, "line_max": 348, "alpha_frac": 0.5546703183, "autogenerated": false, "ratio": 4.04821098605745, "config...
from django import template from django.core.urlresolvers import reverse from booking.models import Reservation from rtw_ui.models import RTW_CONF import logging logger = logging.getLogger(__name__) register = template.Library() @register.simple_tag def get_reservation_attr(uuid, attr): # print "uuid:" + str (uui...
{ "repo_name": "Si-elegans/Web-based_GUI_Tools", "path": "booking/templatetags/booking_extras.py", "copies": "1", "size": "2312", "license": "apache-2.0", "hash": 5418793177807956000, "line_mean": 34.5692307692, "line_max": 170, "alpha_frac": 0.6366782007, "autogenerated": false, "ratio": 3.206657...
from django import template from django.core.urlresolvers import reverse from cbv.models import Klass, ProjectVersion register = template.Library() @register.filter def namesake_methods(parent_klass, name): namesakes = [m for m in parent_klass.get_methods() if m.name == name] assert(namesakes) # Get the ...
{ "repo_name": "abhijo89/django-cbv-inspector", "path": "cbv/templatetags/cbv_tags.py", "copies": "1", "size": "1966", "license": "bsd-2-clause", "hash": 3261461103579597000, "line_mean": 32.8965517241, "line_max": 105, "alpha_frac": 0.6164801628, "autogenerated": false, "ratio": 4.070393374741201...
from django import template from django.core.urlresolvers import reverse from datetime import datetime, timedelta from corehq.const import SERVER_DATETIME_FORMAT_NO_SEC xmldate_format= '%Y-%m-%dT%H:%M:%S' output_format = SERVER_DATETIME_FORMAT_NO_SEC username_datecount_cache = {} register = template.Library() @regi...
{ "repo_name": "qedsoftware/commcare-hq", "path": "corehq/apps/hqwebapp/templatetags/mainreport_tags.py", "copies": "1", "size": "4614", "license": "bsd-3-clause", "hash": 4110378166544175600, "line_mean": 36.512195122, "line_max": 162, "alpha_frac": 0.5654529692, "autogenerated": false, "ratio": ...
from django import template from django.core.urlresolvers import reverse from datetime import datetime, timedelta xmldate_format= '%Y-%m-%dT%H:%M:%S' output_format = '%Y-%m-%d %H:%M' username_datecount_cache = {} register = template.Library() @register.simple_tag def get_daterange_links(view_name, args={}): base...
{ "repo_name": "SEL-Columbia/commcare-hq", "path": "corehq/apps/hqwebapp/templatetags/mainreport_tags.py", "copies": "2", "size": "4540", "license": "bsd-3-clause", "hash": 8587866644264986000, "line_mean": 37.4745762712, "line_max": 162, "alpha_frac": 0.5588105727, "autogenerated": false, "ratio"...
from django import template from django.core.urlresolvers import reverse from django.conf import settings from django.contrib.sites.models import Site from django.template.base import TemplateSyntaxError from django.utils.text import ugettext_lazy as _ from news.models import News register = template.Library() @regi...
{ "repo_name": "rtrembecky/roots", "path": "base/templatetags/roots_tags.py", "copies": "3", "size": "6314", "license": "mit", "hash": -7743757268042903000, "line_mean": 28.2314814815, "line_max": 98, "alpha_frac": 0.6677225214, "autogenerated": false, "ratio": 3.8289872650090966, "config_test":...
from django import template from django.core.urlresolvers import reverse from django.conf import settings #from django.utils.dateformat import format from django.utils.translation import ungettext, ugettext from datetime import datetime, timedelta #from time import mktime, localtime import re register = template.Libra...
{ "repo_name": "eduherraiz/foowill", "path": "app/templatetags/extras.py", "copies": "1", "size": "2774", "license": "mit", "hash": 7330714002906097000, "line_mean": 27.90625, "line_max": 127, "alpha_frac": 0.5861571738, "autogenerated": false, "ratio": 3.4937027707808563, "config_test": false, ...
from django import template from django.core.urlresolvers import reverse from django.conf import settings from pylmth.dom import * from profiles.models import (DataDomain, Time, GeoRecord, GeoLevel, Value, DataPoint, Indicator, IndicatorPart) from profiles.utils import format_number as u...
{ "repo_name": "ProvidencePlan/Profiles", "path": "communityprofiles/profiles/templatetags/profiles_tags.py", "copies": "1", "size": "28156", "license": "mit", "hash": -3105241319899526000, "line_mean": 40.4058823529, "line_max": 202, "alpha_frac": 0.5862693564, "autogenerated": false, "ratio": 3....
from django import template from django.core.urlresolvers import reverse from django.conf import settings from menuz.models import Menuz, MenuzItem from menuz.registry import menuz from menuz.utils import get_menu_by_position, get_menu_options from menuz.utils import get_menu_components, count_menu_children register ...
{ "repo_name": "ekaputra07/django-menuz", "path": "menuz/templatetags/menuz_tags.py", "copies": "1", "size": "4792", "license": "bsd-3-clause", "hash": 286585097195747700, "line_mean": 31.5986394558, "line_max": 108, "alpha_frac": 0.5713689482, "autogenerated": false, "ratio": 3.8833063209076175, ...
from django import template from django.core.urlresolvers import reverse from django.contrib.auth.models import Group, User, AnonymousUser from django.contrib.contenttypes.models import ContentType from core.perms.utilities import get_codename_perms from guardian.exceptions import NotUserNorGroup register = template.L...
{ "repo_name": "chaosk/trinitee", "path": "trinitee/core/templatetags/perms_tags.py", "copies": "1", "size": "3378", "license": "bsd-3-clause", "hash": 7295622112417618000, "line_mean": 30.287037037, "line_max": 77, "alpha_frac": 0.6971580817, "autogenerated": false, "ratio": 3.090576395242452, ...
from django import template from django.core.urlresolvers import reverse from django.contrib.auth.models import User from ..models import Placeholder register = template.Library() @register.tag(name="editable") def do_editable(parser, token): try: tag_name, tag_argument = token.split_contents() except ValueError:...
{ "repo_name": "Acour83/django-editable", "path": "editable/templatetags/editable.py", "copies": "1", "size": "1380", "license": "bsd-3-clause", "hash": -5426667641875012000, "line_mean": 33.525, "line_max": 153, "alpha_frac": 0.6746376812, "autogenerated": false, "ratio": 3.2242990654205608, "c...
from django import template from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import ContentType from follow.models import Follow from follow import utils import re from django.template import loader, RequestContext from django.conf import settings register = template.Library() @r...
{ "repo_name": "saumishr/django-follow", "path": "follow/templatetags/follow_tags.py", "copies": "1", "size": "8171", "license": "mit", "hash": -1230472361047297800, "line_mean": 33.9230769231, "line_max": 158, "alpha_frac": 0.6210990087, "autogenerated": false, "ratio": 3.890952380952381, "conf...
from django import template from django.core.urlresolvers import reverse from django.core.exceptions import ImproperlyConfigured from django.contrib.auth.models import AnonymousUser from django.core.urlresolvers import reverse from authority import get_check from authority import permissions from authority.models impo...
{ "repo_name": "yehoshuk/django-authority", "path": "authority/templatetags/permissions.py", "copies": "6", "size": "15559", "license": "bsd-3-clause", "hash": 6908038889939162000, "line_mean": 34.9330254042, "line_max": 131, "alpha_frac": 0.5880840671, "autogenerated": false, "ratio": 4.263907919...
from django import template from django.core.urlresolvers import reverse from django.core.exceptions import ImproperlyConfigured from django.contrib.auth.models import User, AnonymousUser from django.core.urlresolvers import reverse from authority import get_check from authority import permissions from authority.model...
{ "repo_name": "calvinchengx/django-authority", "path": "authority/templatetags/permissions.py", "copies": "6", "size": "15531", "license": "bsd-3-clause", "hash": -3138588046790582000, "line_mean": 35.1186046512, "line_max": 131, "alpha_frac": 0.5875989956, "autogenerated": false, "ratio": 4.2620...
from django import template from django.core.urlresolvers import reverse from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from IssueTracker import utils import types import re register = template.Library() """ For some reason this code is breaking on iteration through the all issues view. I...
{ "repo_name": "abztrakt/labtracker", "path": "IssueTracker/templatetags/issue_extras.py", "copies": "1", "size": "5215", "license": "apache-2.0", "hash": 2872086653618548000, "line_mean": 29.4970760234, "line_max": 110, "alpha_frac": 0.6256951103, "autogenerated": false, "ratio": 3.97787948131197...
from django import template from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import ContentType from types import ListType,TupleType from hq.models import * import xformmanager.adapter.querytools as qtools import hq.utils as utils from ...
{ "repo_name": "icomms/wqmanager", "path": "apps/hq/templatetags/mainreport_tags.py", "copies": "4", "size": "4855", "license": "bsd-3-clause", "hash": 3472272649973982700, "line_mean": 36.3461538462, "line_max": 162, "alpha_frac": 0.5773429454, "autogenerated": false, "ratio": 3.457977207977208, ...
from django import template from django.core.urlresolvers import reverse from django.db.models import Q from gipsy.dashboard.models import GipsyDashboardMenu from gipsy.dashboard.settings import GIPSY_DASHBOARD_URL,\ GIPSY_VANILLA_INDEX_URL, GIPSY_THEME, GIPSY_DASHBOARD_TITLE,\ GIPSY_DASHBOARD_CACHE_TIME reg...
{ "repo_name": "Seha16/gipsy", "path": "gipsy/dashboard/templatetags/gipsy_dashboard.py", "copies": "3", "size": "4194", "license": "bsd-3-clause", "hash": 8014192772574704000, "line_mean": 29.1726618705, "line_max": 85, "alpha_frac": 0.6578445398, "autogenerated": false, "ratio": 3.64378801042571...