text
stringlengths
0
1.05M
meta
dict
from django.shortcuts import render, render_to_response, redirect from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.core.context_processors import csrf from django.core.exceptions import ObjectDoesNotExist, ValidationError import datetime, logging from machine.mo...
{ "repo_name": "xnnyygn/vmm", "path": "application/views.py", "copies": "1", "size": "3048", "license": "apache-2.0", "hash": 2408853456840916000, "line_mean": 39.1052631579, "line_max": 96, "alpha_frac": 0.6856955381, "autogenerated": false, "ratio": 4.096774193548387, "config_test": false, "...
from django.shortcuts import render, render_to_response, redirect from django.http import HttpResponse from django.core.context_processors import csrf from models import Kullanici, Twit, Takip, DM # Create your views here. def index(request): if 'is_authenticated' in request.session: return render_to_response("inde...
{ "repo_name": "ufukhurriyetoglu/twitter-clone", "path": "twitter/views.py", "copies": "1", "size": "1099", "license": "apache-2.0", "hash": 1188132568071217000, "line_mean": 27.9210526316, "line_max": 81, "alpha_frac": 0.7179253867, "autogenerated": false, "ratio": 3.14, "config_test": false, ...
from django.shortcuts import render, render_to_response, redirect from django.http import HttpResponse from home.models import User, user_exists, Product, Coupon from django.template import RequestContext, loader from home.custom_shortcuts import render_with_no_context, render_with_context from home.decorators import u...
{ "repo_name": "himanshuo/cs-4753-project", "path": "shopsmart/home/views.py", "copies": "1", "size": "7570", "license": "mit", "hash": 1655746821669162200, "line_mean": 25.74204947, "line_max": 107, "alpha_frac": 0.5880021142, "autogenerated": false, "ratio": 3.4446973145197997, "config_test": ...
from django.shortcuts import render, render_to_response, redirect from django.http import HttpResponse from Incubator.models import Hatching, HatchingForm from django.forms.models import modelformset_factory import urllib2, urllib #import datetime import json from data_utils import * import pytz import cv2 import time ...
{ "repo_name": "gmartinvela/Incubator", "path": "Incubator/views.py", "copies": "1", "size": "12357", "license": "mit", "hash": -7575905744240253000, "line_mean": 38.9935275081, "line_max": 169, "alpha_frac": 0.6915918103, "autogenerated": false, "ratio": 2.6962688195505127, "config_test": false...
from django.shortcuts import render, render_to_response, redirect from django.http import HttpResponseRedirect, HttpResponseNotAllowed from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.template.context_processors import csrf from ceamon.models import sapnod...
{ "repo_name": "limbail/ceamon", "path": "pandorabox/main/views.py", "copies": "1", "size": "1436", "license": "mit", "hash": -3847944687818468400, "line_mean": 30.9111111111, "line_max": 90, "alpha_frac": 0.647632312, "autogenerated": false, "ratio": 4.16231884057971, "config_test": false, "h...
from django.shortcuts import render, render_to_response, redirect from django.http import * from django.template import RequestContext from django.contrib.auth import authenticate, login, logout from django.shortcuts import render from django.contrib.auth import authenticate, login, logout from django.contrib.auth.deco...
{ "repo_name": "jumbocodespring2017/bostonathleticsassociation", "path": "back-end/interface/views.py", "copies": "1", "size": "3227", "license": "mit", "hash": 8496244341810458000, "line_mean": 34.8555555556, "line_max": 87, "alpha_frac": 0.6829872947, "autogenerated": false, "ratio": 4.043859649...
from django.shortcuts import render, render_to_response, redirect from django.template.context import RequestContext from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.urlresolvers import reverse, reverse_lazy from d...
{ "repo_name": "acs-um/deptos", "path": "deptos/departamentos/views.py", "copies": "1", "size": "6477", "license": "apache-2.0", "hash": -3283150225938318300, "line_mean": 41.2352941176, "line_max": 225, "alpha_frac": 0.6904982977, "autogenerated": false, "ratio": 3.245605223505776, "config_test...
from django.shortcuts import render,render_to_response,redirect from django.template import RequestContext from django.db import IntegrityError from main.models import Link,Tag from django.contrib import messages # Create your views here. def index(request): #Request the context of the request. #the context c...
{ "repo_name": "varsis/pylab6", "path": "bookmarks/main/views.py", "copies": "1", "size": "1939", "license": "apache-2.0", "hash": 3638827317421960700, "line_mean": 27.5147058824, "line_max": 102, "alpha_frac": 0.6121712223, "autogenerated": false, "ratio": 3.965235173824131, "config_test": fals...
from django.shortcuts import render, render_to_response, redirect from django.template import RequestContext from django.db.models import Q from django.utils import timezone from cir.models import * from cir.phase_control import PHASE_CONTROL from cir.settings import DISPATCHER_URL VISITOR_ROLE = 'visitor' def home(...
{ "repo_name": "xsunfeng/cir", "path": "cir/forum_views.py", "copies": "1", "size": "11683", "license": "mit", "hash": 2618207256681982000, "line_mean": 36.8122977346, "line_max": 151, "alpha_frac": 0.5997603355, "autogenerated": false, "ratio": 3.6372976338729766, "config_test": false, "has_n...
from django.shortcuts import render,render_to_response,redirect from django.template import RequestContext from django.views.decorators.csrf import csrf_exempt from .models import Newsletter from django.contrib.auth import authenticate, login , logout from rest_framework import status from rest_framework.views import A...
{ "repo_name": "rajexp/stepMuzic", "path": "steps/views.py", "copies": "1", "size": "3639", "license": "unlicense", "hash": -2812969143777457700, "line_mean": 38.5543478261, "line_max": 113, "alpha_frac": 0.7669689475, "autogenerated": false, "ratio": 3.6172962226640157, "config_test": false, ...
from django.shortcuts import render, render_to_response, redirect from django.template import RequestContext from django.views.generic import View, ListView, DetailView from main.models import Paste, Op from functions import get_values import datetime import json import re import requests class PasteView(View): ...
{ "repo_name": "all-out/lootparser", "path": "main/views.py", "copies": "1", "size": "3958", "license": "mit", "hash": -6567598566654072000, "line_mean": 36.3396226415, "line_max": 78, "alpha_frac": 0.602829712, "autogenerated": false, "ratio": 4.2604951560818085, "config_test": false, "has_no...
from django.shortcuts import render, render_to_response, redirect from django.template.loader import render_to_string from django.http import HttpResponseRedirect, HttpResponse from django.views.decorators.csrf import csrf_protect from django.contrib.auth.decorators import login_required from django.conf import setting...
{ "repo_name": "fenglb/mysite", "path": "accounts/views.py", "copies": "1", "size": "20487", "license": "cc0-1.0", "hash": -9194378083727970000, "line_mean": 40.5886075949, "line_max": 152, "alpha_frac": 0.5992492264, "autogenerated": false, "ratio": 3.6826078834298523, "config_test": false, "...
from django.shortcuts import render, render_to_response, redirect from django.utils import timezone from .models import Noticia from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import login, authenticate, logout from django.contrib....
{ "repo_name": "MatiiBasualdo/noticampus", "path": "noticampus/views.py", "copies": "1", "size": "4007", "license": "apache-2.0", "hash": -1327071692030582800, "line_mean": 36.4485981308, "line_max": 90, "alpha_frac": 0.6658347891, "autogenerated": false, "ratio": 3.5586145648312613, "config_tes...
from django.shortcuts import render, render_to_response, redirect from django.views.generic.base import View from decision_engine.settings import DEBUG from venue.models import Event from decision.models import Decision, DecisionAnswers from guest.models import Guest, GuestAnswers from django.http import HttpResponse i...
{ "repo_name": "civiclee/Hack4Cause2017", "path": "src/askeugene/guest/views.py", "copies": "1", "size": "4196", "license": "mit", "hash": 5132310873609110000, "line_mean": 36.1415929204, "line_max": 98, "alpha_frac": 0.6341754051, "autogenerated": false, "ratio": 3.8672811059907835, "config_tes...
from django.shortcuts import render, render_to_response, redirect from django.views.generic import ListView, DetailView from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.views.generic.edit import CreateView, ModelFormMixin, ProcessFormView from django.contrib.auth.dec...
{ "repo_name": "Kuzenkov/SimpleAnalogueStackOverflow", "path": "questions/views.py", "copies": "1", "size": "3073", "license": "mit", "hash": -8485857683294354000, "line_mean": 35.1529411765, "line_max": 105, "alpha_frac": 0.6921575008, "autogenerated": false, "ratio": 4.147098515519568, "config...
from django.shortcuts import render, render_to_response, redirect from models import * from common.util import post_request_to_json from author.remote import send_remote_friend_request def friends(request): me = Author.objects.get(user=request.user) authors = Author.objects.all() friends = me.get_friends()...
{ "repo_name": "CMPUT410W15/cmput410-project", "path": "author/views.py", "copies": "1", "size": "1837", "license": "apache-2.0", "hash": -1423265176365601500, "line_mean": 28.6290322581, "line_max": 77, "alpha_frac": 0.6412629287, "autogenerated": false, "ratio": 3.587890625, "config_test": fal...
from django.shortcuts import render,render_to_response, redirect import datetime # Create your views here. from django.contrib.auth.models import User, Group from rest_framework import viewsets from radiator.serializers import UserSerializer, GroupSerializer, AlarmSerializer from radiator.models import Alarm from djan...
{ "repo_name": "RPiIR/django-inforad", "path": "radiator/views.py", "copies": "1", "size": "3872", "license": "apache-2.0", "hash": -342707759356785400, "line_mean": 29.7301587302, "line_max": 128, "alpha_frac": 0.6699380165, "autogenerated": false, "ratio": 4.158968850698174, "config_test": tru...
from django.shortcuts import render , render_to_response, RequestContext, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse , Http404 from django.core.urlresolvers import reverse from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required fro...
{ "repo_name": "28harishkumar/django-diary", "path": "diary/views.py", "copies": "1", "size": "7142", "license": "apache-2.0", "hash": -2428571016099312000, "line_mean": 34.0147058824, "line_max": 114, "alpha_frac": 0.5376645197, "autogenerated": false, "ratio": 4.164431486880466, "config_test":...
from django.shortcuts import render , render_to_response, RequestContext, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse , Http404 from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
{ "repo_name": "28harishkumar/Social-website-django", "path": "post/views.py", "copies": "1", "size": "2048", "license": "mit", "hash": 1124290902216911700, "line_mean": 32.5901639344, "line_max": 91, "alpha_frac": 0.6245117188, "autogenerated": false, "ratio": 4.471615720524017, "config_test": ...
from django.shortcuts import render, render_to_response, RequestContext, HttpResponseRedirect from django.contrib import messages # How to log a user in (this will be in views.py) # Create your views here. # what our website is going to look like (what should be seen) from .forms import SignUpForm # this is the ho...
{ "repo_name": "vdmann/cse-360-image-hosting-website", "path": "src/signups/views.py", "copies": "1", "size": "1412", "license": "mit", "hash": 8663873359710364000, "line_mean": 31.1136363636, "line_max": 93, "alpha_frac": 0.6281869688, "autogenerated": false, "ratio": 4.629508196721312, "config...
from django.shortcuts import render,render_to_response,RequestContext,HttpResponseRedirect from django.core.context_processors import csrf from django.template import Context, RequestContext from models import * import random import string from random import randint import os from django.core import mail from django.h...
{ "repo_name": "AravindGajelli90/Ems_trainingApp", "path": "employeeapp/views.py", "copies": "1", "size": "19832", "license": "mit", "hash": 3616656851070133000, "line_mean": 37.8101761252, "line_max": 372, "alpha_frac": 0.7473275514, "autogenerated": false, "ratio": 3.1330173775671404, "config_...
from django.shortcuts import render, render_to_response, RequestContext, HttpResponseRedirect from django.contrib import messages # Create your views here. from .forms import UserForm from .forms import LoginForm from .forms import PictureForm from .forms import SettingsForm #need settings form from .models import U...
{ "repo_name": "sstuart6/cse360_project", "path": "src/signups/views.py", "copies": "2", "size": "4773", "license": "mit", "hash": 4753450520380805000, "line_mean": 36, "line_max": 104, "alpha_frac": 0.6040226273, "autogenerated": false, "ratio": 4.54138915318744, "config_test": false, "has_no...
from django.shortcuts import render, render_to_response, RequestContext from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from fox.forms import RegistrationForm, LoginForm, ChangeIPForm from fox.models import Fox from djang...
{ "repo_name": "TechnicalFox/Fox-Latch", "path": "site/fox/views.py", "copies": "1", "size": "3564", "license": "mit", "hash": 4482843574147417600, "line_mean": 39.9655172414, "line_max": 126, "alpha_frac": 0.6394500561, "autogenerated": false, "ratio": 4.149010477299185, "config_test": false, ...
from django.shortcuts import render, render_to_response, RequestContext from django.db.models import Q from models import Resume, ResumeType, Objective, ContactInfo, Employer, Experience, Skill def resume(request): request_is_post = 0 resume_types = ResumeType.objects.all() for resume_type in resume_types:...
{ "repo_name": "thedanotto/thedanotto", "path": "resume/views.py", "copies": "1", "size": "5115", "license": "apache-2.0", "hash": -7894186959304741000, "line_mean": 39.928, "line_max": 243, "alpha_frac": 0.6121212121, "autogenerated": false, "ratio": 3.525155065472088, "config_test": false, "...
from django.shortcuts import render, render_to_response, RequestContext from django.http import HttpResponseRedirect from django.core.context_processors import csrf from django.contrib import auth from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from .forms import ...
{ "repo_name": "drchangliu/VisualPhonetics", "path": "VowelCatApp/views.py", "copies": "1", "size": "3528", "license": "mit", "hash": -8237953017190264000, "line_mean": 34.28, "line_max": 129, "alpha_frac": 0.7219387755, "autogenerated": false, "ratio": 3.946308724832215, "config_test": false, ...
from django.shortcuts import render, render_to_response, RequestContext from django import forms from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth import authenticate, login as auth_login, logout import json from annoying.decorators import ajax_request import datetime from models impor...
{ "repo_name": "patrickw14/hackathon", "path": "hackathon/geonote/views.py", "copies": "1", "size": "2348", "license": "mit", "hash": -8115212983735609000, "line_mean": 36.2698412698, "line_max": 98, "alpha_frac": 0.6401192504, "autogenerated": false, "ratio": 3.606758832565284, "config_test": f...
from django.shortcuts import render,render_to_response,RequestContext,redirect from django.core.urlresolvers import reverse from allModel.models import SuUserDepartment,SuUser,SuOrganization from django.http import HttpResponseRedirect from froms import addDept from compiler.ast import From from django.core.exceptions ...
{ "repo_name": "nuwan600/openshift-asowac", "path": "departments/views.py", "copies": "1", "size": "2774", "license": "mit", "hash": -3487027167391118000, "line_mean": 43.7419354839, "line_max": 226, "alpha_frac": 0.6218457102, "autogenerated": false, "ratio": 4.190332326283988, "config_test": f...
from django.shortcuts import render, render_to_response, RequestContext, redirect from .forms import RegistrationForm, LoginForm from django.contrib.auth import login # Create your views here. def register(request): """ We use this to register a user """ # import pdb; pdb.set_trace() if request.m...
{ "repo_name": "miclovich/django-reg-noact", "path": "reg/views.py", "copies": "1", "size": "1496", "license": "mit", "hash": 7963746255774351000, "line_mean": 33, "line_max": 81, "alpha_frac": 0.5661764706, "autogenerated": false, "ratio": 4.719242902208202, "config_test": false, "has_no_keyw...
from django.shortcuts import render, render_to_response from django.template import RequestContext def render_to_response_view(request): return render_to_response('shortcuts/render_test.html', { 'foo': 'FOO', 'bar': 'BAR', }) def render_to_response_view_with_multiple_templates(req...
{ "repo_name": "yephper/django", "path": "tests/shortcuts/views.py", "copies": "1", "size": "2358", "license": "bsd-3-clause", "hash": 5455865880819447000, "line_mean": 26.0714285714, "line_max": 82, "alpha_frac": 0.6174724343, "autogenerated": false, "ratio": 3.6786271450858035, "config_test": ...
from django.shortcuts import render, RequestContext, Http404, HttpResponseRedirect, HttpResponse from profiles.models import UserProfile, Location def home(request): location = Location.objects.get(id=1) if request.user.is_anonymous(): template = 'customer_home.html' MyUser = None conte...
{ "repo_name": "hellojerry/pizzatime", "path": "src/radar/views.py", "copies": "1", "size": "1283", "license": "mit", "hash": -5486913336763975000, "line_mean": 34.6666666667, "line_max": 96, "alpha_frac": 0.6274356976, "autogenerated": false, "ratio": 4.598566308243727, "config_test": false, ...
from django.shortcuts import render, resolve_url from django.contrib.auth.decorators import login_required from gui.decorators import profile_required from gui.utils import collect_view_data from gui.signals import view_faq from api.decorators import setting_required @login_required @profile_required def api(request...
{ "repo_name": "erigones/esdc-ce", "path": "gui/docs/views.py", "copies": "1", "size": "1344", "license": "apache-2.0", "hash": -1251118378587419000, "line_mean": 26.4285714286, "line_max": 88, "alpha_frac": 0.7046130952, "autogenerated": false, "ratio": 3.584, "config_test": false, "has_no_ke...
from django.shortcuts import render, resolve_url, redirect from django.core.urlresolvers import reverse import dropbox from dropbox import DropboxOAuth2Flow, Dropbox from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.conf import settings from django.http....
{ "repo_name": "epoz/metabotnik", "path": "src/metabotnik/auth.py", "copies": "1", "size": "3502", "license": "mit", "hash": -5787485157528964000, "line_mean": 42.2469135802, "line_max": 115, "alpha_frac": 0.6464877213, "autogenerated": false, "ratio": 4.149289099526066, "config_test": false, ...
from django.shortcuts import render,resolve_url,redirect from django.template.response import TemplateResponse from django.core.urlresolvers import reverse,reverse_lazy from django.contrib.auth.views import deprecate_current_app from django.views.decorators.csrf import csrf_protect from django.views.decorators.cache im...
{ "repo_name": "anderson7ru/bienestarues", "path": "cuentas_usuarioapp/views.py", "copies": "1", "size": "10287", "license": "mit", "hash": 6195350933132048000, "line_mean": 39.984063745, "line_max": 135, "alpha_frac": 0.6573344999, "autogenerated": false, "ratio": 3.6818181818181817, "config_te...
from django.shortcuts import render, reverse, HttpResponseRedirect, HttpResponse from django.views.generic import View, ListView, FormView from utils.mixin_utils import LoginRequiredMixin from django.contrib.auth import logout from django.utils import timezone from django.conf import settings from .forms import LinkFor...
{ "repo_name": "itpubs/reflecting", "path": "apps/admin/views.py", "copies": "1", "size": "11368", "license": "mit", "hash": 1407439973661904600, "line_mean": 34.2834890966, "line_max": 126, "alpha_frac": 0.600035317, "autogenerated": false, "ratio": 4.088808664259928, "config_test": false, "h...
from django.shortcuts import render, reverse from django.conf import settings from django.http import HttpResponseRedirect, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotFound import random import numpy as np from bson import ObjectId import json # Create your views here. from search_web.models import...
{ "repo_name": "sunshaoyan/ISeeNN", "path": "ISeeNN/annotator/views.py", "copies": "1", "size": "8399", "license": "apache-2.0", "hash": -8249020659452402000, "line_mean": 34.5889830508, "line_max": 113, "alpha_frac": 0.6500773902, "autogenerated": false, "ratio": 3.872291378515445, "config_test...
from django.shortcuts import render from django.conf import settings from django.views.generic import TemplateView, View from django.http import HttpResponse, HttpResponseRedirect from django.db.models import Count, Q, Prefetch, TextField from django.db.models.functions import Concat from django import forms f...
{ "repo_name": "protwis/protwis", "path": "structure/views.py", "copies": "1", "size": "114554", "license": "apache-2.0", "hash": 3619369254012486700, "line_mean": 41.0330578512, "line_max": 418, "alpha_frac": 0.6769645757, "autogenerated": false, "ratio": 3.1407029664966823, "config_test": fals...
from django.shortcuts import render from django.conf import settings from django.views.generic import TemplateView, View from django.http import HttpResponse, JsonResponse, HttpResponseRedirect from django.db.models import Count, Q, Prefetch from django import forms from django.core.cache import cache from djang...
{ "repo_name": "cmunk/protwis", "path": "structure/views.py", "copies": "1", "size": "97614", "license": "apache-2.0", "hash": -1035750887344602200, "line_mean": 39.5564069817, "line_max": 418, "alpha_frac": 0.6713381277, "autogenerated": false, "ratio": 3.1758849557522124, "config_test": false,...
from django.shortcuts import render from django.conf import settings from rest_framework.decorators import authentication_classes, permission_classes from rest_framework import viewsets, generics from rest_framework.response import Response from rest_framework.authentication import SessionAuthentication, BasicAuth...
{ "repo_name": "apy2017/Anaconda", "path": "techbot_web/api_v0/views.py", "copies": "1", "size": "8127", "license": "mit", "hash": 5684128378989949000, "line_mean": 32.8798283262, "line_max": 115, "alpha_frac": 0.603912883, "autogenerated": false, "ratio": 4.628132118451025, "config_test": false...
from django.shortcuts import render from django.contrib.auth.backends import ModelBackend from django.db.models import Q from django.contrib.auth import get_user_model from rest_framework.mixins import CreateModelMixin from rest_framework import viewsets, mixins from .serializers import SmsSerializer, UserRegiste...
{ "repo_name": "LennonChin/Django-Practices", "path": "MxShop/apps/users/views.py", "copies": "1", "size": "4377", "license": "apache-2.0", "hash": 7939997127148581000, "line_mean": 30.4621212121, "line_max": 113, "alpha_frac": 0.6423067943, "autogenerated": false, "ratio": 4.0520340586565755, "...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from djforms.music.theatre.summer_camp import BCC, TO_LIST, REG_FEE from djforms.processors.models import Contact, Order from djforms.processors.forms import TrustCommerceForm from djfor...
{ "repo_name": "carthage-college/django-djforms", "path": "djforms/music/theatre/summer_camp/views.py", "copies": "2", "size": "3884", "license": "unlicense", "hash": -1683265282927812000, "line_mean": 37.6326530612, "line_max": 76, "alpha_frac": 0.4752832132, "autogenerated": false, "ratio": 4.72...
from django.shortcuts import render from django.http import HttpResponse from django.views.generic import View from . import forms as mForms from .models import Chat, Room from .serializers import ChatSerializer, RoomSerializer from rest_framework.views import APIView from rest_framework.response import Response...
{ "repo_name": "diego-d5000/Estudiala", "path": "estudiala/estudiala/classroom/views.py", "copies": "1", "size": "2562", "license": "mit", "hash": 2276664598658078700, "line_mean": 38.6666666667, "line_max": 94, "alpha_frac": 0.5577673692, "autogenerated": false, "ratio": 4.357142857142857, "con...
from django.shortcuts import render from django.template import Context, RequestContext from django.contrib.auth.models import User from private_messages.models import Message, ConversationLog from login.models import UserProfile from django.contrib.auth import logout from django.contrib.auth.decorators import lo...
{ "repo_name": "jnayak1/cs3240-s16-team16", "path": "private_messages/views.py", "copies": "1", "size": "8546", "license": "mit", "hash": 3322686118065510400, "line_mean": 36.8454545455, "line_max": 142, "alpha_frac": 0.7029019424, "autogenerated": false, "ratio": 3.455721795390214, "config_test...
from django.shortcuts import render from .forms import * from .models import * from django.utils import timezone from django.core.mail import send_mail from django.conf import settings from welcomepage.views import navbar_functions # Create your views here. ''' This function renders the form to create the even...
{ "repo_name": "anirudhagar13/PES-Portal", "path": "pes_portal/tester/views.py", "copies": "1", "size": "7426", "license": "apache-2.0", "hash": -6599000592598836000, "line_mean": 39.2666666667, "line_max": 198, "alpha_frac": 0.6430110423, "autogenerated": false, "ratio": 2.9526838966202784, "co...
from django.shortcuts import render from rest_framework import mixins, viewsets from .models import UserFav, UserLeavingMessage, UserAddress from .serializers import UserFavSerializer, AddressSerializer from rest_framework.permissions import IsAuthenticated from utils.permissions import IsOwnerOrReadOnly from res...
{ "repo_name": "LennonChin/Django-Practices", "path": "MxShop/apps/user_operation/views.py", "copies": "1", "size": "2898", "license": "apache-2.0", "hash": -2199246341140752100, "line_mean": 30.2142857143, "line_max": 101, "alpha_frac": 0.6884700665, "autogenerated": false, "ratio": 3.60319573901...
from django.shortcuts import render from tapiriik.services import Service from tapiriik.settings import WITHDRAWN_SERVICES, SOFT_LAUNCH_SERVICES from tapiriik.auth import User import itertools def privacy(request): OPTIN = "<span class=\"optin policy\">Opt-in</span>" NO = "<span class=\"no policy\">N...
{ "repo_name": "cpfair/tapiriik", "path": "tapiriik/web/views/privacy.py", "copies": "1", "size": "3205", "license": "apache-2.0", "hash": 3145259454354704000, "line_mean": 70.8409090909, "line_max": 121, "alpha_frac": 0.6327613105, "autogenerated": false, "ratio": 3.221105527638191, "config_tes...
from django.shortcuts import render from tester.models import * from django.shortcuts import render, redirect from django.http import HttpResponse from django.template import loader from django.db import connection from django.contrib.auth.models import User from django.contrib.auth import authenticate, login f...
{ "repo_name": "anirudhagar13/PES-Portal", "path": "pes_portal/welcomepage/views.py", "copies": "1", "size": "9297", "license": "apache-2.0", "hash": -8949522030852751000, "line_mean": 33.0905660377, "line_max": 238, "alpha_frac": 0.6723674304, "autogenerated": false, "ratio": 3.132412398921833, ...
from django.shortcuts import render import os def MUSE_display_summation(request,input_dict,output_dict,widget): if sum(input_dict['intList']) == input_dict['sum']: check = 'The calculation appears correct.' else: check = 'The calculation appears incorrect!' return render(request,...
{ "repo_name": "Alshak/clowdflows", "path": "workflows/MUSE/visualization_views.py", "copies": "4", "size": "2852", "license": "mit", "hash": -8595672329967498000, "line_mean": 37.6111111111, "line_max": 155, "alpha_frac": 0.6157082749, "autogenerated": false, "ratio": 3.777483443708609, "config...
from django.shortcuts import render import random, string from random import shuffle from django.template.response import SimpleTemplateResponse from django.views.decorators.csrf import csrf_exempt # Create your views here. def RandomPasswordGenerator(request): return render(request, 'RandomPasswordGen...
{ "repo_name": "AgapiGit/RandomPasswordGenerator", "path": "RandomPasswordGenerator/generate/views.py", "copies": "1", "size": "1504", "license": "mit", "hash": 3137811676488156700, "line_mean": 39.7777777778, "line_max": 129, "alpha_frac": 0.6682180851, "autogenerated": false, "ratio": 3.96833773...
from django.shortcuts import render # Create your views here. from .models import Book, Author, BookInstance, Genre, Language def index(request): """ View function for home page of site. """ # Generate counts of some of the main objects num_books=Book.objects.all().count() num_ins...
{ "repo_name": "mrmarkhurlburt/django_media_library", "path": "views.py", "copies": "1", "size": "4903", "license": "cc0-1.0", "hash": 7395238651952679000, "line_mean": 34.8646616541, "line_max": 145, "alpha_frac": 0.6877421987, "autogenerated": false, "ratio": 3.957223567393059, "config_test": ...
from django.shortcuts import render # Create your views here. from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from utils.permissions import IsOwnerOrReadOnly from rest_framework_jwt.authentication import JSONWebTokenAuthentication from rest_framework.authentication i...
{ "repo_name": "LennonChin/Django-Practices", "path": "MxShop/apps/trade/views.py", "copies": "1", "size": "6533", "license": "apache-2.0", "hash": 6487164802131686000, "line_mean": 31.6935483871, "line_max": 145, "alpha_frac": 0.6057124621, "autogenerated": false, "ratio": 3.654227405247813, "c...
from django.shortcuts import render def bio3graph_filter_integers(request,input_dict,output_dict,widget): return render(request, 'interactions/bio3graph_filter_integers.html',{'widget':widget,'intList':input_dict['intList']}) def bio3graph_xml_to_fulltext(request, input_dict, output_dict, widget): f...
{ "repo_name": "xflows/textflows", "path": "workflows/bio3graph/interaction_views.py", "copies": "4", "size": "3794", "license": "mit", "hash": 5298471348581594000, "line_mean": 35.96, "line_max": 133, "alpha_frac": 0.5558777016, "autogenerated": false, "ratio": 3.907312049433574, "config_test":...
from django.shortcuts import render def perfeval_display_summation(request,input_dict,output_dict,widget): if sum(input_dict['intList']) == input_dict['sum']: check = 'The calculation appears correct.' else: check = 'The calculation appears incorrect!' return render(request, 'visuali...
{ "repo_name": "xflows/textflows", "path": "workflows/perfeval/visualization_views.py", "copies": "1", "size": "1102", "license": "mit", "hash": -2109569927502590200, "line_mean": 45.9130434783, "line_max": 159, "alpha_frac": 0.6606170599, "autogenerated": false, "ratio": 3.5434083601286175, "co...
from django.shortcuts import render from django.http import HttpResponse from sunflower.models import Flower, Garden def hi(request): return HttpResponse("You said hi I said bye") def index(r): return render(r, "sunflower/index.html") def flower_crud(request): if request.method == "GET...
{ "repo_name": "SabujXi/Python-Django-Webinar-In-Bangla-Season-1", "path": "sunflower/views.py", "copies": "1", "size": "2062", "license": "mit", "hash": -5806451379846090000, "line_mean": 29.7230769231, "line_max": 77, "alpha_frac": 0.564500485, "autogenerated": false, "ratio": 3.7904411764705883...
from django.shortcuts import render from django.template import RequestContext from django.views.generic import TemplateView from django.http import HttpResponse import django.http import json from django.db import transaction from django.views.decorators.csrf import csrf_exempt from proposition.models im...
{ "repo_name": "ericmok/eri53", "path": "proposition/rest.py", "copies": "1", "size": "14948", "license": "unlicense", "hash": -4941633955776511000, "line_mean": 26.7461538462, "line_max": 118, "alpha_frac": 0.6287797699, "autogenerated": false, "ratio": 3.1851694012358833, "config_test": false,...
from django.shortcuts import render def measure_distribution(request, input_dict, output_dict, widget): from disco.core import result_iterator from discomll.utils import distribution results = distribution.measure(input_dict["dataset"]) dist = "" for k, v in result_iterator(results): ...
{ "repo_name": "xflows/textflows", "path": "workflows/big_data/visualization_views.py", "copies": "4", "size": "5338", "license": "mit", "hash": 1039687400774123500, "line_mean": 34.5616438356, "line_max": 91, "alpha_frac": 0.5760584489, "autogenerated": false, "ratio": 3.7911931818181817, "conf...
from django.shortcuts import render_to_response as render from django.http import HttpResponse from django.conf import settings from redis_monitor import get_instance def monitor(request): requests = get_instance('requests') sqlops = get_instance('sqlops') if getattr(settings, 'REDIS_MONITOR_ONLY_TRACK_TOT...
{ "repo_name": "simonw/django-redis-monitor", "path": "django_redis_monitor/views.py", "copies": "1", "size": "1435", "license": "bsd-2-clause", "hash": -2942213793738752500, "line_mean": 38.8611111111, "line_max": 75, "alpha_frac": 0.6181184669, "autogenerated": false, "ratio": 3.6237373737373737...
from django.shortcuts import render_to_response as render from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib.auth import login as log_user_in, load_backend from django.utils.html import escape from django.conf import settings from django.template i...
{ "repo_name": "pombreda/django-hotclub", "path": "apps/local_apps/django_openidauth/views.py", "copies": "2", "size": "7921", "license": "mit", "hash": -5815589589191608000, "line_mean": 41.3582887701, "line_max": 109, "alpha_frac": 0.6403231915, "autogenerated": false, "ratio": 4.300217155266015...
from django.shortcuts import render_to_response as _render_to_response from django.template import RequestContext from django.utils.functional import Promise from django.utils.encoding import force_unicode import sys, os, json def render_to_response(request, template, context): return _render_to_response(template,...
{ "repo_name": "hollow/nepal", "path": "nepal/contrib/shortcuts.py", "copies": "1", "size": "1491", "license": "bsd-3-clause", "hash": -8529958445549407000, "line_mean": 33.6744186047, "line_max": 71, "alpha_frac": 0.6881287726, "autogenerated": false, "ratio": 3.9549071618037135, "config_test":...
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 from django.http import HttpResponseRedirect from respite import Views from respite.decorators import rest_login_required from app_users.models import UserProfile from app_projects.models import Project from app_projects.models_nn imp...
{ "repo_name": "marco-lancini/Showcase", "path": "app_hints/views.py", "copies": "1", "size": "6832", "license": "mit", "hash": 8546720551600322000, "line_mean": 38.04, "line_max": 145, "alpha_frac": 0.5396662763, "autogenerated": false, "ratio": 4.329531051964512, "config_test": false, "has_n...
from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 from django.template.context import RequestContext from django.http import HttpResponseRedirect, HttpResponseBadRequest, HttpResponse, HttpResponseForbidden from django.conf import settings from django.core.exceptions import ObjectDoesN...
{ "repo_name": "digitaljhelms/django-paste", "path": "dpaste/views.py", "copies": "1", "size": "5204", "license": "bsd-3-clause", "hash": 7849719629257548000, "line_mean": 31.1234567901, "line_max": 105, "alpha_frac": 0.6556495004, "autogenerated": false, "ratio": 3.978593272171254, "config_test...
from django.shortcuts import render_to_response, get_object_or_404, HttpResponse, HttpResponseRedirect, Http404 from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib import messages from django.db.models import Count from polls.models import Poll, Choice, V...
{ "repo_name": "Kami/sgrstats.com", "path": "sgrstats/polls/views.py", "copies": "1", "size": "3070", "license": "apache-2.0", "hash": -2389981294246853000, "line_mean": 39.5135135135, "line_max": 208, "alpha_frac": 0.6394136808, "autogenerated": false, "ratio": 3.7807881773399017, "config_test"...
from django.shortcuts import render_to_response, get_object_or_404 from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from models import Post, Category from datetime import datetime def paginate(request, obj_list): paginator = Paginator(obj_list, settings.P...
{ "repo_name": "bevenky/dev-cms", "path": "posts/views.py", "copies": "1", "size": "3963", "license": "mit", "hash": -4196377137082932700, "line_mean": 45.0813953488, "line_max": 99, "alpha_frac": 0.6293212213, "autogenerated": false, "ratio": 3.866341463414634, "config_test": false, "has_no_k...
from django.shortcuts import render_to_response, get_object_or_404 from django.conf import settings from mapfeed.models import MapCity, MapLine, MapStation, MapPath, Incident import twitter, datetime def index(request): city_list = MapCity.objects.all() return render_to_response('mapfeed/index.html', {'city_li...
{ "repo_name": "D8TM/railtracker", "path": "mapfeed/views.py", "copies": "1", "size": "1954", "license": "apache-2.0", "hash": -79727352519428130, "line_mean": 36.5769230769, "line_max": 100, "alpha_frac": 0.6714431934, "autogenerated": false, "ratio": 3.3062605752961085, "config_test": false, ...
from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import HttpResponse, Http404 from django.template import RequestContext from django.forms.models import modelformset_factory from forms import PollForm, VoteForm from models impo...
{ "repo_name": "danrex/django-riv", "path": "tests/polls/views.py", "copies": "1", "size": "3123", "license": "mit", "hash": -1436881534063520800, "line_mean": 30.8673469388, "line_max": 83, "alpha_frac": 0.6080691643, "autogenerated": false, "ratio": 3.709026128266033, "config_test": false, "...
from django.shortcuts import render_to_response, get_object_or_404 from django.contrib.auth import authenticate, login from django.contrib.auth.models import User, Group from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.template import Context, loader from...
{ "repo_name": "EricSchles/veyepar", "path": "dj/main/views.py", "copies": "1", "size": "63582", "license": "mit", "hash": -5759623378838075000, "line_mean": 31.0151057402, "line_max": 278, "alpha_frac": 0.5734170048, "autogenerated": false, "ratio": 3.7123839551585216, "config_test": false, "...
from django.shortcuts import render_to_response, get_object_or_404 from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext from testtool.models import * import json def validate_method_choice(method): if method not...
{ "repo_name": "canbal/Tally", "path": "django_source/testtool/test_modes/views.py", "copies": "1", "size": "9955", "license": "mit", "hash": -6556546507234478000, "line_mean": 45.9622641509, "line_max": 135, "alpha_frac": 0.5607232546, "autogenerated": false, "ratio": 4.214648602878916, "config...
from django.shortcuts import render_to_response, get_object_or_404 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from news.models import NewsPost from django.template.context import RequestContext import datetime def newslist(request): news = NewsPost.objects.filter(publish_date__lt=dat...
{ "repo_name": "orlenko/sfpirg", "path": "sfpirgapp/views/newsposts.py", "copies": "1", "size": "1157", "license": "bsd-2-clause", "hash": -2820000669112979500, "line_mean": 37.6, "line_max": 102, "alpha_frac": 0.7165082109, "autogenerated": false, "ratio": 3.7934426229508196, "config_test": fal...
from django.shortcuts import render_to_response, get_object_or_404 from django.core.urlresolvers import reverse from django.views.generic import ListView, DetailView from django.views.generic.dates import YearArchiveView, MonthArchiveView, ArchiveIndexView from django.db.models import Q from endless_pagination.views i...
{ "repo_name": "mdblv2/joatu-django", "path": "application/apps/feeds/views.py", "copies": "2", "size": "3910", "license": "apache-2.0", "hash": 7296732843879674000, "line_mean": 31.5833333333, "line_max": 107, "alpha_frac": 0.6800511509, "autogenerated": false, "ratio": 3.681732580037665, "conf...
from django.shortcuts import render_to_response, get_object_or_404 from django.db import models from django.http import Http404, HttpResponseRedirect from django.core.urlresolvers import resolve, reverse from pprint import pprint from django.template.context import Context, RequestContext from forms import TellAFriendF...
{ "repo_name": "gregplaysguitar/glamkit", "path": "glamkit/incubated/tellafriend/views.py", "copies": "1", "size": "5531", "license": "bsd-3-clause", "hash": -4192955925572053000, "line_mean": 47.9557522124, "line_max": 199, "alpha_frac": 0.6449105044, "autogenerated": false, "ratio": 4.2253628724...
from django.shortcuts import render_to_response, get_object_or_404 from django.db.models import Avg, Max, Min, Count from django.views.decorators.csrf import csrf_exempt from django.template import RequestContext from django.http import HttpResponse from datetime import datetime from django.core import serializers from...
{ "repo_name": "clumsical/beerconnect", "path": "beerconnect/tasting/views.py", "copies": "1", "size": "6303", "license": "mit", "hash": -3197172598992375300, "line_mean": 28.7311320755, "line_max": 117, "alpha_frac": 0.6132000635, "autogenerated": false, "ratio": 3.6099656357388317, "config_tes...
from django.shortcuts import render_to_response, get_object_or_404 from django.db.models import Avg, Sum, Min, Max, Count from django.http import Http404, HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.conf import settings from django.contrib.syndication.feeds import Feed fr...
{ "repo_name": "gcaprio/cfbreference_com", "path": "rankings/views.py", "copies": "1", "size": "2206", "license": "apache-2.0", "hash": 3718236756420277000, "line_mean": 52.8048780488, "line_max": 187, "alpha_frac": 0.739800544, "autogenerated": false, "ratio": 3.4685534591194966, "config_test":...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import Http404 from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.dates import YearArchiveView, MonthArchiveView,\ DateDetailView from .models import Article, ...
{ "repo_name": "ilendl2/chrisdev-cookiecutter", "path": "{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/news/views.py", "copies": "1", "size": "2060", "license": "bsd-3-clause", "hash": 2343145691595782000, "line_mean": 28.014084507, "line_max": 79, "alpha_frac": 0.709223301, "autogenerate...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpRequest, HttpResponse, HttpResponseRedirect, Http404 from django.core.urlresolvers import resolve import logging from django.http import QueryDict import urllib, urllib2, urlparse from django.utils import simplejson from B...
{ "repo_name": "nickmoline/feedsanitizer", "path": "testviews.py", "copies": "2", "size": "2122", "license": "mit", "hash": -4165171261610817500, "line_mean": 37.6, "line_max": 125, "alpha_frac": 0.6856738926, "autogenerated": false, "ratio": 3.8303249097472922, "config_test": false, "has_no_k...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, Http404, HttpResponseRedirect from django.conf import settings import extra_views import vanilla import ptree.constants as constants # import the logging library import logging logger = logging.getLogger(__name_...
{ "repo_name": "pombredanne/django-ptree", "path": "ptree/views/experimenter.py", "copies": "1", "size": "5741", "license": "mit", "hash": -4838579162829238000, "line_mean": 35.8012820513, "line_max": 114, "alpha_frac": 0.6714858039, "autogenerated": false, "ratio": 4.124281609195402, "config_te...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, Http404 from django.db.models import Q from django.template import RequestContext from projects.models import Project, SubProject from data.models import Protocol, Result, Experiment from reagents.models import Ant...
{ "repo_name": "davebridges/ExperimentDB", "path": "experimentdb/views.py", "copies": "1", "size": "1226", "license": "bsd-3-clause", "hash": 850738729476200200, "line_mean": 32.1351351351, "line_max": 89, "alpha_frac": 0.7300163132, "autogenerated": false, "ratio": 3.6816816816816815, "config_t...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, Http404 from django.template import RequestContext from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from models import Story from places.models import Place from places.views import InOtherPl...
{ "repo_name": "MAPC/masshealth", "path": "datastories/views.py", "copies": "1", "size": "2304", "license": "bsd-3-clause", "hash": 76102364763836540, "line_mean": 28.5384615385, "line_max": 77, "alpha_frac": 0.6102430556, "autogenerated": false, "ratio": 3.657142857142857, "config_test": false,...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect, HttpResponseBadRequest, Http404 from django.core.context_processors import csrf from django.views.decorators.csrf import csrf_exempt from django.core import serializers ...
{ "repo_name": "ncgmp09/ncgmp09-online", "path": "geomaps/views.py", "copies": "1", "size": "3020", "license": "bsd-3-clause", "hash": -5870854844351511000, "line_mean": 33.3295454545, "line_max": 120, "alpha_frac": 0.5798013245, "autogenerated": false, "ratio": 4.165517241379311, "config_test":...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse import sys, traceback import logging import StringIO from time import mktime from datetime import datetime import xml.dom.minidom from mis...
{ "repo_name": "HBehrens/feedsanitizer", "path": "views.py", "copies": "2", "size": "3610", "license": "mit", "hash": 2670896146086448600, "line_mean": 32.7476635514, "line_max": 109, "alpha_frac": 0.6105263158, "autogenerated": false, "ratio": 3.6949846468781984, "config_test": false, "has_no...
from django.shortcuts import render_to_response,get_object_or_404 from django.http import HttpResponse,HttpResponseRedirect,Http404 from django.template import loader,Context from .models import Consulta,Paciente,Medico def index(request): return render_to_response('index.html') def detail(request, paciente_id): ...
{ "repo_name": "rodrigolucianocosta/projeto101", "path": "projetoMaster/projeto101/views.py", "copies": "1", "size": "1321", "license": "mit", "hash": 247014685903642200, "line_mean": 32.8717948718, "line_max": 79, "alpha_frac": 0.7501892506, "autogenerated": false, "ratio": 3.1303317535545023, ...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect, Http404 from ideas.forms import IdeaForm, ContributorForm from ideas.models import Idea, Category from django.template import RequestContext from django.db.models import Q from django.forms.ut...
{ "repo_name": "Laimiux/mydeatree", "path": "ideas/views.py", "copies": "1", "size": "6828", "license": "bsd-3-clause", "hash": 3364432233179948000, "line_mean": 34.7486910995, "line_max": 154, "alpha_frac": 0.6325424722, "autogenerated": false, "ratio": 3.6828478964401294, "config_test": false,...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.core import serializers from django.core.urlresolvers import reverse_lazy from django.template import RequestContext from django.views.generic import DetailView, CreateView, UpdateVi...
{ "repo_name": "MDA2014/django-xpand", "path": "django_project/apps/gen/views.py", "copies": "1", "size": "5516", "license": "mit", "hash": 1597524414374221300, "line_mean": 30.6896551724, "line_max": 91, "alpha_frac": 0.6542717214, "autogenerated": false, "ratio": 3.6728847435043304, "config_te...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect from django.db.models import Q from datetime import datetime import re from youbama.main.models import Video, Upload, Contact from youbama.settings import MEDIA_ROOT from youbama.main.helpers...
{ "repo_name": "jeztek/youbama", "path": "main/views.py", "copies": "1", "size": "7558", "license": "apache-2.0", "hash": -669912358806209800, "line_mean": 23.1469648562, "line_max": 150, "alpha_frac": 0.6616829849, "autogenerated": false, "ratio": 2.8596292092319335, "config_test": false, "ha...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse # Create your views here. import PIL from PIL import ImageFont, Image, ImageDraw from advancedsearch.models import Movie, Album from django.conf import settings def bad_request(request): response = HttpRespon...
{ "repo_name": "HM2MC/Webfront", "path": "m2m/imaging/views.py", "copies": "2", "size": "3292", "license": "mit", "hash": 7367074982936147000, "line_mean": 35.1868131868, "line_max": 143, "alpha_frac": 0.6351761847, "autogenerated": false, "ratio": 3.2626362735381567, "config_test": false, "ha...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse from django.core import serializers from django.template import RequestContext import json from .models import Persona from .models import Domicilio from .models import Localidad from .models import Provincia # C...
{ "repo_name": "MDA2014/django-abm", "path": "apps/persona/views.py", "copies": "1", "size": "5188", "license": "mit", "hash": -2654559160999279600, "line_mean": 38.5648854962, "line_max": 138, "alpha_frac": 0.6185606791, "autogenerated": false, "ratio": 3.478523489932886, "config_test": false, ...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, get_host from django.template import RequestContext from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from djang...
{ "repo_name": "pombreda/django-hotclub", "path": "apps/core_apps/photos/views.py", "copies": "2", "size": "10069", "license": "mit", "hash": -513373831582750660, "line_mean": 44.9771689498, "line_max": 134, "alpha_frac": 0.6248882709, "autogenerated": false, "ratio": 4.009956192751892, "config_...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, get_host from django.template import RequestContext from django.db.models import Q from django.http import Http404 from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNo...
{ "repo_name": "ericholscher/pinax", "path": "pinax/apps/photos/views.py", "copies": "1", "size": "9000", "license": "mit", "hash": 5882501373128386000, "line_mean": 29, "line_max": 108, "alpha_frac": 0.588, "autogenerated": false, "ratio": 4.1551246537396125, "config_test": false, "has_no_key...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.template import RequestContext from rsvp.models import Event from rsvp.forms import RSVP...
{ "repo_name": "toastdriven/django-rsvp", "path": "rsvp/views.py", "copies": "1", "size": "1344", "license": "mit", "hash": -8533407760896205000, "line_mean": 33.4871794872, "line_max": 114, "alpha_frac": 0.681547619, "autogenerated": false, "ratio": 3.8073654390934846, "config_test": false, "...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django import forms from katipo.models import Run, Url def run_detail(request, object_id): run = get_object_or_404(Run, pk=object_id) # handle requests for URL-lists if 'resul...
{ "repo_name": "rcoup/katipo", "path": "katipo/views.py", "copies": "1", "size": "3066", "license": "apache-2.0", "hash": 7179822448947134000, "line_mean": 32.3369565217, "line_max": 130, "alpha_frac": 0.600456621, "autogenerated": false, "ratio": 3.5, "config_test": false, "has_no_keywords": ...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django.template import RequestContext from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django...
{ "repo_name": "andriibekker/django-swaps", "path": "swaps/views.py", "copies": "1", "size": "11444", "license": "mit", "hash": -4753253558729895000, "line_mean": 40.7664233577, "line_max": 154, "alpha_frac": 0.63273331, "autogenerated": false, "ratio": 3.840268456375839, "config_test": false, ...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django.template import RequestContext from django.db import IntegrityError from django.db.models import Q from django.core.urlresolvers import reverse from django.utils.translation import ugette...
{ "repo_name": "philippWassibauer/django-activity-stream", "path": "activity_stream/views.py", "copies": "1", "size": "3316", "license": "bsd-3-clause", "hash": 8182545023877394000, "line_mean": 37.5581395349, "line_max": 95, "alpha_frac": 0.7174306393, "autogenerated": false, "ratio": 3.878362573...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponseForbidden from django.apps import apps from django.utils.translation import ugettext as _ from django.template import loader from django.contrib.auth.decorators import login_required from author...
{ "repo_name": "jlward/django-authority", "path": "authority/views.py", "copies": "1", "size": "4246", "license": "bsd-3-clause", "hash": -3927870475322602000, "line_mean": 30.9248120301, "line_max": 86, "alpha_frac": 0.6373056995, "autogenerated": false, "ratio": 4.170923379174853, "config_test...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponseForbidden from django.db.models.loading import get_model from django.utils.translation import ugettext as _ from django.template.context import RequestContext from django.template import loader f...
{ "repo_name": "brittanystoroz/kitsune", "path": "authority/views.py", "copies": "5", "size": "4279", "license": "bsd-3-clause", "hash": 4407888067817499600, "line_mean": 36.8672566372, "line_max": 80, "alpha_frac": 0.64781491, "autogenerated": false, "ratio": 4.274725274725275, "config_test": f...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from polls.models import Choice, Poll, Token, Vote, WriteInChoice def display_poll(request, poll, token=N...
{ "repo_name": "mivanov/localwiki_splash", "path": "polls/views.py", "copies": "1", "size": "2024", "license": "mit", "hash": -3255346759395491000, "line_mean": 33.3050847458, "line_max": 70, "alpha_frac": 0.7168972332, "autogenerated": false, "ratio": 3.197472353870458, "config_test": false, ...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.core.urlresolvers import reverse from django.utils import simplejson from django.utils.translation import ugettext as _ from sendinel.back...
{ "repo_name": "Sendinel/Sendinel", "path": "sendinel/medicines/views.py", "copies": "1", "size": "5640", "license": "mit", "hash": 2174467131560211000, "line_mean": 39.2928571429, "line_max": 80, "alpha_frac": 0.6007092199, "autogenerated": false, "ratio": 4.522854851643945, "config_test": fals...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.contrib.auth import logout as logout_ from django.contrib.auth.models import User from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth.d...
{ "repo_name": "django-stars/dash2011", "path": "presence/apps/people/views.py", "copies": "1", "size": "3309", "license": "bsd-3-clause", "hash": 4753081243026060000, "line_mean": 29.0818181818, "line_max": 76, "alpha_frac": 0.647325476, "autogenerated": false, "ratio": 4.090234857849197, "conf...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.template import RequestContext from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from models import Poll, Cho...
{ "repo_name": "Troyhy/cmsplugin-poll", "path": "cmsplugin_poll/views.py", "copies": "1", "size": "1994", "license": "bsd-3-clause", "hash": 6351343254881975000, "line_mean": 38.0980392157, "line_max": 76, "alpha_frac": 0.6394182548, "autogenerated": false, "ratio": 3.932938856015779, "config_te...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from mysite.polls.models import Choice, Poll def main_index(request): return render_to_response('polls/main-index.html', {}) def index(request): latest_...
{ "repo_name": "aldeka/5-minute-design", "path": "demos/ngrok_demo/mysite/polls/views.py", "copies": "1", "size": "1481", "license": "mit", "hash": 2987904876117292500, "line_mean": 36.9743589744, "line_max": 89, "alpha_frac": 0.6711681296, "autogenerated": false, "ratio": 3.577294685990338, "co...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.db import transaction from django.db.models import Min,Max from django.core.urlresolvers import reverse from browseNet.models import Smb, Share, Path from search.models import File, Host import ...
{ "repo_name": "blampe/M2M", "path": "m2m/browseNet/views.py", "copies": "2", "size": "6813", "license": "mit", "hash": 3355125292321171000, "line_mean": 32.8955223881, "line_max": 153, "alpha_frac": 0.5479230882, "autogenerated": false, "ratio": 4.345025510204081, "config_test": false, "has_n...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.db import transaction from django.template import loader, Context from django.core.mail import send_mail from django.contrib.admin.views.decorators import staff_member_required from django.contrib...
{ "repo_name": "saschwarz/django-gcse", "path": "gcse/admin_views.py", "copies": "1", "size": "2096", "license": "bsd-3-clause", "hash": 3311397715481329000, "line_mean": 42.6666666667, "line_max": 108, "alpha_frac": 0.6760496183, "autogenerated": false, "ratio": 3.9923809523809526, "config_test...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from...
{ "repo_name": "Tyler2004/django-microblogging", "path": "microblogging/views.py", "copies": "2", "size": "4889", "license": "mit", "hash": -6484122129149747000, "line_mean": 40.7863247863, "line_max": 149, "alpha_frac": 0.6872571078, "autogenerated": false, "ratio": 3.8956175298804783, "config_...