text
stringlengths
0
1.05M
meta
dict
from django.views.decorators.cache import cache_control from django.shortcuts import get_object_or_404 from rest_framework import views, status from rest_framework.permissions import AllowAny from rest_framework.response import Response from bulbs.content.models import Content from bulbs.recirc.serializers import Rec...
{ "repo_name": "theonion/django-bulbs", "path": "bulbs/recirc/views.py", "copies": "1", "size": "1425", "license": "mit", "hash": 5115720195359117000, "line_mean": 29.3191489362, "line_max": 73, "alpha_frac": 0.701754386, "autogenerated": false, "ratio": 3.8203753351206435, "config_test": false,...
from django.views.decorators.cache import cache_control from rest_framework.exceptions import ParseError from rest_framework.response import Response from rest_framework.viewsets import ViewSet, ReadOnlyModelViewSet from .models import Place, Type from .serializers import PlaceSerializer, PlaceListSerializer class P...
{ "repo_name": "zarautz/pagoeta", "path": "pagoeta/apps/places/views.py", "copies": "1", "size": "4877", "license": "mit", "hash": -8841924586891844000, "line_mean": 31.7315436242, "line_max": 98, "alpha_frac": 0.5234775477, "autogenerated": false, "ratio": 4.675934803451582, "config_test": fals...
from django.views.decorators.cache import cache_control from rest_framework.permissions import IsAuthenticatedOrReadOnly from rest_framework.response import Response from rest_framework.viewsets import ViewSet from .scrapers import HitzaPostScraper class BasePostViewSet(ViewSet): permission_classes = (IsAuthenti...
{ "repo_name": "zarautz/pagoeta", "path": "pagoeta/apps/posts/views.py", "copies": "1", "size": "1281", "license": "mit", "hash": 4298405110017986000, "line_mean": 27.4666666667, "line_max": 71, "alpha_frac": 0.6385636222, "autogenerated": false, "ratio": 4.015673981191223, "config_test": false,...
from django.views.decorators.cache import cache_page from django.conf import settings from staticgenerator import StaticGenerator, StaticGeneratorException def expire_view_cache(request): from django.utils.cache import get_cache_key key = get_cache_key(request) cache.delete(key) def cache_page_if_anonymo...
{ "repo_name": "drx/archfinch", "path": "utils/cache.py", "copies": "1", "size": "2730", "license": "mit", "hash": -4930260899252659000, "line_mean": 34, "line_max": 120, "alpha_frac": 0.5794871795, "autogenerated": false, "ratio": 4.634974533106961, "config_test": false, "has_no_keywords": fa...
# from django.views.decorators.cache import cache_page from django.contrib.auth import get_user_model from rest_framework.viewsets import ModelViewSet from rest_framework import generics # from rest_framework.response import Response from . import serializers, models UserModel = get_user_model() class User(ModelVie...
{ "repo_name": "linovia/basic-drf-project", "path": "basic/core/views.py", "copies": "2", "size": "1576", "license": "mit", "hash": -2296758631081249500, "line_mean": 31.8333333333, "line_max": 75, "alpha_frac": 0.7081218274, "autogenerated": false, "ratio": 4.061855670103093, "config_test": fal...
from django.views.decorators.cache import cache_page from django.shortcuts import get_object_or_404, render_to_response from website.models import * from website.forms import * from django.db import connection, transaction from django.core.context_processors import csrf from django.http import HttpResponseRedirect, Htt...
{ "repo_name": "alaingilbert/ttdashboard", "path": "server/ttdashboard/website/views.py", "copies": "1", "size": "66767", "license": "mit", "hash": 1013130228266406000, "line_mean": 34.5521831736, "line_max": 244, "alpha_frac": 0.512289005, "autogenerated": false, "ratio": 3.877068695197724, "co...
from django.views.decorators.cache import cache_page from django.template.loader import render_to_string from django.http import HttpResponse from django.conf import settings from dv_apps.metrics.stats_views_datasets import DatasetCountByMonthView,\ DatasetTotalCounts,\ DatasetSubjectCounts from dv_apps.metri...
{ "repo_name": "IQSS/miniverse", "path": "dv_apps/metrics/views_swagger_spec.py", "copies": "1", "size": "4889", "license": "mit", "hash": -5762301953201536000, "line_mean": 27.0977011494, "line_max": 97, "alpha_frac": 0.6618940479, "autogenerated": false, "ratio": 4.098072087175189, "config_tes...
from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from djgeojson.views import GeoJSONLayerView from django.conf.urls import include, url from django.contrib import admin from permit_map import models from permit_map import views urlpatterns = [ # This URL maps to / an...
{ "repo_name": "mattkendall/cfa-cary-django-site", "path": "permit_map/urls.py", "copies": "1", "size": "1366", "license": "mit", "hash": 1763720143649500200, "line_mean": 58.3913043478, "line_max": 166, "alpha_frac": 0.7554904832, "autogenerated": false, "ratio": 3.520618556701031, "config_test...
from django.views.decorators.cache import cache_page from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.shortcuts import get_object_or_404 from django.http import HttpResponse from iso3166 import countries import unicodecsv from .models import (Board, Project...
{ "repo_name": "MjAbuz/foundation", "path": "foundation/organisation/views.py", "copies": "1", "size": "6016", "license": "mit", "hash": 8315341158778077000, "line_mean": 35.4606060606, "line_max": 79, "alpha_frac": 0.6191821809, "autogenerated": false, "ratio": 4.221754385964912, "config_test":...
from django.views.decorators.cache import cache_page from django.views.decorators.cache import never_cache from django.http import HttpResponseRedirect from django.http import HttpResponse import logging import urllib import models import bitly @never_cache def facebook_share(request): url = request.GET[...
{ "repo_name": "bluestemscott/librarygadget", "path": "librarygadget/share/views.py", "copies": "1", "size": "1623", "license": "mit", "hash": -9086074490289128000, "line_mean": 31.1632653061, "line_max": 80, "alpha_frac": 0.6950092421, "autogenerated": false, "ratio": 3.039325842696629, "config...
# from django.views.decorators.cache import cache_page # from django.views.decorators.csrf import csrf_protect from django.contrib.auth.decorators import permission_required from django.contrib.auth.models import User from django.core.cache import get_cache from django.core.exceptions import ObjectDoesNotExist fr...
{ "repo_name": "ace-han/luckydraw", "path": "slotmachine/luckydraw/views.py", "copies": "1", "size": "6148", "license": "mit", "hash": 928344197200496600, "line_mean": 45.6744186047, "line_max": 147, "alpha_frac": 0.6890045543, "autogenerated": false, "ratio": 4.034120734908137, "config_test": f...
from django.views.decorators.cache import never_cache from django.contrib import admin from django.utils.text import capfirst from django.core.urlresolvers import reverse class AdminSite(admin.AdminSite): def __init__(self, name='admin', app_name='admin'): super(AdminSite, self).__init__(name, app_name) ...
{ "repo_name": "Depado/starmato-admin", "path": "starmato/admin/sites.py", "copies": "1", "size": "2196", "license": "mit", "hash": 1023274500404171600, "line_mean": 42.0588235294, "line_max": 113, "alpha_frac": 0.5906193078, "autogenerated": false, "ratio": 4.021978021978022, "config_test": fal...
from django.views.decorators.csrf import csrf_exempt from API.models import * from API.serializers import * from rest_framework import permissions from API.permissions import IsOwnerOrReadOnly, OnlyPMorQALeadCanEdit, IsProjectTeamOnly from rest_framework import renderers from rest_framework.response import Response fro...
{ "repo_name": "Dikovinka/HRCS", "path": "API/views.py", "copies": "1", "size": "6808", "license": "apache-2.0", "hash": -1070402834011711500, "line_mean": 39.0529411765, "line_max": 98, "alpha_frac": 0.6896298472, "autogenerated": false, "ratio": 4.143639683505782, "config_test": false, "has_...
from django.views.decorators.csrf import csrf_exempt from .authentication import NoAuthentication from .authorization import NoAuthorization from .datasets import ModelDataSet from .http import JsonResponse from .serializers import DEFAULT_SERIALIZERS, MultiSerializer from .validators import Validator try: from dj...
{ "repo_name": "Rediker-Software/pehg", "path": "pehg/resources.py", "copies": "1", "size": "14929", "license": "mit", "hash": -1490885439603093800, "line_mean": 33.3986175115, "line_max": 149, "alpha_frac": 0.570366401, "autogenerated": false, "ratio": 4.314739884393064, "config_test": false, ...
#from django.views.decorators.csrf import csrf_exempt from cacti_rest.utils import retrieve_param from django.http import HttpResponseServerError from django.shortcuts import render_to_response from cacti_rest.models import DataLocal import logging, simplejson from django.core.urlresolvers import reverse def get(req...
{ "repo_name": "jpardobl/cacti_rest", "path": "cacti_rest/resource_host_datasource.py", "copies": "1", "size": "1443", "license": "bsd-3-clause", "hash": -395722028782015550, "line_mean": 32.5813953488, "line_max": 117, "alpha_frac": 0.6292446292, "autogenerated": false, "ratio": 4.064788732394366...
from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login from django.shortcuts import render from django.http import HttpResponse, Http404 from django.conf import settings import logging from notifier import sms fr...
{ "repo_name": "kprovost/domotica", "path": "domotica/views.py", "copies": "1", "size": "6093", "license": "bsd-2-clause", "hash": -3355488213657075000, "line_mean": 22.3448275862, "line_max": 87, "alpha_frac": 0.5859182669, "autogenerated": false, "ratio": 3.703951367781155, "config_test": fals...
from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.http import HttpResponse from mediaviewer.models.file import File from mediaviewer.models.path import Path from mediaviewer.models.downloadtoken import DownloadToken from mediaviewer.views.views_ut...
{ "repo_name": "kyokley/MediaViewer", "path": "mediaviewer/views/detail.py", "copies": "1", "size": "5150", "license": "mit", "hash": 1806777196205680000, "line_mean": 33.7972972973, "line_max": 101, "alpha_frac": 0.6559223301, "autogenerated": false, "ratio": 3.8985616956850873, "config_test": ...
from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.utils.html import escape from django.http import JsonResponse from django.db import IntegrityError from ch...
{ "repo_name": "nbeck90/game-chat", "path": "gamechat/chat/views.py", "copies": "1", "size": "4343", "license": "mit", "hash": 2983056025075299000, "line_mean": 28.9517241379, "line_max": 75, "alpha_frac": 0.6193875201, "autogenerated": false, "ratio": 3.7343078245915735, "config_test": false, ...
from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response, redirect from django.template import RequestContext from django.http import JsonResponse, HttpResponse from django.contrib.auth import logout, authenticate, log...
{ "repo_name": "tekton/miseenplace", "path": "recipie/views.py", "copies": "1", "size": "7603", "license": "mit", "hash": -3142048088844101000, "line_mean": 35.5528846154, "line_max": 115, "alpha_frac": 0.5781928186, "autogenerated": false, "ratio": 4.249860257126887, "config_test": false, "ha...
from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required, permission_required from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from djang...
{ "repo_name": "canbal/Tally", "path": "django_source/testtool/main/views.py", "copies": "1", "size": "9256", "license": "mit", "hash": -632802339028378400, "line_mean": 44.8267326733, "line_max": 132, "alpha_frac": 0.6001512532, "autogenerated": false, "ratio": 4.173128944995492, "config_test":...
from django.views.decorators.csrf import csrf_exempt from django.core.cache import cache import sys from datetime import timedelta from uqx_api import settings from rest_framework.permissions import AllowAny # APIs from rest_framework.response import Response from rest_framework.reverse import reverse # Endpoints fro...
{ "repo_name": "UQ-UQx/uqx_api", "path": "api/views.py", "copies": "1", "size": "9654", "license": "mit", "hash": 783406218890048600, "line_mean": 40.2564102564, "line_max": 203, "alpha_frac": 0.6367308888, "autogenerated": false, "ratio": 3.7505827505827507, "config_test": false, "has_no_keyw...
from django.views.decorators.csrf import csrf_exempt from django.db.models import Q from django.core import serializers from django.http import HttpResponse from django.shortcuts import render from functools import reduce import operator from gpus.forms import AddGPU from gpus.models import GPU def show_gpu(req): ...
{ "repo_name": "thebravoman/software_engineering_2016", "path": "hm_term2_rest_api_projects/11a_03_11/gpus/views.py", "copies": "1", "size": "2805", "license": "mit", "hash": 3539156036997558000, "line_mean": 35.4415584416, "line_max": 101, "alpha_frac": 0.5903743316, "autogenerated": false, "rati...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, Http404 from django.core.exceptions import PermissionDenied import json import logging logging.getLogger().setLevel(logging.INFO) # uncomment for the slackclient API client (https://github.com/slackapi/python-slackclient) from...
{ "repo_name": "mm-jay/django-slack-events-api", "path": "slack/views.py", "copies": "1", "size": "2976", "license": "mit", "hash": -178846392744013660, "line_mean": 40.9154929577, "line_max": 110, "alpha_frac": 0.6948924731, "autogenerated": false, "ratio": 3.8251928020565553, "config_test": fa...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import render import json import graph_requester from graphing_app.models import GraphRequest # /build/generate # Note: disregard cross-site request forgery token validation for thi...
{ "repo_name": "feedingzur/graphing", "path": "builder_web/views.py", "copies": "1", "size": "1124", "license": "mit", "hash": -6505658199587779000, "line_mean": 34.15625, "line_max": 87, "alpha_frac": 0.7197508897, "autogenerated": false, "ratio": 4.60655737704918, "config_test": false, "has_...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseNotFound, HttpResponseServerError from rpfti.apps import get_whoami, get_infobot, get_amoralbot import telebot import traceback, sys cntr = 0 whoamibot = None infobot = None amoralbot = None def mon(request): r...
{ "repo_name": "orangefrg/rpfti_bot", "path": "views.py", "copies": "1", "size": "2198", "license": "apache-2.0", "hash": 849734147086880000, "line_mean": 29.9577464789, "line_max": 83, "alpha_frac": 0.6474067334, "autogenerated": false, "ratio": 3.8292682926829267, "config_test": false, "has_...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse, HttpResponseRedirect from django.template import loader, RequestContext from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, logout from django.u...
{ "repo_name": "robinzhangx/Piload", "path": "server/views.py", "copies": "1", "size": "4825", "license": "apache-2.0", "hash": -5431125908270331000, "line_mean": 31.6013513514, "line_max": 103, "alpha_frac": 0.6176165803, "autogenerated": false, "ratio": 3.4887924801156904, "config_test": false...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from amazon_buttons import models import datetime from django.conf import settings import urllib from amazon_buttons import buttonconf from amazon_buttons import _crypt from django.core.urlresolvers import reverse from xml.dom imp...
{ "repo_name": "lucky-/django-amazon-buynow", "path": "amazon_buttons/views.py", "copies": "1", "size": "1669", "license": "bsd-3-clause", "hash": -3316737068821247500, "line_mean": 28.8035714286, "line_max": 85, "alpha_frac": 0.7273816657, "autogenerated": false, "ratio": 3.0345454545454547, "c...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from django.shortcuts import redirect, get_object_or_404 from django.contrib import messages from payments.models import PaymentInfo import json @csrf_exempt def paypal_success_view(request): charge = request.GET; articl...
{ "repo_name": "pdiazv/makaw", "path": "payments/views.py", "copies": "1", "size": "2299", "license": "bsd-3-clause", "hash": -3808784797724414000, "line_mean": 32.8088235294, "line_max": 156, "alpha_frac": 0.6937799043, "autogenerated": false, "ratio": 3.793729372937294, "config_test": false, ...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from pymongo import MongoClient from bson import json_util import json import logging import datetime logger = logging.getLogger('jobs') # get a mongodb client _client = MongoClient() # get a db ref _db = _client['my-database']...
{ "repo_name": "amitnabarro/nosql-presentation", "path": "mongoimdb/movies/views.py", "copies": "1", "size": "1669", "license": "mit", "hash": 4152039458846873600, "line_mean": 18.880952381, "line_max": 57, "alpha_frac": 0.649490713, "autogenerated": false, "ratio": 2.632492113564669, "config_te...
from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse import json import os import helpers, blockchain_func from bitcoin.rpc import Proxy as rpcProcessedProxy from bitcoinrpc.authproxy import JSONRPCException, AuthServiceProxy as rpcRawProxy import external_db from models import Mes...
{ "repo_name": "Peerapps/Peerapps", "path": "peermessage/views.py", "copies": "1", "size": "10334", "license": "mit", "hash": -881082954149600100, "line_mean": 34.3938356164, "line_max": 128, "alpha_frac": 0.6357654345, "autogenerated": false, "ratio": 3.863177570093458, "config_test": false, ...
from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse from django.views import generic from django_fine_uploader.fineuploader import SimpleFineUploader from django_fine_uploader.forms import FineUploaderUploadForm from django_fine_uploader.views import FineUploaderView from .models...
{ "repo_name": "douglasmiranda/django-fine-uploader", "path": "example/myapp/views.py", "copies": "1", "size": "3212", "license": "mit", "hash": 4688089591992188000, "line_mean": 33.5376344086, "line_max": 85, "alpha_frac": 0.7079701121, "autogenerated": false, "ratio": 3.8329355608591884, "conf...
from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse from .models import SlackAlertUserData from cabot.cabotapp.models import Service import json import re @csrf_exempt def slack_message_callback(request): payload = json.loads(request.POST['payload']) service_id = re.matc...
{ "repo_name": "lblasc/cabot-alert-slack", "path": "cabot_alert_slack/views.py", "copies": "2", "size": "1028", "license": "mit", "hash": -4528780643480080000, "line_mean": 29.2352941176, "line_max": 82, "alpha_frac": 0.6760700389, "autogenerated": false, "ratio": 3.8646616541353382, "config_tes...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import get_object_or_404, render from django.http import HttpResponse, JsonResponse from django.views.decorators.cache import cache_control, cache_page from ..models import Musica import re @csrf_exempt def starratings_ajax(request): id = re...
{ "repo_name": "gustavofoa/pympm", "path": "apps/mpm/views/view_starratings.py", "copies": "1", "size": "1191", "license": "apache-2.0", "hash": 3292557966976120300, "line_mean": 28.0731707317, "line_max": 110, "alpha_frac": 0.6884970613, "autogenerated": false, "ratio": 2.725400457665904, "conf...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, Http404 from models import * import json import datetime import logging import os # By default, any unmapped URL hits this and gets a page not found def index(request): ...
{ "repo_name": "preames/lc-service", "path": "service/api/views.py", "copies": "1", "size": "7078", "license": "bsd-3-clause", "hash": -6868360414796650000, "line_mean": 37.8901098901, "line_max": 102, "alpha_frac": 0.6374682114, "autogenerated": false, "ratio": 4.110336817653891, "config_test":...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django_excel_to_model.management.commands.import_excel_according_to_model import ExcelFileFromClassImporter from django_excel_to_model.tasks import import_excel from forms import ExcelImportTaskForm __author__ = 'weijia' @...
{ "repo_name": "weijia/django-excel-to-model", "path": "django_excel_to_model/views_import.py", "copies": "1", "size": "1623", "license": "bsd-3-clause", "hash": 2746033020566836000, "line_mean": 44.0833333333, "line_max": 116, "alpha_frac": 0.6333949476, "autogenerated": false, "ratio": 4.0272952...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import HttpResponse from comments.models import Comment from django_react import json_encoder import json # Create your views here. def index(request): return render(request, "comments2.html") def static(r...
{ "repo_name": "tekton/django_react", "path": "comments/views.py", "copies": "1", "size": "1054", "license": "mit", "hash": 8428942363805760000, "line_mean": 30, "line_max": 83, "alpha_frac": 0.6641366224, "autogenerated": false, "ratio": 3.672473867595819, "config_test": false, "has_no_keywor...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import HttpResponse from django.db.models import Q from register.models import AgencyList from register.models import Petitions from django.templatetags.static import static import json @csrf_exempt def getSigna...
{ "repo_name": "Nikolas1814/Code4Bulgaria", "path": "webServer/getSignals/views.py", "copies": "1", "size": "2967", "license": "mit", "hash": 743121065764624600, "line_mean": 36.1, "line_max": 116, "alpha_frac": 0.6511627907, "autogenerated": false, "ratio": 3.0244648318042815, "config_test": fa...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import HttpResponse from django.db.models import Q from register.models import Petitions from django.templatetags.static import static import json @csrf_exempt def getLastSignals(request): if request.method != 'P...
{ "repo_name": "Nikolas1814/Code4Bulgaria", "path": "webServer/getLastSignals/views.py", "copies": "1", "size": "2740", "license": "mit", "hash": -6996540505384746000, "line_mean": 34.5974025974, "line_max": 116, "alpha_frac": 0.6412408759, "autogenerated": false, "ratio": 3.00768386388584, "con...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseNotFound from django.core.files import File from urllib import quote import MySQLdb as mdb import time import json import redis import sys import re redisCli...
{ "repo_name": "ykim514/DashClient", "path": "WebServer/webapp/views.py", "copies": "1", "size": "4248", "license": "apache-2.0", "hash": 6351438256536799000, "line_mean": 32.4488188976, "line_max": 116, "alpha_frac": 0.6228813559, "autogenerated": false, "ratio": 3.681109185441941, "config_test...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render from django.http import JsonResponse, Http404 from api.models import Score def convert(score): return { 'player': score.player, 'computer': score.computer, 'name': score.name, 'timestamp': sco...
{ "repo_name": "thyagostall/pong-api", "path": "api/views.py", "copies": "1", "size": "1119", "license": "mit", "hash": 3244593118289615000, "line_mean": 25.6428571429, "line_max": 66, "alpha_frac": 0.655049151, "autogenerated": false, "ratio": 4.010752688172043, "config_test": false, "has_no_...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render_to_response from django.template import RequestContext from analysis.models import AboutDevice, Browser, Device, Os, PageAnalyzed, ElementAnalyzed from models import WebPage, Visit, Visitor, VisitAnalyzed, Location from django.http...
{ "repo_name": "sasasaftic/owatam", "path": "analysis/temp.py", "copies": "1", "size": "18057", "license": "mit", "hash": -7215908408485240000, "line_mean": 48.3360655738, "line_max": 160, "alpha_frac": 0.5638256632, "autogenerated": false, "ratio": 4.13298237582971, "config_test": false, "has...
from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from models import Node, Crash from hashlib import sha256 from core.log import * import core.utility as utility impor...
{ "repo_name": "ksmaheshkumar/PeachOrchard", "path": "server/server/views.py", "copies": "3", "size": "4625", "license": "mit", "hash": -8847731355198408000, "line_mean": 26.6946107784, "line_max": 90, "alpha_frac": 0.56, "autogenerated": false, "ratio": 4.314365671641791, "config_test": false, ...
from django.views.decorators.csrf import csrf_exempt from django.template import RequestContext, loader from django.http import HttpResponse, HttpResponseRedirect from django.conf import settings from django.shortcuts import render_to_response, get_object_or_404 from ldap_auth.toolbox import get_user from django.core.e...
{ "repo_name": "futurice/vpn-management-server", "path": "vpn/logs/views.py", "copies": "1", "size": "1060", "license": "bsd-3-clause", "hash": 7510659654455470000, "line_mean": 27.6486486486, "line_max": 68, "alpha_frac": 0.7132075472, "autogenerated": false, "ratio": 3.8827838827838828, "confi...
from django.views.decorators.csrf import csrf_exempt from django.template.loader import get_template from django.template import Context from django.http import StreamingHttpResponse from django.http import HttpResponseRedirect import datetime from django.db.models import Q from login.forms import LoginForm from djang...
{ "repo_name": "Nikolas1814/HackTues", "path": "webServer/login/views.py", "copies": "1", "size": "1108", "license": "mit", "hash": -9154035212243569000, "line_mean": 30.6857142857, "line_max": 80, "alpha_frac": 0.7608303249, "autogenerated": false, "ratio": 3.6567656765676566, "config_test": fa...
from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from django.shortcuts import render from django.http import HttpResponse, HttpRequest, JsonResponse from wsgiref.util import FileWrapper from io import StringIO from django.db import connection from api.models imp...
{ "repo_name": "kostya9/KPI.RelationalDatabases", "path": "Lab3/flights/api/views.py", "copies": "1", "size": "11004", "license": "mit", "hash": 2725735330554280000, "line_mean": 37.0795847751, "line_max": 179, "alpha_frac": 0.6142311887, "autogenerated": false, "ratio": 3.959697732997481, "conf...
from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from .models import UrlShrinked from .forms import UrlShrinkedForm from django.shortcuts import render, get_object_or_404,redirect from django.contrib.sites.shortcuts import get_current_site from django.http import JsonResponse,HttpR...
{ "repo_name": "Remeic/Squozy", "path": "redirector/views.py", "copies": "1", "size": "2951", "license": "mit", "hash": 5820938151816497000, "line_mean": 36.8333333333, "line_max": 104, "alpha_frac": 0.680447306, "autogenerated": false, "ratio": 3.929427430093209, "config_test": false, "has_no...
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_http_methods from django.conf import settings from django import http from django.contrib.auth.models import User from .mailgun import check_webhook_signature from .tasks import send_announcement from email.utils imp...
{ "repo_name": "p2pu/learning-circles", "path": "announce/views.py", "copies": "1", "size": "1876", "license": "mit", "hash": 6676187735937744000, "line_mean": 36.52, "line_max": 98, "alpha_frac": 0.7212153518, "autogenerated": false, "ratio": 3.820773930753564, "config_test": false, "has_no_k...
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from django.http import HttpResponseBadRequest, HttpResponseServerError, HttpResponse from .models import WebMentionResponse from .resolution import url_resolves, fetch_and_validate_source, SourceFetchError, Targ...
{ "repo_name": "easy-as-python/django-webmention", "path": "src/webmention/views.py", "copies": "1", "size": "1476", "license": "mit", "hash": 2066578856303944400, "line_mean": 41.1714285714, "line_max": 102, "alpha_frac": 0.7005420054, "autogenerated": false, "ratio": 4.65615141955836, "config_...
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from django.http import HttpResponse, Http404 import couchforms from couchforms.models import XFormInstance from couchforms.util import SubmissionPost @require_POST @csrf_exempt def post(request): """ XF...
{ "repo_name": "benrudolph/commcare-hq", "path": "corehq/ex-submodules/couchforms/views.py", "copies": "3", "size": "1628", "license": "bsd-3-clause", "hash": 7226219534232221000, "line_mean": 34.4130434783, "line_max": 83, "alpha_frac": 0.7321867322, "autogenerated": false, "ratio": 4.25065274151...
from django.views.decorators.csrf import csrf_exempt from rest_framework.exceptions import NotFound from rest_framework.response import Response from rest_framework import status from rest_framework.views import APIView from cognitive.settings import graph import cognitive.apps.atlas.query as query from .forms import ...
{ "repo_name": "rwblair/cogat", "path": "cognitive/apps/atlas/api_views.py", "copies": "1", "size": "13388", "license": "mit", "hash": -4635489307505932000, "line_mean": 33.4164524422, "line_max": 94, "alpha_frac": 0.6106961458, "autogenerated": false, "ratio": 3.611545724305368, "config_test": ...
from django.views.decorators.csrf import csrf_exempt import csv from django.core.exceptions import ValidationError from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.db.models import Q from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import redirect, get_ob...
{ "repo_name": "rtucker-mozilla/mozilla_inventory", "path": "systems/views.py", "copies": "1", "size": "40687", "license": "bsd-3-clause", "hash": -1488519995076608300, "line_mean": 34.1355785838, "line_max": 283, "alpha_frac": 0.6042224789, "autogenerated": false, "ratio": 3.780968311495214, "c...
from django.views.decorators.csrf import csrf_exempt import csv from django.core.exceptions import ValidationError from django.db import transaction, IntegrityError from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.db.models import Q from django.http import HttpResponse, HttpResponseRedir...
{ "repo_name": "rtucker-mozilla/inventory", "path": "systems/views.py", "copies": "2", "size": "39831", "license": "bsd-3-clause", "hash": 4898068551969977000, "line_mean": 34.2175066313, "line_max": 283, "alpha_frac": 0.6034746805, "autogenerated": false, "ratio": 3.722523364485981, "config_tes...
from django.views.decorators.csrf import csrf_exempt import dateutil.parser from django.shortcuts import render, get_object_or_404 from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.db import IntegrityError from django.http import JsonResponse from stocks.models import * fr...
{ "repo_name": "ddsnowboard/FantasyStocks", "path": "fantasyStocks/stocksApi/views.py", "copies": "1", "size": "16230", "license": "apache-2.0", "hash": 5407211789239073000, "line_mean": 31.987804878, "line_max": 122, "alpha_frac": 0.6458410351, "autogenerated": false, "ratio": 3.866126727012863, ...
from django.views.decorators.csrf import csrf_exempt import json from django.db import connection import sys from keyczar.keyczar import Encrypter, Crypter import logging from django.http import HttpResponse from django.shortcuts import render_to_response logger = logging.getLogger(__name__) @csrf_exempt def get_wifi...
{ "repo_name": "HungLV4/MyPublicWifi", "path": "wifisharing/views.py", "copies": "1", "size": "1305", "license": "apache-2.0", "hash": -5727919643859922000, "line_mean": 34.2702702703, "line_max": 246, "alpha_frac": 0.6996168582, "autogenerated": false, "ratio": 3.063380281690141, "config_test":...
from django.views.decorators.csrf import csrf_exempt try: from django.utils.functional import update_wrapper except ImportError: from functools import update_wrapper from django.utils.cache import patch_vary_headers from django.http import HttpResponse from django.contrib.auth.models import User from django.conf im...
{ "repo_name": "iamsteadman/bambu-api", "path": "bambu_api/helpers.py", "copies": "1", "size": "3723", "license": "apache-2.0", "hash": -1302697013971735600, "line_mean": 24.1554054054, "line_max": 103, "alpha_frac": 0.7155519742, "autogenerated": false, "ratio": 3.396897810218978, "config_test"...
from django.views.decorators.csrf import csrf_protect, ensure_csrf_cookie from django.views.decorators.cache import never_cache from django.views.decorators.debug import sensitive_variables from django.contrib.auth import authenticate, login, logout from django.core.exceptions import ValidationError from django.core.ca...
{ "repo_name": "tjanas94/library", "path": "backend/accounts/views.py", "copies": "1", "size": "7175", "license": "mit", "hash": 7776628457880548000, "line_mean": 27.588, "line_max": 78, "alpha_frac": 0.6328529453, "autogenerated": false, "ratio": 3.667008722421755, "config_test": false, "has_...
from django.views.decorators.csrf import ensure_csrf_cookie, csrf_exempt from django.views.generic.base import TemplateView from django.views.generic import View from django.contrib.auth import authenticate, login, logout from django.utils.decorators import method_decorator from django.shortcuts import render from djan...
{ "repo_name": "pstrinkle/drf-image-app", "path": "api/image_app/views/__init__.py", "copies": "1", "size": "3118", "license": "apache-2.0", "hash": -7037652879950193000, "line_mean": 35.2558139535, "line_max": 119, "alpha_frac": 0.7116741501, "autogenerated": false, "ratio": 4.075816993464052, ...
from django.views.decorators.csrf import ensure_csrf_cookie from django.utils.decorators import method_decorator from django.views.generic.base import TemplateView from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from .models import About, Contact f...
{ "repo_name": "TheBlackDude/mudu45", "path": "mudu/views.py", "copies": "1", "size": "1081", "license": "mit", "hash": -5187283452714990000, "line_mean": 32.8125, "line_max": 72, "alpha_frac": 0.7742830712, "autogenerated": false, "ratio": 3.6397306397306397, "config_test": false, "has_no_key...
from django.views.decorators.csrf import ensure_csrf_cookie from django.views.generic.base import TemplateView from django.utils.decorators import method_decorator from django.contrib.auth import authenticate, login, logout from rest_framework import generics, permissions, status, views from rest_framework.response im...
{ "repo_name": "ratnim/JRR-Prototyp1", "path": "apps/main/views.py", "copies": "1", "size": "5826", "license": "mit", "hash": -2610489018461023700, "line_mean": 29.9893617021, "line_max": 106, "alpha_frac": 0.6848609681, "autogenerated": false, "ratio": 4.128986534372785, "config_test": false, ...
from django.views.decorators.csrf import ensure_csrf_cookie from django.views.generic.base import TemplateView from django.utils.decorators import method_decorator from django.shortcuts import get_object_or_404 from rest_framework import viewsets, status from rest_framework.response import Response from rest_framework...
{ "repo_name": "andaviaco/storyclub", "path": "club/views.py", "copies": "1", "size": "4691", "license": "mit", "hash": -3426622300385901600, "line_mean": 31.5833333333, "line_max": 82, "alpha_frac": 0.6186314219, "autogenerated": false, "ratio": 4.284018264840182, "config_test": false, "has_n...
from django.views.decorators.csrf import ensure_csrf_cookie from django.views.generic.base import TemplateView from django.utils.decorators import method_decorator from google.appengine.api import users class IndexView(TemplateView): template_name = 'layout.html' @method_decorator(ensure_csrf_cookie) de...
{ "repo_name": "Sunnepah/iupds-appscale", "path": "iupds/views.py", "copies": "1", "size": "1265", "license": "bsd-3-clause", "hash": -6307445973696169000, "line_mean": 39.8064516129, "line_max": 93, "alpha_frac": 0.623715415, "autogenerated": false, "ratio": 3.8333333333333335, "config_test": f...
from django.views.decorators.csrf import ensure_csrf_cookie from django.http import HttpResponse from django.shortcuts import render, render_to_response from django.template import loader, RequestContext from utils.passport import passport_required def index(request): template = loader.get_template('websi...
{ "repo_name": "joodo/portnoy", "path": "website/views.py", "copies": "2", "size": "1803", "license": "unlicense", "hash": 1976784237208761900, "line_mean": 28.05, "line_max": 59, "alpha_frac": 0.5618413755, "autogenerated": false, "ratio": 3.4874274661508706, "config_test": false, "has_no_key...
from django.views.decorators.debug import sensitive_post_parameters from corehq.apps.style.decorators import check_preview_bootstrap3, use_select2 from dimagi.utils.couch.resource_conflict import retry_resource from django.contrib import messages from django.contrib.auth.forms import PasswordChangeForm from django.view...
{ "repo_name": "puttarajubr/commcare-hq", "path": "corehq/apps/settings/views.py", "copies": "1", "size": "8666", "license": "bsd-3-clause", "hash": 2525566169135892000, "line_mean": 34.0850202429, "line_max": 112, "alpha_frac": 0.6590122317, "autogenerated": false, "ratio": 3.891333632689717, "...
from django.views.decorators.debug import sensitive_post_parameters from corehq.apps.style.decorators import preview_boostrap3 from dimagi.utils.couch.resource_conflict import retry_resource from django.contrib import messages from django.contrib.auth.forms import PasswordChangeForm from django.views.decorators.http im...
{ "repo_name": "SEL-Columbia/commcare-hq", "path": "corehq/apps/settings/views.py", "copies": "1", "size": "7545", "license": "bsd-3-clause", "hash": 8357427328022292000, "line_mean": 34.2570093458, "line_max": 112, "alpha_frac": 0.6679920477, "autogenerated": false, "ratio": 3.9627100840336134, ...
from django.views.decorators.debug import sensitive_post_parameters, sensitive_variables from django.shortcuts import render_to_response, get_object_or_404 from django.template import Context, RequestContext, loader from django.core.context_processors import csrf from django.http import HttpResponseRedirect, Http404 fr...
{ "repo_name": "FedeRez/webldap", "path": "app/main/views.py", "copies": "1", "size": "21537", "license": "mit", "hash": -5238824352790305000, "line_mean": 35.1750841751, "line_max": 92, "alpha_frac": 0.5993112435, "autogenerated": false, "ratio": 3.660647359454855, "config_test": false, "has_...
from django.views.decorators.http import require_GET from jsonview.decorators import json_view from jsonview.exceptions import BadRequest from api.models import Place from django.utils import timezone import requests import os BACKEND_API_URL = 'http://{0}:80/places'.format(os.getenv('HOST_IP')) #BACKEND_API_URL = 'h...
{ "repo_name": "bpanahij/docker-workshop", "path": "frontend/api/views.py", "copies": "2", "size": "1357", "license": "mit", "hash": -2291784682329885200, "line_mean": 30.5581395349, "line_max": 91, "alpha_frac": 0.7126013265, "autogenerated": false, "ratio": 3.5899470899470898, "config_test": f...
from django.views.decorators.http import require_GET from app.constants.index import INDEX_DIR, ALL_TYPES from app.errors import PersOARequiredFieldError, PersOANotFound, PersOALeftoverField from app.models.choice import BasicChoice, LinearChoice, SubChoice from app.models.group import TraitGroup from app.models.trait...
{ "repo_name": "Saevon/PersOA", "path": "app/views/find.py", "copies": "1", "size": "3684", "license": "mit", "hash": 6280717523758407000, "line_mean": 31.6017699115, "line_max": 85, "alpha_frac": 0.5863192182, "autogenerated": false, "ratio": 3.7901234567901234, "config_test": false, "has_no_...
from django.views.decorators.http import require_GET from app.constants.index import INDEX_DIR from app.errors import PersOARequiredFieldError, PersOANotFound, PersOALeftoverField from app.models.trait import BasicTrait, LinearTrait from app.views.field import Field from app.views.whitelist import Whitelist from app.v...
{ "repo_name": "Saevon/PersOA", "path": "app/views/generate.py", "copies": "1", "size": "5211", "license": "mit", "hash": 3290535603334624000, "line_mean": 28.4406779661, "line_max": 107, "alpha_frac": 0.5845327192, "autogenerated": false, "ratio": 3.837260677466863, "config_test": false, "has...
from django.views.decorators.http import require_GET, require_POST from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator class SiteMixin: section = None sidebar = False def get_context_data(self, *args, **kwargs): context = super().get_cont...
{ "repo_name": "Alkxzv/simple-time-tracker", "path": "web/common/views.py", "copies": "1", "size": "1621", "license": "mit", "hash": -7724372915109098000, "line_mean": 29.5849056604, "line_max": 73, "alpha_frac": 0.6465144972, "autogenerated": false, "ratio": 4.156410256410257, "config_test": fa...
from django.views.decorators.http import require_GET, require_POST from django.template import RequestContext from django.shortcuts import redirect, get_object_or_404, render_to_response from django.conf import settings from django import forms from django.core.exceptions import ValidationError from django.views.decora...
{ "repo_name": "unicefuganda/edtrac", "path": "edtrac_project/rapidsms_xforms_src/rapidsms_xforms/views.py", "copies": "1", "size": "22988", "license": "bsd-3-clause", "hash": 1348923487103109600, "line_mean": 37.8310810811, "line_max": 166, "alpha_frac": 0.6047938055, "autogenerated": false, "rat...
from django.views.decorators.http import require_http_methods from django.contrib.auth.decorators import login_required from django.http import HttpResponse import json from flash import analytics import logging log = logging.getLogger(__name__) @login_required @require_http_methods(["POST"]) def track(request): ...
{ "repo_name": "Harvard-ATG/HarvardCards", "path": "flash/api/analytics.py", "copies": "1", "size": "1300", "license": "bsd-3-clause", "hash": -280537973988947840, "line_mean": 27.8888888889, "line_max": 93, "alpha_frac": 0.5823076923, "autogenerated": false, "ratio": 4.498269896193771, "config_...
from django.views.decorators.http import require_http_methods from django.core.exceptions import SuspiciousOperation, PermissionDenied from django.http import HttpResponse #@require_http_methods(['POST']) # TODO import json from .models import OpenHardwareLike, OpenHardware import logging logger = logging.getLogg...
{ "repo_name": "gipi/OHR", "path": "ohr/oh/views.py", "copies": "1", "size": "1475", "license": "bsd-3-clause", "hash": -4772240875605806000, "line_mean": 27.9411764706, "line_max": 122, "alpha_frac": 0.6691525424, "autogenerated": false, "ratio": 3.8815789473684212, "config_test": false, "has...
from django.views.decorators.http import require_http_methods from django.http import HttpResponse from django.shortcuts import redirect from flash.models import Collection, Deck, Users_Collections from flash.forms import DeckForm from flash.decorators import check_role from flash import queries import json @require...
{ "repo_name": "Harvard-ATG/HarvardCards", "path": "flash/api/deck.py", "copies": "1", "size": "2006", "license": "bsd-3-clause", "hash": 4975022112816009000, "line_mean": 40.7916666667, "line_max": 159, "alpha_frac": 0.6914257228, "autogenerated": false, "ratio": 3.519298245614035, "config_test...
from django.views.decorators.http import require_http_methods from django.http import HttpResponse from flash.models import Collection, Deck, Card, Cards_Fields, Field, Users_Collections from flash.forms import CardEditForm from flash import services, queries, utils, analytics from flash.decorators import check_role ...
{ "repo_name": "Harvard-ATG/HarvardCards", "path": "flash/api/card.py", "copies": "1", "size": "3208", "license": "bsd-3-clause", "hash": 5687462328420490000, "line_mean": 37.1904761905, "line_max": 159, "alpha_frac": 0.6387157107, "autogenerated": false, "ratio": 3.3983050847457625, "config_tes...
from django.views.decorators.http import require_http_methods from django.shortcuts import render from django.http import HttpResponse, Http404 from users.models import User from coffees.models import Coffee import datetime @require_http_methods(['GET']) def index(request): return render(request, 'home/index.html...
{ "repo_name": "chrisenytc/coffy", "path": "home/views.py", "copies": "1", "size": "1629", "license": "mit", "hash": -3096516324438839300, "line_mean": 37.7857142857, "line_max": 148, "alpha_frac": 0.6838551258, "autogenerated": false, "ratio": 3.503225806451613, "config_test": false, "has_no_...
from django.views.decorators.http import require_http_methods from django.shortcuts import render, redirect, get_object_or_404 from .forms import NewGameForm, PlayForm from .models import Game @require_http_methods(["GET", "POST"]) def index(request): if request.method == "POST": form = NewGameForm(reque...
{ "repo_name": "paulcwatts/django-tictactoe", "path": "game/views.py", "copies": "2", "size": "1607", "license": "bsd-3-clause", "hash": -3032373120532196000, "line_mean": 33.1914893617, "line_max": 77, "alpha_frac": 0.5961418793, "autogenerated": false, "ratio": 3.891041162227603, "config_test"...
from django.views.decorators.http import require_http_methods from django.views.decorators.csrf import csrf_exempt from users.decorators import require_access_token from django.http import JsonResponse from users.models import User from coffees.models import Coffee import datetime @require_http_methods(['GET']) def i...
{ "repo_name": "chrisenytc/coffy", "path": "coffees/views.py", "copies": "1", "size": "1543", "license": "mit", "hash": -1154760520826437600, "line_mean": 35.7380952381, "line_max": 148, "alpha_frac": 0.6824368114, "autogenerated": false, "ratio": 3.613583138173302, "config_test": false, "has_...
from django.views.decorators.http import require_http_methods from django.views.decorators.csrf import csrf_exempt from users.models import User from django.http import JsonResponse from users.decorators import require_access_token @require_http_methods(['GET']) @require_access_token def index(request): # Show cur...
{ "repo_name": "chrisenytc/coffy", "path": "users/views.py", "copies": "1", "size": "5156", "license": "mit", "hash": -5745793848344157000, "line_mean": 36.0935251799, "line_max": 90, "alpha_frac": 0.6093871218, "autogenerated": false, "ratio": 4.2089795918367345, "config_test": false, "has_no...
from django.views.decorators.http import require_POST from django.contrib.contenttypes.models import ContentType from django.shortcuts import get_object_or_404 from django.views.generic.list_detail import object_list from django.core import serializers from django.utils import simplejson from django.http import HttpRes...
{ "repo_name": "theatlantic/django-taggit2", "path": "taggit/views.py", "copies": "1", "size": "2037", "license": "bsd-3-clause", "hash": 5031348022724911000, "line_mean": 36.7222222222, "line_max": 79, "alpha_frac": 0.7108492882, "autogenerated": false, "ratio": 3.7862453531598512, "config_test...
from django.views.decorators.http import require_POST from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.core.mail import EmailMultiAlternatives from eventsfinder.tools.toolbox import send_async_mail import json from eventsfinder.models import Event, Attendee, ...
{ "repo_name": "axsauze/eventsfinder", "path": "eventsfinder/ajax.py", "copies": "1", "size": "4008", "license": "bsd-3-clause", "hash": -7226033986784118000, "line_mean": 30.5590551181, "line_max": 343, "alpha_frac": 0.6102794411, "autogenerated": false, "ratio": 3.813510941960038, "config_test...
from django.views.decorators.http import require_POST from django.http.response import HttpResponse from custom.m4change.models import McctStatus @require_POST def update_service_status(request, domain): forms = request.POST for lists in forms.lists(): for list in lists: if list is None o...
{ "repo_name": "benrudolph/commcare-hq", "path": "custom/m4change/views.py", "copies": "4", "size": "1035", "license": "bsd-3-clause", "hash": 5092099632946222000, "line_mean": 40.4, "line_max": 95, "alpha_frac": 0.6057971014, "autogenerated": false, "ratio": 3.996138996138996, "config_test": fa...
from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from django import http from subhub import models def _get_verify(verifies): for v in verifies: if v in ('sync', 'async'): return v raise KeyError('hub.verify is missing or not recogn...
{ "repo_name": "credis/subhub", "path": "subhub/views.py", "copies": "1", "size": "1680", "license": "bsd-3-clause", "hash": -5923560113043792000, "line_mean": 34, "line_max": 87, "alpha_frac": 0.6333333333, "autogenerated": false, "ratio": 4, "config_test": false, "has_no_keywords": false, ...
from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from heltour import settings from django.http.response import HttpResponse, JsonResponse import json import logging from pyfcm import FCMNotification from heltour.tournament.models import FcmSub import requests l...
{ "repo_name": "cyanfish/heltour", "path": "heltour/tournament/android_app.py", "copies": "1", "size": "3626", "license": "mit", "hash": -7114299123996983000, "line_mean": 33.8653846154, "line_max": 97, "alpha_frac": 0.6351351351, "autogenerated": false, "ratio": 3.5, "config_test": false, "ha...
from django.views.decorators.http import require_POST, require_GET from jet.forms import AddBookmarkForm, RemoveBookmarkForm, ToggleApplicationPinForm, ModelLookupForm from jet.models import Bookmark from jet.utils import JsonResponse @require_POST def add_bookmark_view(request): result = {'error': False} for...
{ "repo_name": "huanpc/IoT-1", "path": "gui/controller/.venv/lib/python3.5/site-packages/jet/views.py", "copies": "5", "size": "1698", "license": "mit", "hash": 8708574097613991000, "line_mean": 23.2571428571, "line_max": 100, "alpha_frac": 0.6319199058, "autogenerated": false, "ratio": 3.92147806...
from django_viewset import URLView from django_backend.forms import BaseBackendForm from .. import BaseModelBackend from .views import * class ModelBackend(BaseModelBackend): ''' Base backend class for all backends in that are used with DjangoMC. There are basically four different subclasses if DjangoMC...
{ "repo_name": "team23/django_backend", "path": "django_backend/backend/base/backends.py", "copies": "1", "size": "1262", "license": "bsd-3-clause", "hash": -7683379044152178000, "line_mean": 35.0571428571, "line_max": 78, "alpha_frac": 0.7179080824, "autogenerated": false, "ratio": 4.366782006920...
from django.views.generic.base import ContextMixin from django.template.loader import render_to_string from is_core.auth.views import FieldPermissionViewMixin from is_core.auth.permissions import AllowAny, FieldsSetPermission from .permissions import RelatedCoreAllowed class InlineView(ContextMixin): template_...
{ "repo_name": "matllubos/django-is-core", "path": "is_core/generic_views/inlines/__init__.py", "copies": "1", "size": "1835", "license": "bsd-3-clause", "hash": -6342829952808488000, "line_mean": 30.6379310345, "line_max": 120, "alpha_frac": 0.6915531335, "autogenerated": false, "ratio": 4.179954...
from django.views.generic.base import ContextMixin from django.views.generic import DetailView, ListView from taggit.models import TaggedItem from .models import Blog, BlogAd class BlogBaseView(ContextMixin): def get_context_data(self, **kwargs): context = super(BlogBaseView, self).get_context_data(**k...
{ "repo_name": "jcalazan/glucose-tracker", "path": "glucosetracker/blogs/views.py", "copies": "1", "size": "1848", "license": "mit", "hash": -8420323637755284000, "line_mean": 28.8064516129, "line_max": 78, "alpha_frac": 0.6374458874, "autogenerated": false, "ratio": 3.8661087866108788, "config_...
from django.views.generic.base import ContextMixin from .models import Comments from .forms import CommentsForm class CommentItem: """ The class is intended for storing comments and indicators of the previous, next level of nesting. """ def __init__(self, comment, previous_comment_level): sel...
{ "repo_name": "rudikovrf/django_blog", "path": "comment/CommentMixin.py", "copies": "1", "size": "2658", "license": "mit", "hash": -1519442809005822700, "line_mean": 32.6455696203, "line_max": 101, "alpha_frac": 0.5583145222, "autogenerated": false, "ratio": 4.3431372549019605, "config_test": f...
from django.views.generic.base import ContextMixin class PaginationPages(ContextMixin): """ Class is for extending the context with pages_list and url_without_page for pagination. """ def get_context_data(self, **kwargs): """ Function extends the context with pages_list and url_withou...
{ "repo_name": "rudikovrf/django_blog", "path": "generic/pagination.py", "copies": "1", "size": "1556", "license": "mit", "hash": 5706037594624897000, "line_mean": 33.5777777778, "line_max": 91, "alpha_frac": 0.5417737789, "autogenerated": false, "ratio": 4.395480225988701, "config_test": false,...
from django.views.generic.base import ContextMixin, TemplateResponseMixin from django.views.generic.edit import ProcessFormView from django.http import HttpResponseForbidden from django.shortcuts import HttpResponseRedirect class MultiFormMixin(ContextMixin): form_classes = {} prefixes = {} success_urls ...
{ "repo_name": "piemar1/Schedule_django", "path": "user_account/multiform.py", "copies": "1", "size": "4704", "license": "mit", "hash": 1199546318454609400, "line_mean": 33.5882352941, "line_max": 77, "alpha_frac": 0.6264880952, "autogenerated": false, "ratio": 3.8525798525798525, "config_test":...
from django.views.generic.base import ContextMixin, TemplateResponseMixin from django.views.generic.edit import ProcessFormView from django.http.response import HttpResponseRedirect, HttpResponseForbidden class MultiFormMixin(ContextMixin): form_classes = {} prefixes = {} success_urls = {} grouped_form...
{ "repo_name": "Ignoramuss/LDERP", "path": "LDERPdjango/login/multiforms.py", "copies": "1", "size": "4620", "license": "apache-2.0", "hash": 8452455572101968000, "line_mean": 35.1015625, "line_max": 107, "alpha_frac": 0.6341991342, "autogenerated": false, "ratio": 3.8213399503722085, "config_te...
from django.views.generic.base import RedirectView from django.shortcuts import get_object_or_404 from django.conf import settings from django.contrib import messages from django.contrib.auth import load_backend, login from django.core.exceptions import ImproperlyConfigured from django.shortcuts import redirect from dj...
{ "repo_name": "nachoaIvarez/django-impersonation", "path": "impersonation/views.py", "copies": "1", "size": "3321", "license": "bsd-3-clause", "hash": 8500083224206280000, "line_mean": 33.2371134021, "line_max": 78, "alpha_frac": 0.5561577838, "autogenerated": false, "ratio": 4.561813186813187, ...
from django.views.generic.base import TemplateResponseMixin from django.template.response import TemplateResponse class ResponseGenerator(object): serializer_class = None serializer_kwargs = {} def __init__(self, request): self.request = request def get_serialized_data(self, obj): se...
{ "repo_name": "changer/django-rts", "path": "rts/response_generators.py", "copies": "1", "size": "1298", "license": "bsd-3-clause", "hash": -2251106716730321000, "line_mean": 28.5, "line_max": 75, "alpha_frac": 0.6409861325, "autogenerated": false, "ratio": 4.160256410256411, "config_test": fal...
from django.views.generic.base import TemplateResponseMixin from enhanced_cbv.response import PDFTemplateResponse, CSVTemplateResponse class PDFTemplateResponseMixin(TemplateResponseMixin): """ Extends the TemplateResponseMixin with a filename for render_to_response """ response_class = PDFTemplateRe...
{ "repo_name": "rasca/django-enhanced-cbv", "path": "enhanced_cbv/views/base.py", "copies": "2", "size": "2303", "license": "bsd-3-clause", "hash": -7030104811843800000, "line_mean": 32.3768115942, "line_max": 88, "alpha_frac": 0.6396005211, "autogenerated": false, "ratio": 4.719262295081967, "c...
from django.views.generic.base import TemplateResponseMixin, View from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect, Http404 from django.forms.formsets import formset_factory from django.forms.models import modelformset_factory from django.forms import models as model_...
{ "repo_name": "penta-srl/django-extra-views", "path": "extra_views/multi.py", "copies": "1", "size": "6449", "license": "mit", "hash": 2775461527312975000, "line_mean": 33.8594594595, "line_max": 126, "alpha_frac": 0.5924949605, "autogenerated": false, "ratio": 4.475364330326163, "config_test":...
from django.views.generic.base import TemplateResponseMixin, View from django.http import HttpResponseRedirect from django.forms.formsets import formset_factory from django.forms.models import modelformset_factory, inlineformset_factory from django.views.generic.detail import SingleObjectMixin, SingleObjectTemplateResp...
{ "repo_name": "penta-srl/django-extra-views", "path": "extra_views/formsets.py", "copies": "1", "size": "11554", "license": "mit", "hash": 1940783944383423500, "line_mean": 31.3641456583, "line_max": 102, "alpha_frac": 0.6288731175, "autogenerated": false, "ratio": 4.433614735226401, "config_te...
from django.views.generic.base import TemplateView from core.generic_views import LoginMixin, FilteredListView from search_blob.field_filters import SearchLogFilter from search_blob.tables import SearchLogTable from www.models import SearchLog from .models import Blob from .forms import SearchForm class SearchView(L...
{ "repo_name": "WebArchivCZ/Seeder", "path": "Seeder/search_blob/views.py", "copies": "1", "size": "1052", "license": "mit", "hash": -4405739920072869000, "line_mean": 25.3, "line_max": 59, "alpha_frac": 0.6625475285, "autogenerated": false, "ratio": 4.061776061776062, "config_test": false, "h...
from django.views.generic.base import TemplateView from django.conf import settings from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse import praw import json class IndexView(TemplateView): template_name = 'index.html' def init_praw(access_credentials=None): ...
{ "repo_name": "eleweek/myflair", "path": "myflair/views.py", "copies": "1", "size": "2429", "license": "mit", "hash": -5849072801521069000, "line_mean": 32.2739726027, "line_max": 139, "alpha_frac": 0.7015232606, "autogenerated": false, "ratio": 3.6253731343283584, "config_test": false, "has_...
from django.views.generic.base import TemplateView from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import get_object_or_404 from django.shortcuts import render from molo.core.models import ArticlePage from wagtail.wagtailsearch.models imp...
{ "repo_name": "praekelt/molo-ndoh-yep", "path": "ndohyep/views.py", "copies": "1", "size": "2064", "license": "bsd-2-clause", "hash": 2698085461805635000, "line_mean": 29.8059701493, "line_max": 72, "alpha_frac": 0.6671511628, "autogenerated": false, "ratio": 3.8151571164510165, "config_test": ...
from django.views.generic.base import TemplateView from django.conf.urls import patterns, url, include from django.conf import settings from django.contrib.auth import views as auth_views from registration import views as reg_views from mp_profile.views import * try: use_openid = settings.OPENID_ENABLED except: ...
{ "repo_name": "Ecotrust/PEW-EFH", "path": "mp/mp_profile/urls.py", "copies": "1", "size": "2176", "license": "apache-2.0", "hash": -5179806907855314000, "line_mean": 46.3043478261, "line_max": 113, "alpha_frac": 0.6424632353, "autogenerated": false, "ratio": 3.8513274336283185, "config_test": f...