text stringlengths 0 1.05M | meta dict |
|---|---|
from django.template import (
Library
)
from django.contrib.auth import (
forms as auth_forms
)
from teams import (
forms as team_forms
)
register = Library()
@register.inclusion_tag('registration/register_form.html')
def show_register_form():
register_form = team_forms.RegisterForm()
team_form... | {
"repo_name": "elespike/Asteria",
"path": "teams/templatetags/modal_team_forms.py",
"copies": "1",
"size": "2375",
"license": "mit",
"hash": 6619728516684192000,
"line_mean": 27.2738095238,
"line_max": 75,
"alpha_frac": 0.6875789474,
"autogenerated": false,
"ratio": 3.763866877971474,
"config_t... |
from django.template import Node, Context
from test_ella.cases import RedisTestCase as TestCase
from django.conf import settings
from nose import tools, SkipTest
from ella.photos.templatetags.photos import _parse_img, ImgTag, _parse_image, ImageTag
from ella.photos.models import redis, REDIS_PHOTO_KEY, REDIS_FORMATTE... | {
"repo_name": "hamsavardhini09/AWSLearning",
"path": "test_ella/test_photos/test_templatetags.py",
"copies": "6",
"size": "2989",
"license": "bsd-3-clause",
"hash": 6035130094485474000,
"line_mean": 41.0985915493,
"line_max": 104,
"alpha_frac": 0.6567413851,
"autogenerated": false,
"ratio": 3.479... |
from django.template import Node, Library
from django.conf import settings
from django.core.urlresolvers import reverse, NoReverseMatch
from django.utils.encoding import smart_str
register = Library()
class PluggableURLNode(Node):
def __init__(self, request, view_name, args, kwargs, asvar):
self.request ... | {
"repo_name": "nowells/django-pluggables",
"path": "pluggables/templatetags/pluggables.py",
"copies": "2",
"size": "4017",
"license": "mit",
"hash": -8753822454891825000,
"line_mean": 35.5181818182,
"line_max": 130,
"alpha_frac": 0.5827732138,
"autogenerated": false,
"ratio": 4.197492163009405,
... |
from django.template import NodeList, TemplateSyntaxError
from django.template.base import Node
from django.template.loader_tags import ExtendsNode
from django.test import SimpleTestCase
from ..utils import setup
inheritance_templates = {
'inheritance01': "1{% block first %}&{% endblock %}3{% block second %}_{% e... | {
"repo_name": "theo-l/django",
"path": "tests/template_tests/syntax_tests/test_extends.py",
"copies": "78",
"size": "16961",
"license": "bsd-3-clause",
"hash": 3269137514262288000,
"line_mean": 38.3526682135,
"line_max": 119,
"alpha_frac": 0.6115795059,
"autogenerated": false,
"ratio": 4.35120574... |
from django.template import Node
from django import template
from ..models import Survey
register = template.Library()
@register.filter
def has_answered(request, survey):
if not hasattr(request, 'session'): return False
return survey.has_answers_from(request.session.session_key)
@register.filter
def can_view... | {
"repo_name": "neutrinog/Comperio",
"path": "comperio/survey/templatetags/survey.py",
"copies": "1",
"size": "2146",
"license": "bsd-3-clause",
"hash": -3123543757951081000,
"line_mean": 29.6714285714,
"line_max": 91,
"alpha_frac": 0.6644920783,
"autogenerated": false,
"ratio": 3.8049645390070923... |
from django.template import Node
from django import template
import re
try:
import ipdb as pdb
except ImportError:
import pdb
register = template.Library()
class PdbNode(Node):
def render(self, context):
pdb.set_trace()
return ''
@register.tag
def pdb_debug(parser, token):
return P... | {
"repo_name": "erlaveri/erlap",
"path": "templatetags/erlap_tags.py",
"copies": "1",
"size": "2497",
"license": "mit",
"hash": -3544354669881896400,
"line_mean": 25.2947368421,
"line_max": 93,
"alpha_frac": 0.5278334001,
"autogenerated": false,
"ratio": 3.749249249249249,
"config_test": false,
... |
from django.template import Node
from django.template import Library
from django.conf import settings
import django.db as db
import re
from django.utils.html import escape
register = Library()
class DbInfoNode(Node):
def __init__(self):
pass
def __repr__(self):
return "<DbInfoNode>"
def ... | {
"repo_name": "keimlink/sandoval",
"path": "movie/templatetags/db_debug_tags.py",
"copies": "1",
"size": "1161",
"license": "bsd-3-clause",
"hash": 7239696156591671000,
"line_mean": 23.1875,
"line_max": 80,
"alpha_frac": 0.608957795,
"autogenerated": false,
"ratio": 3.6624605678233437,
"config_... |
from django.template import Node
from django.template import Library
from django.conf import settings
import django.db as db
import re
from django.utils.html import escape
register = Library()
class DbInfoNode(Node):
def __init__(self):
pass
def __repr__(self):
return "<DbInfoNode>"
def... | {
"repo_name": "wisonwang/django-lfs",
"path": "lfs/utils/templatetags/sql.py",
"copies": "5",
"size": "1164",
"license": "bsd-3-clause",
"hash": 920534828845295900,
"line_mean": 21.3846153846,
"line_max": 80,
"alpha_frac": 0.6073883162,
"autogenerated": false,
"ratio": 3.6835443037974684,
"conf... |
from django.template import Node
from django.template import TemplateSyntaxError, Library
from django.utils import formats
from django.utils.encoding import force_text
register = Library()
@register.filter(is_safe=False)
def localize(value):
"""
Forces a value to be rendered as a localized value,
regardl... | {
"repo_name": "YYWen0o0/python-frame-django",
"path": "django/templatetags/l10n.py",
"copies": "115",
"size": "1763",
"license": "bsd-3-clause",
"hash": 693450113049136100,
"line_mean": 25.7121212121,
"line_max": 82,
"alpha_frac": 0.6358479864,
"autogenerated": false,
"ratio": 3.5544354838709675,... |
from django.template import Node
from django.template import TemplateSyntaxError, Library
from django.utils import formats
from django.utils.encoding import force_text
register = Library()
@register.filter(is_safe=False)
def localize(value):
"""
Forces a value to be rendered as a localized value,
regardle... | {
"repo_name": "vitan/hue",
"path": "desktop/core/ext-py/Django-1.6.10/django/templatetags/l10n.py",
"copies": "232",
"size": "1759",
"license": "apache-2.0",
"hash": -7146021336964560000,
"line_mean": 27.3709677419,
"line_max": 82,
"alpha_frac": 0.637293917,
"autogenerated": false,
"ratio": 3.546... |
from django.template import Node
from django.template import TemplateSyntaxError, Library
from django.utils import formats
from django.utils.encoding import force_unicode
register = Library()
def localize(value):
"""
Forces a value to be rendered as a localized value,
regardless of the value of ``setting... | {
"repo_name": "disqus/django-old",
"path": "django/templatetags/l10n.py",
"copies": "2",
"size": "1812",
"license": "bsd-3-clause",
"hash": -9163343248409110000,
"line_mean": 26.4545454545,
"line_max": 82,
"alpha_frac": 0.6434878587,
"autogenerated": false,
"ratio": 3.588118811881188,
"config_t... |
from django.template import Node
from django.template import TemplateSyntaxError, Library
from django.utils import formats
from django.utils.encoding import force_unicode
register = Library()
@register.filter(is_safe=False)
def localize(value):
"""
Forces a value to be rendered as a localized value,
regar... | {
"repo_name": "mitar/django",
"path": "django/templatetags/l10n.py",
"copies": "99",
"size": "1768",
"license": "bsd-3-clause",
"hash": -8611027059591490000,
"line_mean": 27.5161290323,
"line_max": 82,
"alpha_frac": 0.6391402715,
"autogenerated": false,
"ratio": 3.564516129032258,
"config_test"... |
from django.template import Node, NodeList
from django.template import TemplateSyntaxError, VariableDoesNotExist
from django.template import Library
import re
# For Python 2.3
if not hasattr(__builtins__, 'set'):
from sets import Set as set
register = Library()
variable_re = re.compile(r'[\w._\|\"\']+')... | {
"repo_name": "Pilsburgh/diamanda",
"path": "diamandas/myghtyboard/templatetags/pyif.py",
"copies": "2",
"size": "2722",
"license": "bsd-3-clause",
"hash": 2128651248072224500,
"line_mean": 34.32,
"line_max": 156,
"alpha_frac": 0.6061719324,
"autogenerated": false,
"ratio": 3.97953216374269,
"c... |
from django.template import Node, resolve_variable
from django.template import TemplateSyntaxError, TokenParser, Library
from django.template import TOKEN_TEXT, TOKEN_VAR
from django.utils import translation
register = Library()
class GetAvailableLanguagesNode(Node):
def __init__(self, variable):
self.var... | {
"repo_name": "tungvx/deploy",
"path": ".google_appengine/lib/django_0_96/django/templatetags/i18n.py",
"copies": "33",
"size": "8474",
"license": "apache-2.0",
"hash": -685862719001189000,
"line_mean": 33.4471544715,
"line_max": 124,
"alpha_frac": 0.6180080245,
"autogenerated": false,
"ratio": 4... |
from django.template import Node, Template, Context, Variable, TemplateSyntaxError
from django.template import Library
from django.conf import settings
from django.utils.encoding import smart_str
from tagging.models import Tag
from deal.models import Category, City, Company, Comment, Deal, Local, Site, Transfer
regist... | {
"repo_name": "masiqi/douquan",
"path": "www/templatetags/deal_tag.py",
"copies": "1",
"size": "4213",
"license": "mit",
"hash": -3647020137530321400,
"line_mean": 33.2520325203,
"line_max": 191,
"alpha_frac": 0.6133396629,
"autogenerated": false,
"ratio": 3.552276559865093,
"config_test": fals... |
from django.template import (Node, Variable, TemplateSyntaxError, Library)
try:
from django.template.base import render_value_in_context
except ImportError:
from django.template.base import _render_value_in_context as render_value_in_context
from phrase.compat import TOKEN_TEXT, TOKEN_VAR, is_string_type
from d... | {
"repo_name": "phrase/django-phrase",
"path": "phrase/nodes.py",
"copies": "1",
"size": "4413",
"license": "mit",
"hash": -4608653573571429000,
"line_mean": 40.6320754717,
"line_max": 88,
"alpha_frac": 0.6032177657,
"autogenerated": false,
"ratio": 4.356367226061204,
"config_test": false,
"ha... |
from django.template import Parser, Lexer, Context
from django.template.loader_tags import BlockNode
class ProcessingParser(Parser):
builtin_tags = set(['block'])
builtin_filters = set([])
def __init__(self, *args, **kwargs):
super(ProcessingParser, self).__init__(*args, **kwargs)
self.ta... | {
"repo_name": "strogo/turbion",
"path": "turbion/bits/markup/processing.py",
"copies": "1",
"size": "1091",
"license": "bsd-3-clause",
"hash": 2513852440892442600,
"line_mean": 36.6206896552,
"line_max": 87,
"alpha_frac": 0.6791934005,
"autogenerated": false,
"ratio": 3.910394265232975,
"config... |
from django.template import RequestContext as HTTPRequestContext
from django.template import Context
_standard_context_processors = None
def get_standard_processors():
from mailserver import get_setting
global _standard_context_processors
if _standard_context_processors is None:
processors = []
... | {
"repo_name": "telenieko/django-mailserver",
"path": "src/mailserver/context.py",
"copies": "1",
"size": "1563",
"license": "bsd-3-clause",
"hash": -869986736464328400,
"line_mean": 37.1219512195,
"line_max": 124,
"alpha_frac": 0.641074856,
"autogenerated": false,
"ratio": 4.651785714285714,
"c... |
from django.template import RequestContext, Context, loader
from django.http import HttpResponse,HttpResponseNotFound
from django.shortcuts import redirect
from manage_feedback.models import feedbackForm,feedbackQuestion,feedbackQuestionOption, feedbackAbout, Batch, Subject
from give_feedback.models import feedbackSubm... | {
"repo_name": "knightsamar/change_agent",
"path": "give_feedback/views.py",
"copies": "1",
"size": "18519",
"license": "apache-2.0",
"hash": -6815467724697596000,
"line_mean": 37.8238993711,
"line_max": 277,
"alpha_frac": 0.6014363627,
"autogenerated": false,
"ratio": 4.143880062653838,
"config... |
from django.template import RequestContext, Context, loader
from django.http import HttpResponse
from django.core import serializers
import subprocess, socket, os, time
from django.utils import simplejson
from controller.basic.models import *
# dictionary of sockets by address
sockets = {}
def get_pwm_sock(request, ... | {
"repo_name": "imoverclocked/ServoBot",
"path": "apwm_home/controller/controller/basic/views.py",
"copies": "1",
"size": "3779",
"license": "mit",
"hash": -4324453515680523300,
"line_mean": 31.8608695652,
"line_max": 117,
"alpha_frac": 0.7195025139,
"autogenerated": false,
"ratio": 2.977935382190... |
from django.template import RequestContext, Context, loader
from django.http import HttpResponse
from django.db.models import Q
from django.shortcuts import render_to_response, render, get_object_or_404
from django.template.loader import render_to_string
from django.contrib.auth import login, logout, authenticate
from ... | {
"repo_name": "LibraryOfCongress/gazetteer",
"path": "gazetteer/views.py",
"copies": "1",
"size": "5312",
"license": "mit",
"hash": -4980265874449639000,
"line_mean": 31.1939393939,
"line_max": 123,
"alpha_frac": 0.6201054217,
"autogenerated": false,
"ratio": 3.7434813248766736,
"config_test": ... |
from django.template import RequestContext, engines
from .util import log
###########################################################################################################
### Rendering template blocks in other syntax languages
###
### See also django_mako_plus/templatetags/django_mako_plus.py
###
def... | {
"repo_name": "doconix/django-mako-plus",
"path": "django_mako_plus/filters.py",
"copies": "1",
"size": "4781",
"license": "apache-2.0",
"hash": 8982145256804585000,
"line_mean": 37.5564516129,
"line_max": 207,
"alpha_frac": 0.6509098515,
"autogenerated": false,
"ratio": 4.497648165569144,
"con... |
from django.template import RequestContext, loader, Context
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.contrib.auth.models import User
from django.contri... | {
"repo_name": "TCDocProc/arch",
"path": "app/core/views.py",
"copies": "1",
"size": "2047",
"license": "mit",
"hash": 7175933707826408000,
"line_mean": 30.0151515152,
"line_max": 83,
"alpha_frac": 0.6761113825,
"autogenerated": false,
"ratio": 4.118712273641851,
"config_test": false,
"has_no_... |
from django.template import RequestContext, loader, Context , Template
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect
from django.template.loader import get_template
from lingcod.spacing.models import *
from django.template.defaultf... | {
"repo_name": "underbluewaters/marinemap",
"path": "lingcod/spacing/views.py",
"copies": "3",
"size": "4162",
"license": "bsd-3-clause",
"hash": 4158236914890482000,
"line_mean": 41.8105263158,
"line_max": 119,
"alpha_frac": 0.6717924075,
"autogenerated": false,
"ratio": 3.679929266136163,
"con... |
from django.template import RequestContext, loader, Context, Template
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect
from django.template.loader import get_template
from madrona.spacing.models import *
from django.template.defaultfi... | {
"repo_name": "Ecotrust/madrona_addons",
"path": "mlpa/spacing/views.py",
"copies": "1",
"size": "4112",
"license": "bsd-3-clause",
"hash": -4530489136088903700,
"line_mean": 41.3894736842,
"line_max": 119,
"alpha_frac": 0.6799610895,
"autogenerated": false,
"ratio": 3.645390070921986,
"config_... |
from django.template import RequestContext, loader, Context , Template
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.conf import settings
from django.template.loader import get_template
from lingcod.pg_spacing.models import *
def Index(request):
return ren... | {
"repo_name": "underbluewaters/marinemap",
"path": "lingcod/pg_spacing/views.py",
"copies": "3",
"size": "1443",
"license": "bsd-3-clause",
"hash": -2141072923708669400,
"line_mean": 44.5483870968,
"line_max": 119,
"alpha_frac": 0.711018711,
"autogenerated": false,
"ratio": 3.4939467312348667,
... |
from django.template import RequestContext, loader, Context, Template
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.conf import settings
from django.template.loader import get_template
from madrona.pg_spacing.models import *
def Index(request):
return rend... | {
"repo_name": "Ecotrust/madrona_addons",
"path": "mlpa/pg_spacing/views.py",
"copies": "1",
"size": "1438",
"license": "bsd-3-clause",
"hash": -557217534090363500,
"line_mean": 44.3870967742,
"line_max": 119,
"alpha_frac": 0.7134909597,
"autogenerated": false,
"ratio": 3.473429951690821,
"confi... |
from django.template import RequestContext, loader
from datetime import datetime, timedelta, date
from dateutil.relativedelta import relativedelta
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden
from django.core.urlresolvers import reverse_lazy
from django.conf import settings
from mod... | {
"repo_name": "BillGuard/cabot",
"path": "cabot/cabotapp/views.py",
"copies": "1",
"size": "23464",
"license": "mit",
"hash": 8731647499694899000,
"line_mean": 31.0546448087,
"line_max": 105,
"alpha_frac": 0.6068445278,
"autogenerated": false,
"ratio": 4.163975155279503,
"config_test": false,
... |
from django.template import RequestContext, loader
from django.http import HttpResponse, Http404
from django.core.context_processors import csrf
from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect
from django.http import HttpResponseForbidden
from django.http import HttpResponseBadRequest, HttpR... | {
"repo_name": "iivvoo/two.ol",
"path": "two/ol/base.py",
"copies": "1",
"size": "21608",
"license": "bsd-2-clause",
"hash": 7529828021914134000,
"line_mean": 30.1803751804,
"line_max": 109,
"alpha_frac": 0.5501203258,
"autogenerated": false,
"ratio": 4.40081466395112,
"config_test": false,
"h... |
from django.template import RequestContext, loader
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.contrib.auth import authenticate, login, logout
from django.shortcuts import get_object_or_404
from ideas.models import *
import ideas.config as CF
def dash(request):
if not ck_user(... | {
"repo_name": "dboutmybizness/ideas",
"path": "views.py",
"copies": "1",
"size": "4151",
"license": "mit",
"hash": 4169352092842030600,
"line_mean": 26.137254902,
"line_max": 100,
"alpha_frac": 0.610455312,
"autogenerated": false,
"ratio": 3.5327659574468084,
"config_test": false,
"has_no_key... |
from django.template import RequestContext,loader
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.views.generic.base import View
from django.shortcuts import render, get_object_or_404
from models import *
from forms import SearchForm
from django.short... | {
"repo_name": "Carneo/reddit_analysis",
"path": "views.py",
"copies": "1",
"size": "8151",
"license": "mit",
"hash": 4032440882951610000,
"line_mean": 36.5622119816,
"line_max": 131,
"alpha_frac": 0.5492577598,
"autogenerated": false,
"ratio": 3.716826265389877,
"config_test": false,
"has_no_... |
from django.template import RequestContext, loader
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.core.urlresolvers import reverse
from django.forms.models import modelform_factory
from django.db.models import Q
from django.forms import Textarea
fro... | {
"repo_name": "TPei/tv_tracker",
"path": "shows/views.py",
"copies": "1",
"size": "3018",
"license": "unlicense",
"hash": -3913486799031326700,
"line_mean": 38.7105263158,
"line_max": 169,
"alpha_frac": 0.5913158767,
"autogenerated": false,
"ratio": 4.161379310344827,
"config_test": false,
"h... |
from django.template import RequestContext, loader
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from ifind.search.query import Query
from game_models import Category, Page, HighScore ,CurrentGame
from game_avatar import GameAvatar
from game_mechanics import ... | {
"repo_name": "leifos/pagefetch",
"path": "pagefetch_project/pagefetch/views.py",
"copies": "1",
"size": "10338",
"license": "mit",
"hash": 8741367012884701000,
"line_mean": 41.1959183673,
"line_max": 175,
"alpha_frac": 0.5807699749,
"autogenerated": false,
"ratio": 3.9822804314329736,
"config_... |
from django.template import RequestContext, loader
from django.shortcuts import get_object_or_404, render_to_response, redirect
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, Http404
from apps.instan... | {
"repo_name": "jawr/kontrolvm",
"path": "apps/instance/views.py",
"copies": "1",
"size": "15809",
"license": "mit",
"hash": -7005731166061586000,
"line_mean": 33.8215859031,
"line_max": 148,
"alpha_frac": 0.6798658992,
"autogenerated": false,
"ratio": 3.820444659255679,
"config_test": false,
... |
from django.template import RequestContext, loader
from django.shortcuts import redirect, render_to_response, render
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.contrib.admin.views.decorators import staff_member_required
from django.c... | {
"repo_name": "jawr/kontrolvm",
"path": "apps/account/views.py",
"copies": "1",
"size": "8747",
"license": "mit",
"hash": -5309573677112750000,
"line_mean": 34.9958847737,
"line_max": 99,
"alpha_frac": 0.6828626958,
"autogenerated": false,
"ratio": 3.9277054333183656,
"config_test": false,
"h... |
from django.template import RequestContext, loader
from django.shortcuts import render_to_response
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
import hashlib
from datetime import datetime
import cStringIO,gzip
def render(request,context):
t = loader.get_template('amazing... | {
"repo_name": "knolleary/amazing",
"path": "views.py",
"copies": "1",
"size": "1518",
"license": "mit",
"hash": 3788142087179908000,
"line_mean": 28.7647058824,
"line_max": 71,
"alpha_frac": 0.6646903821,
"autogenerated": false,
"ratio": 3.481651376146789,
"config_test": false,
"has_no_keywor... |
from django.template import RequestContext, loader
from web.models import Program, Genre, Subject
from django.http import HttpResponse
def index(request):
t = loader.get_template('home.html')
programs = Program.objects.all()
c = RequestContext(request, {
'programs': programs,
})
return ... | {
"repo_name": "jeremymason/Archivist",
"path": "archivist/web/views.py",
"copies": "1",
"size": "1366",
"license": "bsd-3-clause",
"hash": 3835004396467002000,
"line_mean": 25.2692307692,
"line_max": 55,
"alpha_frac": 0.6325036603,
"autogenerated": false,
"ratio": 3.78393351800554,
"config_test... |
from django.template import RequestContext, loader, TemplateDoesNotExist
from django.conf import settings
from django.core.mail import EmailMultiAlternatives, EmailMessage
from django.http import Http404
def send_link(sender_name, sender_email, recipient_name, recipient_email, email_html_template, email_txt_template,... | {
"repo_name": "gregplaysguitar/glamkit",
"path": "glamkit/incubated/tellafriend/email_utils.py",
"copies": "1",
"size": "1250",
"license": "bsd-3-clause",
"hash": 6014159689895203000,
"line_mean": 42.1379310345,
"line_max": 142,
"alpha_frac": 0.6984,
"autogenerated": false,
"ratio": 3.93081761006... |
from django.template import RequestContext
from django.conf import settings
from django.shortcuts import render_to_response
from core.utils import get_client_ip
from .forms import SubscriberForm
from .models import Subscriber
def subscribe_view(request):
if request.method == 'POST':
form = SubscriberFor... | {
"repo_name": "jcalazan/glucose-tracker",
"path": "glucosetracker/subscribers/views.py",
"copies": "1",
"size": "1265",
"license": "mit",
"hash": -4784418715698770000,
"line_mean": 35.1428571429,
"line_max": 79,
"alpha_frac": 0.6221343874,
"autogenerated": false,
"ratio": 4.720149253731344,
"co... |
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render_to_response, get_object_or_404
from django.core.paginator import Paginator, EmptyPage, InvalidPage
from api import ... | {
"repo_name": "kwantopia/shoppley-migrate",
"path": "shoppley.com/shoppley/apps/buxfer/views.py",
"copies": "1",
"size": "2732",
"license": "mit",
"hash": -3582714985040800000,
"line_mean": 37.4788732394,
"line_max": 234,
"alpha_frac": 0.5197657394,
"autogenerated": false,
"ratio": 4.638370118845... |
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response, render, redirect
from django.views.decorators.csrf import requires_csrf_token
from django.contrib.auth.forms im... | {
"repo_name": "PachaTechnology/Abzugames",
"path": "blog/views.py",
"copies": "1",
"size": "6763",
"license": "apache-2.0",
"hash": 1119072866643268700,
"line_mean": 36.7877094972,
"line_max": 110,
"alpha_frac": 0.6421706343,
"autogenerated": false,
"ratio": 3.6635969664138677,
"config_test": f... |
from django.template import RequestContext
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.template.loader import render_to_string
from jsonview.decorators import json_view
from django.views import generic
from django.contrib.admin.views.decorators import staff_member_required
import ... | {
"repo_name": "michaelbrooks/twitter-feels",
"path": "twitter_feels/apps/status/views.py",
"copies": "1",
"size": "4415",
"license": "mit",
"hash": 6340457997516703000,
"line_mean": 26.2592592593,
"line_max": 84,
"alpha_frac": 0.6720271801,
"autogenerated": false,
"ratio": 3.7225969645868466,
"... |
from django.template import RequestContext
from django.core.mail import EmailMultiAlternatives
from django.shortcuts import render_to_response, get_object_or_404
from forms import GuestForm, RegistrationForm
from models import Event, Guest, Registration
from django.utils import timezone
from django.template.loader impo... | {
"repo_name": "Teknologforeningen/tf_arsfest",
"path": "tf_arsfest/views.py",
"copies": "1",
"size": "4025",
"license": "mit",
"hash": 3495782078424535600,
"line_mean": 43.7222222222,
"line_max": 139,
"alpha_frac": 0.5336645963,
"autogenerated": false,
"ratio": 4.914529914529915,
"config_test":... |
from django.template import RequestContext
from django.forms import ModelForm
from django.http import HttpResponseRedirect
from django.shortcuts import render, render_to_response,redirect
from django.core.context_processors import csrf
from django.utils.translation import ugettext as _
from django.contrib import messag... | {
"repo_name": "RocknRoot/LIIT",
"path": "structure/views/user.py",
"copies": "1",
"size": "2098",
"license": "bsd-3-clause",
"hash": -2913623201828238000,
"line_mean": 37.8518518519,
"line_max": 119,
"alpha_frac": 0.6563393708,
"autogenerated": false,
"ratio": 4.570806100217865,
"config_test": ... |
from django.template import RequestContext
from django.http import Http404, HttpResponse
from django.shortcuts import render_to_response
from django.core import serializers
#from models import LifeExpectancy
from models import LifeTableEntry
import json
import urllib2
from datetime import date, timedelta
def main(re... | {
"repo_name": "EricR86/lifeexpectancy",
"path": "timeleft/views.py",
"copies": "1",
"size": "8531",
"license": "mit",
"hash": -1895711655222126600,
"line_mean": 34.1069958848,
"line_max": 133,
"alpha_frac": 0.588207713,
"autogenerated": false,
"ratio": 3.678740836567486,
"config_test": false,
... |
from django.template import RequestContext
from django.http import Http404, HttpResponse
# Models
from django.contrib.contenttypes.models import ContentType
# Serialization
from django.utils import simplejson
def filter_contenttypes_by_app(request):
"""
Accepts an app_label as a query_string and returns its asso... | {
"repo_name": "palewire/django-correx",
"path": "correx/views.py",
"copies": "1",
"size": "1370",
"license": "bsd-3-clause",
"hash": -1442876263499508200,
"line_mean": 30.1363636364,
"line_max": 88,
"alpha_frac": 0.7408759124,
"autogenerated": false,
"ratio": 3.5400516795865635,
"config_test": ... |
from django.template import RequestContext
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.contrib.auth.models import User
from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404, render_... | {
"repo_name": "mdales/mcserverstats",
"path": "servers/views.py",
"copies": "1",
"size": "1807",
"license": "mit",
"hash": -1623115315258495500,
"line_mean": 28.6393442623,
"line_max": 67,
"alpha_frac": 0.650802435,
"autogenerated": false,
"ratio": 4.418092909535452,
"config_test": false,
"ha... |
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseNotFound
from django.views.decorators.csrf import csrf_exempt #csrf_protect
from django.shortcuts import render_to_response
from . import query_formatter as qf
def homepage(request):
"""
Overview / Landing Page
""... | {
"repo_name": "distributed-system-analysis/es-graphite-shim",
"path": "es-graphite-shim/es-graphite-shim/views.py",
"copies": "1",
"size": "3916",
"license": "bsd-2-clause",
"hash": -6826669481391302000,
"line_mean": 36.2952380952,
"line_max": 81,
"alpha_frac": 0.5370275792,
"autogenerated": false,... |
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseRedirect
from django.conf import settings
from django.shortcuts import render_to_response
from django.contrib.auth.models import User
from django.contrib.auth.decorators import user_passes_test
from django_messaging.models impo... | {
"repo_name": "PaulcyMboungou/django-messaging",
"path": "django_messaging/views/__init__.py",
"copies": "1",
"size": "2008",
"license": "bsd-3-clause",
"hash": -5349177693859268000,
"line_mean": 42.652173913,
"line_max": 259,
"alpha_frac": 0.7280876494,
"autogenerated": false,
"ratio": 3.4501718... |
from django.template import RequestContext
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template.loader import render_to_string
try:
import simplejson as json
except:
import json
import datetime
from decimal import Decimal
from django.core.serializers.json im... | {
"repo_name": "jumoconnect/openjumo",
"path": "jumodjango/etc/view_helpers.py",
"copies": "1",
"size": "3422",
"license": "mit",
"hash": -6466147732477094000,
"line_mean": 32.5490196078,
"line_max": 102,
"alpha_frac": 0.633547633,
"autogenerated": false,
"ratio": 3.9606481481481484,
"config_tes... |
from django.template import RequestContext
from django.http import HttpResponse
from django.template.context_processors import csrf
from django.shortcuts import render_to_response
from django.forms.models import modelform_factory
from qmpy import *
qfile = open(INSTALL_PATH + "/configuration/qfiles/local.q").read()
... | {
"repo_name": "wolverton-research-group/qmpy",
"path": "qmpy/web/views/computing/new.py",
"copies": "1",
"size": "1093",
"license": "mit",
"hash": -7423638771188959000,
"line_mean": 28.5405405405,
"line_max": 87,
"alpha_frac": 0.6440988106,
"autogenerated": false,
"ratio": 3.619205298013245,
"c... |
from django.template import RequestContext
from django.http import HttpResponseNotFound, HttpResponse
def hash_link(request, key):
"""
all hash links go to this function.
"""
from models import HashLink
if key:
return_dict = {}
HashLink.verify_and_call_action_function(request,key, ... | {
"repo_name": "peiwei/django-hashphrase",
"path": "hashphrase/views.py",
"copies": "1",
"size": "2611",
"license": "bsd-2-clause",
"hash": 1660881767146852400,
"line_mean": 37.9701492537,
"line_max": 147,
"alpha_frac": 0.6813481425,
"autogenerated": false,
"ratio": 4.273322422258593,
"config_te... |
from django.template import RequestContext
from django.http import HttpResponseRedirect, Http404, HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from django.db import models
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth.models imp... | {
"repo_name": "skabber/django-omb",
"path": "omb/views.py",
"copies": "1",
"size": "12610",
"license": "mit",
"hash": 2524920894505624000,
"line_mean": 50.4693877551,
"line_max": 168,
"alpha_frac": 0.6544012688,
"autogenerated": false,
"ratio": 3.899196042053185,
"config_test": false,
"has_no... |
from django.template import RequestContext
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render, render_to_response
from django.urls import reverse
import json
from .forms import ReportForm
from report.models import Eviction
from django.views.generic.edit import FormView
from d... | {
"repo_name": "wdamon/tenants_talk",
"path": "report/views.py",
"copies": "1",
"size": "1465",
"license": "mit",
"hash": -4809361746341399000,
"line_mean": 28.8979591837,
"line_max": 119,
"alpha_frac": 0.75221843,
"autogenerated": false,
"ratio": 3.8451443569553807,
"config_test": false,
"has... |
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from django.core.urlresolvers import reverse
from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from django.template.loader import... | {
"repo_name": "electionleaflets/electionleaflets",
"path": "electionleaflets/apps/core/views.py",
"copies": "1",
"size": "1954",
"license": "mit",
"hash": 6433081397347302000,
"line_mean": 36.5769230769,
"line_max": 107,
"alpha_frac": 0.6637666325,
"autogenerated": false,
"ratio": 3.908,
"confi... |
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from django.contrib.admin.views.decorators import staff_member_requir... | {
"repo_name": "vongochung/buiquocviet",
"path": "mce_filebrowser/views.py",
"copies": "2",
"size": "1847",
"license": "bsd-3-clause",
"hash": 5412595093178182000,
"line_mean": 33.2037037037,
"line_max": 78,
"alpha_frac": 0.6870600975,
"autogenerated": false,
"ratio": 3.913135593220339,
"config_... |
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.contrib.admin.views.decorators import staff_member_required
from teams.models import Team
from members.models import Member
from teams.forms import UploadFileForm
def h... | {
"repo_name": "venetay/Photo-Competition",
"path": "teams/views.py",
"copies": "1",
"size": "1677",
"license": "mit",
"hash": 7620819092123783000,
"line_mean": 34.6808510638,
"line_max": 89,
"alpha_frac": 0.5700655933,
"autogenerated": false,
"ratio": 4.289002557544757,
"config_test": false,
... |
from django.template import RequestContext
from django.shortcuts import get_object_or_404, render_to_response
from selvbetjening.core.events.models import Event, Attend, suspend_price_updates, resume_price_updates
__ALL__ = ('get_event_from_id',
'event_registration_open_required_ext',
'event_reg... | {
"repo_name": "animekita/selvbetjening",
"path": "selvbetjening/businesslogic/events/decorators.py",
"copies": "1",
"size": "2173",
"license": "mit",
"hash": -8240483136662059000,
"line_mean": 31.9242424242,
"line_max": 118,
"alpha_frac": 0.6083755177,
"autogenerated": false,
"ratio": 4.203094777... |
from django.template import RequestContext
from django.shortcuts import get_object_or_404, render_to_response, redirect
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.views.decorators.http import require_http_methods
from django.http import HttpResponse
from genewiki.mapping.model... | {
"repo_name": "SuLab/genewiki",
"path": "genewiki/wiki/views.py",
"copies": "1",
"size": "4425",
"license": "mit",
"hash": -7482191298524865000,
"line_mean": 39.5963302752,
"line_max": 146,
"alpha_frac": 0.6743502825,
"autogenerated": false,
"ratio": 3.9403383793410507,
"config_test": false,
... |
from django.template import RequestContext
from django.shortcuts import redirect, Http404, get_object_or_404
from comperio.main.forms import CreateCodePackageForm, EditCodePackageForm, CreateDiscussionForm, CreateLinkForm, SearchForm, ContactForm
from comperio.main.tools import MessageManager, AdminTools, render, class... | {
"repo_name": "neutrinog/Comperio",
"path": "comperio/main/views.py",
"copies": "1",
"size": "25129",
"license": "bsd-3-clause",
"hash": 7525773275256954000,
"line_mean": 39.208,
"line_max": 188,
"alpha_frac": 0.5834295038,
"autogenerated": false,
"ratio": 4.037435732647815,
"config_test": fals... |
from django.template import RequestContext
from django.shortcuts import render, render_to_response
from django.contrib.auth import authenticate, login, logout
from django.core.urlresolvers import reverse
from django.core.context_processors import csrf
from django.http import HttpResponseRedirect
from django.contrib.aut... | {
"repo_name": "aejenner/sequoia",
"path": "djangoSQ/SiQuoia/siquoia/views.py",
"copies": "1",
"size": "1807",
"license": "mit",
"hash": 5828901784851530000,
"line_mean": 33.0943396226,
"line_max": 105,
"alpha_frac": 0.7537354732,
"autogenerated": false,
"ratio": 3.5570866141732282,
"config_test... |
from django.template import RequestContext
from django.shortcuts import render,render_to_response
from django.http import HttpResponse,HttpResponseRedirect
from django.utils.http import urlquote
from django.utils.encoding import iri_to_uri
from django.contrib.auth import authenticate,login,logout
from django.contrib.au... | {
"repo_name": "AndrewRook/game_designer",
"path": "user_control/views.py",
"copies": "1",
"size": "2922",
"license": "mit",
"hash": -6643146385758911000,
"line_mean": 33.3764705882,
"line_max": 144,
"alpha_frac": 0.6611909651,
"autogenerated": false,
"ratio": 4.367713004484305,
"config_test": f... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from blog.models import Entry, Term
from django.core.exceptions import ObjectDoesNotExist
def home(request):
context = RequestContext(request)
entry = Entry.objects.latest('start_date')
term = ent... | {
"repo_name": "jxnl/jxnlco-django",
"path": "blog/views.py",
"copies": "1",
"size": "2311",
"license": "mit",
"hash": 8750390238603645000,
"line_mean": 32.9852941176,
"line_max": 79,
"alpha_frac": 0.657723929,
"autogenerated": false,
"ratio": 3.910321489001692,
"config_test": false,
"has_no_k... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.admin.views.decorators import staff_member_required
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from django.db.models import get_model
from... | {
"repo_name": "praekelt/jmbo-foundry",
"path": "foundry/admin_views.py",
"copies": "1",
"size": "6401",
"license": "bsd-3-clause",
"hash": -8268710391925793000,
"line_mean": 29.6267942584,
"line_max": 82,
"alpha_frac": 0.6366192782,
"autogenerated": false,
"ratio": 3.6123024830699775,
"config_t... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib.admin.views.decorators import staff_member_required
from support.forms import FeaturesHelpTextForm
from support.models import FeaturesHelpText
from django.http import HttpResponseRedirect
fr... | {
"repo_name": "codepython/CollectorCity-Market-Place",
"path": "marketplaces/apps/support/views.py",
"copies": "2",
"size": "1148",
"license": "apache-2.0",
"hash": -5092625407328516000,
"line_mean": 34.90625,
"line_max": 95,
"alpha_frac": 0.7168989547,
"autogenerated": false,
"ratio": 4.20512820... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.db.models import Q
from django.template.loader import select_template
from viewpoint.settings import DEFAULT_BLOG, MONTH_FORMAT
from django.views.generic.date_based import archive_day, archive_month... | {
"repo_name": "callowayproject/django-viewpoint",
"path": "viewpoint/views.py",
"copies": "1",
"size": "3446",
"license": "apache-2.0",
"hash": 763438286923062100,
"line_mean": 41.0243902439,
"line_max": 84,
"alpha_frac": 0.6227510157,
"autogenerated": false,
"ratio": 3.8981900452488687,
"confi... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponseForbidden
from django.contrib.auth.models import User, Group
from rbac.models import RBACRole, RBACOperation, RBACPermission, RBACGenericPermission
def users_are_friends(u... | {
"repo_name": "somcomltd/django-rbac",
"path": "example/myapp/views.py",
"copies": "1",
"size": "2083",
"license": "mit",
"hash": 5079535767974782000,
"line_mean": 38.3018867925,
"line_max": 96,
"alpha_frac": 0.6423427748,
"autogenerated": false,
"ratio": 4.060428849902534,
"config_test": false... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from models import WikiItem
from forms import WikiItemForm
def show_all_wiki_items(request):
wiki_it... | {
"repo_name": "nsi-iff/nsi_site",
"path": "apps/wiki/views.py",
"copies": "1",
"size": "1239",
"license": "mit",
"hash": 7519689999516697000,
"line_mean": 29.2195121951,
"line_max": 82,
"alpha_frac": 0.6828087167,
"autogenerated": false,
"ratio": 3.6228070175438596,
"config_test": false,
"has... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.views.generic import ListView
from tags.models import Tag
def view_tag(request, slug):
from tags.models import Tag
from leaflets.models import Leaflet
from categories.models import Ca... | {
"repo_name": "electionleaflets/electionleaflets",
"path": "electionleaflets/apps/tags/views.py",
"copies": "2",
"size": "1151",
"license": "mit",
"hash": 7867501661613052000,
"line_mean": 31.9142857143,
"line_max": 70,
"alpha_frac": 0.5438748914,
"autogenerated": false,
"ratio": 4.51372549019607... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
def view_parties(request):
from parties.models import Party
return render_to_response('parties/index.html',
{
'parties': Party.objects.all... | {
"repo_name": "electionleaflets/electionleaflets",
"path": "electionleaflets/apps/parties/views.py",
"copies": "1",
"size": "2286",
"license": "mit",
"hash": 8880720856890550000,
"line_mean": 34.734375,
"line_max": 98,
"alpha_frac": 0.4632545932,
"autogenerated": false,
"ratio": 5.08,
"config_t... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.views.decorators.cach... | {
"repo_name": "MAPC/hubwaychallenge",
"path": "submission/views.py",
"copies": "1",
"size": "5906",
"license": "bsd-3-clause",
"hash": 803919755035109400,
"line_mean": 34.3652694611,
"line_max": 121,
"alpha_frac": 0.6445987132,
"autogenerated": false,
"ratio": 3.7858974358974358,
"config_test":... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404, redirect
from rapidsms.models import Contact, Connection
from contact.forms import NewContactForm, FreeSearchForm
from django.core.paginator import Paginator, InvalidPage
from django.http import Http404, Http... | {
"repo_name": "unicefuganda/edtrac",
"path": "edtrac_project/rapidsms_contact/contact/views.py",
"copies": "1",
"size": "3187",
"license": "bsd-3-clause",
"hash": -7652624424955863000,
"line_mean": 40.9342105263,
"line_max": 105,
"alpha_frac": 0.6921870097,
"autogenerated": false,
"ratio": 4.1497... |
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404, render
from chess.models import Player, Match
from django.contrib.auth.models import User
def landing(request):
context = {}
return render(request, 'chess/landing.html', context)
def home_page(requ... | {
"repo_name": "EyuelAbebe/gamer",
"path": "chessfellows/chess/views.py",
"copies": "1",
"size": "2134",
"license": "mit",
"hash": 1985286609393601000,
"line_mean": 37.1071428571,
"line_max": 78,
"alpha_frac": 0.5351452671,
"autogenerated": false,
"ratio": 4.1038461538461535,
"config_test": fals... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.contrib.auth import authenticate, login, logout
from django.core.context_processors import csrf
from TaxiService.user_groups import *
from TaxiService.models import *
from django.shortcuts import redirect
def login_u... | {
"repo_name": "IlyaSergeev/taxi_service",
"path": "TaxiService/views/views.py",
"copies": "1",
"size": "3595",
"license": "mit",
"hash": 4386386062681559000,
"line_mean": 25.0507246377,
"line_max": 80,
"alpha_frac": 0.5855354659,
"autogenerated": false,
"ratio": 3.5245098039215685,
"config_test... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.contrib.auth.views import login
from django.contrib.contenttypes.models import ContentType
from django.http import HttpResponse
def error_view(request):
assert False, request
def error_handler(request):
re... | {
"repo_name": "theteam/django-theteamcommon",
"path": "src/theteamcommon/views.py",
"copies": "1",
"size": "2169",
"license": "mit",
"hash": -7381968200031126000,
"line_mean": 32.3692307692,
"line_max": 78,
"alpha_frac": 0.6071922545,
"autogenerated": false,
"ratio": 4.211650485436893,
"config_... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.sites.models impo... | {
"repo_name": "codekoala/django-pendulum",
"path": "pendulum/views.py",
"copies": "1",
"size": "12255",
"license": "mit",
"hash": -2720941360884128000,
"line_mean": 40.5423728814,
"line_max": 111,
"alpha_frac": 0.6066911465,
"autogenerated": false,
"ratio": 4.581308411214954,
"config_test": fal... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.db import connection
class TitanProgressReport:
def __init__(self):
pass
def dictfetchall(self, cursor):
"Returns all rows from a cursor as a dict"
desc = cursor.description
... | {
"repo_name": "PanDAWMS/panda-bigmon-core",
"path": "core/reports/TitanProgressReport.py",
"copies": "1",
"size": "2528",
"license": "apache-2.0",
"hash": 4830803818919674000,
"line_mean": 44.9636363636,
"line_max": 174,
"alpha_frac": 0.6024525316,
"autogenerated": false,
"ratio": 3.8361153262518... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.db.models import Count, Sum, Avg
import csv
from django.http import HttpResponse
from decimal import Decimal, ROUND_FLOOR
import datetime
from main.models import Game, Round, GameReport
from browser.models import ... | {
"repo_name": "CNDLS/generic-game-host",
"path": "browser/views.py",
"copies": "1",
"size": "10852",
"license": "mit",
"hash": 8659286377606238000,
"line_mean": 42.9392712551,
"line_max": 202,
"alpha_frac": 0.7253962403,
"autogenerated": false,
"ratio": 3.3339477726574502,
"config_test": false,... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.db.models import Q
from apps.blogs.models import Entry
import re
def normalize_query(query_string,
findterms=re.compile(r'"([^"]+)"|(\S+)').findall,
normspace=re.compile(r'\... | {
"repo_name": "mdblv2/joatu-django",
"path": "application/static/apps/search/views.py",
"copies": "2",
"size": "1648",
"license": "apache-2.0",
"hash": 5223868033596891000,
"line_mean": 28.9636363636,
"line_max": 84,
"alpha_frac": 0.5952669903,
"autogenerated": false,
"ratio": 3.9806763285024154,... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import Http404, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.conf import settings
from blog.models import Category, Blog, UserSettings
from tagging.models import Tag, TaggedItem
f... | {
"repo_name": "masiqi/django_blog",
"path": "blog/views.py",
"copies": "1",
"size": "6060",
"license": "mit",
"hash": 8663663930736359000,
"line_mean": 36.4074074074,
"line_max": 110,
"alpha_frac": 0.6414191419,
"autogenerated": false,
"ratio": 3.740740740740741,
"config_test": false,
"has_no... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.forms.models import modelformset_factory
from worldcup.common.msg_util import *
from worldcup.common.user_util import *
from worldcup.matches.models ... | {
"repo_name": "raprasad/worldcup",
"path": "worldcup/worldcup/predictions/views_predictions.py",
"copies": "1",
"size": "1881",
"license": "mit",
"hash": 4198565242663368700,
"line_mean": 39.8913043478,
"line_max": 116,
"alpha_frac": 0.7001594896,
"autogenerated": false,
"ratio": 3.77710843373493... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, logout
# Import the Category model
from rango_app.models import Category
from rango_app.models import Page
from rango... | {
"repo_name": "highway7/py_1",
"path": "rango_app/views.py",
"copies": "1",
"size": "9376",
"license": "apache-2.0",
"hash": 1560062659890188000,
"line_mean": 40.6711111111,
"line_max": 95,
"alpha_frac": 0.6622226962,
"autogenerated": false,
"ratio": 4.514203177660087,
"config_test": false,
"... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponse
from rango.models import Category
from rango.models import Page
from rango.models import UserProfile
from rango.forms import UserForm, UserProfileForm
from rango.forms import CategoryForm, Pag... | {
"repo_name": "xerlivex/tango-with-django",
"path": "tango_with_django_project/rango/views.py",
"copies": "7",
"size": "14492",
"license": "mit",
"hash": 6422947796469757000,
"line_mean": 33.0988235294,
"line_max": 137,
"alpha_frac": 0.6270356059,
"autogenerated": false,
"ratio": 4.09957567185289... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import get_object_or_404
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.core.pag... | {
"repo_name": "davidvoler/django-timebank",
"path": "timebank/reservations/views.py",
"copies": "1",
"size": "5535",
"license": "mit",
"hash": -3812288270166282000,
"line_mean": 35.9,
"line_max": 89,
"alpha_frac": 0.6224028907,
"autogenerated": false,
"ratio": 4.344583987441131,
"config_test": ... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from shoppy.contact.forms import AddContactForm
from shoppy.contact.models impor... | {
"repo_name": "pocketone/django-shoppy",
"path": "shoppy/contact/views.py",
"copies": "1",
"size": "3007",
"license": "bsd-3-clause",
"hash": 2953704189337808000,
"line_mean": 30.6526315789,
"line_max": 86,
"alpha_frac": 0.6029265048,
"autogenerated": false,
"ratio": 4.188022284122563,
"config_... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
import cgxn.djangoxn as xiaonei
from share.models import Stock, Holder
from order.models import StockQueue, UserAccount
from tools import *... | {
"repo_name": "masiqi/django_blog",
"path": "member/views.py",
"copies": "1",
"size": "2451",
"license": "mit",
"hash": 6693252586634991000,
"line_mean": 43.5818181818,
"line_max": 97,
"alpha_frac": 0.5630354957,
"autogenerated": false,
"ratio": 3.8598425196850394,
"config_test": false,
"has_... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
import forms
from django.contrib.auth import authenticate, login
from django.contrib.auth import views as aviews
from django.core.urlresolvers import reverse
from django.contrib.auth.d... | {
"repo_name": "sophilabs/pyconuy-site",
"path": "pyconuy2012/account/views.py",
"copies": "1",
"size": "4751",
"license": "mit",
"hash": 4687115292759555000,
"line_mean": 39.6068376068,
"line_max": 112,
"alpha_frac": 0.6830141023,
"autogenerated": false,
"ratio": 4.029686174724342,
"config_test... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.shortcuts import get_object_or_404
from django.shortcuts import redirect
from doccloud.forms import DocCloudDocForm
from doccloud.models import DocumentCloudProperties
from doccloud.models import Document
from django.... | {
"repo_name": "BayCitizen/django-doccloud",
"path": "doccloud/views.py",
"copies": "1",
"size": "2955",
"license": "apache-2.0",
"hash": 1490836322644560000,
"line_mean": 39.4931506849,
"line_max": 83,
"alpha_frac": 0.5986463621,
"autogenerated": false,
"ratio": 4.766129032258065,
"config_test"... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.shortcuts import render
from rango.models import Category
from rango.models import Page
# Create your views here.
from django.http import HttpResponse
def index(request):
# Request the context of the request.
... | {
"repo_name": "richabreu/CIS-627-Web-Database-Services-Development",
"path": "week2/week2.2/code/tango_with_django_project/rango/views.py",
"copies": "2",
"size": "3236",
"license": "unlicense",
"hash": 885996933288421500,
"line_mean": 52.9333333333,
"line_max": 91,
"alpha_frac": 0.7039555006,
"aut... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.utils.translation import ugettext as _
from django.conf import settings
from django.core.cache import cache
from django.http import HttpResponseForbidden, HttpResponseBadRequest
import random
from knesset.mks.models ... | {
"repo_name": "livni/old-OK",
"path": "src/knesset/auxiliary/views.py",
"copies": "1",
"size": "2189",
"license": "bsd-3-clause",
"hash": -2811312979946586000,
"line_mean": 42.78,
"line_max": 95,
"alpha_frac": 0.6994061215,
"autogenerated": false,
"ratio": 3.9299820466786355,
"config_test": fal... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponseRedirect, HttpResponse
from datetime import datetime
from auditions.forms import ActorSignupForm
from auditions.models import Actor
from dja... | {
"repo_name": "colinsullivan/AuditionManager",
"path": "auditionapp/auditions/views.py",
"copies": "1",
"size": "1986",
"license": "mit",
"hash": 3623858952723967500,
"line_mean": 29.5692307692,
"line_max": 88,
"alpha_frac": 0.6978851964,
"autogenerated": false,
"ratio": 3.8941176470588235,
"co... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from login.models import Category
from django.shortcuts import render
from login.models import Page, UserProfile
from reports.models import Report
from login.forms import CategoryForm
from login.forms import PageForm, UserForm, U... | {
"repo_name": "jnayak1/cs3240-s16-team16",
"path": "login/views.py",
"copies": "1",
"size": "22831",
"license": "mit",
"hash": 4305304053564661000,
"line_mean": 36.9252491694,
"line_max": 162,
"alpha_frac": 0.6167929569,
"autogenerated": false,
"ratio": 4.27626896422551,
"config_test": false,
... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from rango.models import Category
from rango.models import Page
from rango.forms import CategoryForm
from rango.forms import PageForm
# a simple test view
def index(request):
# Request the context of the HTTP request.
# ... | {
"repo_name": "jonellalvi/tango_with_django",
"path": "rango/views.py",
"copies": "1",
"size": "6290",
"license": "mit",
"hash": -6897495290234999000,
"line_mean": 38.8164556962,
"line_max": 95,
"alpha_frac": 0.6640699523,
"autogenerated": false,
"ratio": 4.325997248968363,
"config_test": false... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from rango.models import Category
from rango.models import Page
from rango.forms import CategoryForm, PageForm
def index(request):
context = RequestContext(request)
category_list = Category.objects.order_by('-likes')[:5... | {
"repo_name": "LuisFerquin/tango_with_django_project",
"path": "rango/views.py",
"copies": "1",
"size": "3362",
"license": "mit",
"hash": 1428767714612329500,
"line_mean": 31.640776699,
"line_max": 83,
"alpha_frac": 0.6344437835,
"autogenerated": false,
"ratio": 4.105006105006105,
"config_test"... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from web.campaign.models import PCAMPAIGN_LINK_TEXT_LOOKUP
from web.lib.json import JsonResponse
import json
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def set_preview(request):
data = {'success': Fals... | {
"repo_name": "TheAmbitiousInc/com.theambitious.qrtrace.web",
"path": "web/campaign/views.py",
"copies": "1",
"size": "2361",
"license": "mit",
"hash": 7718005209605334000,
"line_mean": 45.3137254902,
"line_max": 107,
"alpha_frac": 0.581956798,
"autogenerated": false,
"ratio": 4.348066298342541,
... |
from django.template import RequestContext
from django.shortcuts import render_to_response
from . import utils
from project.views.mixins import PjaxResponseMixin
# accepts
# http://domain.com/search/searchquery or
# http://domain.com/search/?query=searchquery
def ajax_search(request):
if request.is_ajax():
... | {
"repo_name": "JTarball/docker-django-polymer-starter-kit",
"path": "docker/app/app/backend/apps/_archive/search_orig/views.py",
"copies": "4",
"size": "5384",
"license": "isc",
"hash": -7398262764802061000,
"line_mean": 40.4153846154,
"line_max": 164,
"alpha_frac": 0.6654903418,
"autogenerated": f... |
from django.template import RequestContext
from django.shortcuts import render_to_response, redirect
from twitter import *
from allauth.socialaccount.models import SocialApp, SocialToken, SocialAccount
def index(request):
if not request.user.is_authenticated():
return redirect('/accounts/login/?next... | {
"repo_name": "impalah/tuiker",
"path": "src/frontend/views.py",
"copies": "1",
"size": "1586",
"license": "mit",
"hash": 6565030052277072000,
"line_mean": 25,
"line_max": 88,
"alpha_frac": 0.6015132409,
"autogenerated": false,
"ratio": 3.945273631840796,
"config_test": false,
"has_no_keyword... |
from django.template import RequestContext
from django.shortcuts import render_to_response, render, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from coreExtend.models import Account
from .models import Post, Thread, Known_IPs
from .forms import PostModelForm
def index(request):
po... | {
"repo_name": "underlost/Replica",
"path": "replica/contrib/whisper/views.py",
"copies": "1",
"size": "1337",
"license": "mit",
"hash": -838548081088537200,
"line_mean": 36.1388888889,
"line_max": 74,
"alpha_frac": 0.7299925206,
"autogenerated": false,
"ratio": 3.2294685990338166,
"config_test"... |
from django.template import RequestContext
from django.shortcuts import render_to_response, render, get_object_or_404, redirect
from django.contrib.auth import logout as auth_logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.decorators import permission_required
from api.models ... | {
"repo_name": "livike/TrackCat",
"path": "web/views.py",
"copies": "1",
"size": "5736",
"license": "mit",
"hash": 2401374620312775000,
"line_mean": 35.5350318471,
"line_max": 155,
"alpha_frac": 0.7316945607,
"autogenerated": false,
"ratio": 3.2758423757852655,
"config_test": false,
"has_no_ke... |
from django.template import RequestContext
from django.shortcuts import render_to_response, render
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.decorators import login_required
from rango.models import Category, Page
from... | {
"repo_name": "richabreu/CIS-627-Web-Database-Services-Development",
"path": "tango_with_django_project/rango/views.py",
"copies": "1",
"size": "10688",
"license": "unlicense",
"hash": -7935919395545311000,
"line_mean": 45.672489083,
"line_max": 154,
"alpha_frac": 0.6625187126,
"autogenerated": fal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.