text stringlengths 0 1.05M | meta dict |
|---|---|
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.utils.translation import ugettext as _
from .models import Profile
from .forms import ProfileForm
@login_required
def profile_edit(request):
next = request... | {
"repo_name": "alex/pycon",
"path": "pycon/profile/views.py",
"copies": "1",
"size": "1196",
"license": "bsd-3-clause",
"hash": -2874892295395987500,
"line_mean": 28.9,
"line_max": 69,
"alpha_frac": 0.6128762542,
"autogenerated": false,
"ratio": 4.196491228070175,
"config_test": false,
"has_n... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from .models import Profile
from .forms import ProfileForm
@login_required
def profile_edit(request):
next = request.GET.get("next")
profile, created = Profile.obj... | {
"repo_name": "eldarion/pycon",
"path": "pycon/profile/views.py",
"copies": "1",
"size": "1142",
"license": "bsd-3-clause",
"hash": -6785770612636003000,
"line_mean": 28.2820512821,
"line_max": 69,
"alpha_frac": 0.6050788091,
"autogenerated": false,
"ratio": 4.1678832116788325,
"config_test": f... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView
from django.core.exceptions import PermissionDenied
from django.views.generic import CreateView, DetailView, ListV... | {
"repo_name": "manax-dojo/cashflow",
"path": "apps/cashfield/views.py",
"copies": "1",
"size": "11671",
"license": "bsd-3-clause",
"hash": 6782745268699525000,
"line_mean": 26.2051282051,
"line_max": 108,
"alpha_frac": 0.6621540571,
"autogenerated": false,
"ratio": 3.7831442463533227,
"config_t... |
from django.shortcuts import render, redirect
from django.contrib.auth import logout as auth_logout
from django.contrib.auth.decorators import login_required
@login_required(login_url='/home/')
def logout(request):
auth_logout(request)
return redirect('/home/')
def redirect_to_home(request):
return red... | {
"repo_name": "cgvt/website",
"path": "cgvt_site/apps/core/views.py",
"copies": "1",
"size": "1153",
"license": "mit",
"hash": -5746192652401074000,
"line_mean": 27.1219512195,
"line_max": 73,
"alpha_frac": 0.7025151778,
"autogenerated": false,
"ratio": 3.603125,
"config_test": false,
"has_no... |
from django.shortcuts import render, redirect
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
import account.views
@login_required
def registration_count(request):
admin = request.user.is_staff
if not admin:
return redirect("dashboard")
from ... | {
"repo_name": "euroscipy/esp_2015",
"path": "esp_2015/views.py",
"copies": "1",
"size": "1360",
"license": "mit",
"hash": -1240223623320017400,
"line_mean": 24.6603773585,
"line_max": 71,
"alpha_frac": 0.6029411765,
"autogenerated": false,
"ratio": 3.4256926952141056,
"config_test": false,
"h... |
from django.shortcuts import render,redirect
from django.core.urlresolvers import reverse
# from .models import User
# Create your views here.
from django.http import JsonResponse,HttpResponse
import openpyxl
from openpyxl import Workbook
from openpyxl import load_workbook
from graphs.models import book1, book2, book... | {
"repo_name": "dilwaria/financialgraph",
"path": "graphs/views.py",
"copies": "1",
"size": "7070",
"license": "mit",
"hash": -4115664144122169300,
"line_mean": 28.8312236287,
"line_max": 409,
"alpha_frac": 0.6842998586,
"autogenerated": false,
"ratio": 2.7202770296267795,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
from django.contrib.auth.decorators import login_required
from .models import *
from .forms import *
# from django.contrib.auth.forms import UserCreationForm
# Create your views here.
def index(request):
form = sug... | {
"repo_name": "CSUChico-CINS465/CINS465-Fall2017-Lecture-Examples",
"path": "mysite/firstapp/views.py",
"copies": "2",
"size": "3124",
"license": "mit",
"hash": -2556954516408127000,
"line_mean": 32.2340425532,
"line_max": 89,
"alpha_frac": 0.6126760563,
"autogenerated": false,
"ratio": 4.0154241... |
from django.shortcuts import render,redirect
from django.http import HttpResponse
from .forms import SimpleSearch,Search
from django.core import serializers
import queries
from bookstore.models import Recurso
def index(request):
if (request.method == 'POST'):
return redirect('admin/login')
else:
... | {
"repo_name": "rafaellg8/libmasys",
"path": "libmasys/bookstore/views.py",
"copies": "1",
"size": "2892",
"license": "apache-2.0",
"hash": -2029860351655692000,
"line_mean": 38.0810810811,
"line_max": 167,
"alpha_frac": 0.6801521438,
"autogenerated": false,
"ratio": 3.8002628120893562,
"config_... |
from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.views import View
from .forms import ProductForm
from .models import Product
# Create your views here.
def hello_world(request):
if request.method == 'GET':
print dir(request)
value = request.GET.get('value',None)
... | {
"repo_name": "hariharaselvam/djangotraining",
"path": "products/views.py",
"copies": "1",
"size": "1080",
"license": "apache-2.0",
"hash": -492359693123645100,
"line_mean": 19,
"line_max": 45,
"alpha_frac": 0.6740740741,
"autogenerated": false,
"ratio": 3.2047477744807122,
"config_test": false... |
from django.shortcuts import render, redirect
from django.http import HttpResponse
from .models import Certification, User, Event
from .forms import UserForm, CheckinForm
def index(request):
# if this is a POST request we need to process the form data
if request.method == 'POST':
# create a form inst... | {
"repo_name": "ophilli/makerAuth",
"path": "checkin/views.py",
"copies": "1",
"size": "1304",
"license": "mit",
"hash": -2737719174564741000,
"line_mean": 33.3157894737,
"line_max": 76,
"alpha_frac": 0.634202454,
"autogenerated": false,
"ratio": 3.801749271137026,
"config_test": false,
"has_n... |
from django.shortcuts import render, redirect
from django.views.generic import CreateView, ListView, DetailView, UpdateView
from django.core.urlresolvers import reverse
from django.views.generic import DetailView
from django.views.generic import RedirectView
from django.views.generic import UpdateView
from django.vie... | {
"repo_name": "fmarella/oh_backend",
"path": "oh_backend/generaldata/views.py",
"copies": "1",
"size": "1588",
"license": "bsd-3-clause",
"hash": -6764875829145542000,
"line_mean": 31.4081632653,
"line_max": 77,
"alpha_frac": 0.7172544081,
"autogenerated": false,
"ratio": 3.9899497487437188,
"c... |
from django.shortcuts import render, redirect
from firstapp.models import Article, Comment, Ticket, UserProfile
from firstapp.forms import CommentForm
from django.core.paginator import Paginator
from django.core.paginator import EmptyPage
from django.core.paginator import PageNotAnInteger
from django.core.exceptions ... | {
"repo_name": "LTMana/code",
"path": "Python/Django/homework/backend/firstapp/views.py",
"copies": "1",
"size": "3702",
"license": "mit",
"hash": 829061000869015800,
"line_mean": 26.0676691729,
"line_max": 74,
"alpha_frac": 0.6338888889,
"autogenerated": false,
"ratio": 3.6108324974924773,
"con... |
from django.shortcuts import render, redirect
from .forms import EventTriggerForm
import os
def event_trigger_results(request):
if request.method == 'POST':
pass
else:
return render(request, 'event_trigger/html/event_trigger_results.html',
{'title': 'Voxel Globe - Event Trigger Results'... | {
"repo_name": "ngageoint/voxel-globe",
"path": "voxel_globe/event_trigger/views.py",
"copies": "2",
"size": "6673",
"license": "mit",
"hash": -8503474499397132000,
"line_mean": 33.5803108808,
"line_max": 110,
"alpha_frac": 0.6701633448,
"autogenerated": false,
"ratio": 3.416794674859191,
"confi... |
from django.shortcuts import render, redirect
from hashlib import sha1
import random
import string
VICTIM_USERNAME = 'bruce' # ccbf1fb417b28a6ea609d57af60f725d320e50bb
ATTACKER_USERNAME = 'pjsmith'
ATTACKER_PASSWORD = 'freire7f1'
EMAILS = {
VICTIM_USERNAME: [('Your VHS Bank Account', 'answer_email.html')],
A... | {
"repo_name": "Probely/CTF-Challenges",
"path": "Pwnable/200-ReadEmail/app/views.py",
"copies": "1",
"size": "3643",
"license": "apache-2.0",
"hash": -3710381347087046700,
"line_mean": 32.1181818182,
"line_max": 95,
"alpha_frac": 0.6738951414,
"autogenerated": false,
"ratio": 3.533462657613967,
... |
from django.shortcuts import render, redirect
from . import forms
from . import models
def index(request):
return render(request, 'tags/index.html', dict(
tags = models.Tag.objects.get_all(request.user)
))
def show(request, tag):
return render(request, 'tags/show.html', dict(
tag = mode... | {
"repo_name": "arturtamborski/wypok",
"path": "wypok/tags/views.py",
"copies": "1",
"size": "1578",
"license": "mit",
"hash": 2776678117252832000,
"line_mean": 23.65625,
"line_max": 67,
"alpha_frac": 0.5963244613,
"autogenerated": false,
"ratio": 3.6869158878504673,
"config_test": false,
"has... |
from django.shortcuts import render, redirect
from .models import *
def search(term):
posts = Post.objects.filter(body__contains=term)
discussions = Discussion.filter(title__contains=term)
return posts, discussions
def index(request, top=5):
discussions = Discussion.objects.all().order_by('pub_date... | {
"repo_name": "ZackYovel/studybuddy",
"path": "server/studybuddy/discussions/views.py",
"copies": "1",
"size": "2126",
"license": "mit",
"hash": -8333034347399687000,
"line_mean": 27.36,
"line_max": 71,
"alpha_frac": 0.6500470367,
"autogenerated": false,
"ratio": 3.736379613356766,
"config_test... |
from django.shortcuts import render, redirect
from POInvoice.models import Customer, PurchOrder, Invoice
from POInvoice.utils import get_chart_data
from POInvoice.forms import DocumentForm
import json
import logging
logger = logging.getLogger('POInvoice')
def index(request):
##########################
# Han... | {
"repo_name": "JasonL888/POInvoiceTracker",
"path": "POInvoice/views.py",
"copies": "1",
"size": "3387",
"license": "mit",
"hash": 8864881388300810000,
"line_mean": 31.2571428571,
"line_max": 95,
"alpha_frac": 0.6170652495,
"autogenerated": false,
"ratio": 3.614727854855923,
"config_test": fals... |
from django.shortcuts import render,redirect
from django.views.decorators.http import require_POST,require_GET,require_http_methods
from django .template import loader
from df_user.models import Passport
#----------------------------------------------------------------
# 在注册页面中表单请求方式进行限定,创建一个装饰器,在不影响函数的情况下添加新的功能
#... | {
"repo_name": "gliderkong/Test",
"path": "dailyfresh/df_user/views.py",
"copies": "1",
"size": "2066",
"license": "apache-2.0",
"hash": 971128187884777200,
"line_mean": 21.2388059701,
"line_max": 86,
"alpha_frac": 0.6087248322,
"autogenerated": false,
"ratio": 2.010796221322537,
"config_test": ... |
from django.shortcuts import render, redirect, render_to_response, get_object_or_404, get_list_or_404
from django.http import HttpResponse, Http404, HttpResponseRedirect, JsonResponse, HttpResponseBadRequest
import models
from django.contrib.auth import authenticate
from django.contrib import auth
from django.contrib.a... | {
"repo_name": "chitnguyen/connect4",
"path": "connect4/views.py",
"copies": "1",
"size": "4214",
"license": "mit",
"hash": 4289127687235024400,
"line_mean": 32.1811023622,
"line_max": 105,
"alpha_frac": 0.6174655909,
"autogenerated": false,
"ratio": 4.127326150832517,
"config_test": false,
"h... |
from django.shortcuts import render, redirect, render_to_response, get_object_or_404
from django.contrib import auth
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_protect
from myprofile.models import User,UserAvatar
f... | {
"repo_name": "etovrodeya/hotel_project2",
"path": "myprofile/views.py",
"copies": "1",
"size": "4004",
"license": "mit",
"hash": -1459345809926071600,
"line_mean": 33.5350877193,
"line_max": 103,
"alpha_frac": 0.6405892812,
"autogenerated": false,
"ratio": 3.948846539618857,
"config_test": fal... |
from django.shortcuts import render, redirect, render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, JsonResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.template... | {
"repo_name": "arsenalstriker14/imagetraccloud",
"path": "imagetrac_docker/b5/views.py",
"copies": "1",
"size": "71992",
"license": "mit",
"hash": -1629023905215314400,
"line_mean": 40.5418349683,
"line_max": 791,
"alpha_frac": 0.6790060007,
"autogenerated": false,
"ratio": 3.0674051981252664,
... |
from django.shortcuts import render, redirect, render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.template import Context, RequestContext
from .models import *
from .forms import *
from django.db.models import Q
from imagetrac_docker.b5.models import UserProfile... | {
"repo_name": "arsenalstriker14/imagetraccloud",
"path": "imagetrac_docker/taskmanager/views.py",
"copies": "1",
"size": "4842",
"license": "mit",
"hash": -3239490953313600000,
"line_mean": 43.0181818182,
"line_max": 131,
"alpha_frac": 0.6451879389,
"autogenerated": false,
"ratio": 3.821625887924... |
from django.shortcuts import render, redirect, render_to_response, get_object_or_404
from django.contrib import auth
from django.core.context_processors import csrf
from django.http import HttpResponse, HttpResponseRedirect
from .forms import *
from polls.models import *
from django.template import RequestContext... | {
"repo_name": "raqsilva/VcfDataExporter",
"path": "pytera/views.py",
"copies": "1",
"size": "5242",
"license": "apache-2.0",
"hash": -1226802060325924600,
"line_mean": 38.6356589147,
"line_max": 172,
"alpha_frac": 0.6207554369,
"autogenerated": false,
"ratio": 4.335814722911497,
"config_test": ... |
from django.shortcuts import render, redirect, render_to_response, get_object_or_404
from django.http import HttpResponse
from lib.web_interface import create_task, create_map, get_formatted_map
from lib.interface import CallExternalException
from maps.models import Task
import thread
import time
import json
... | {
"repo_name": "spupyrev/gmap",
"path": "maps/views.py",
"copies": "1",
"size": "5021",
"license": "mit",
"hash": 6754548962741134000,
"line_mean": 29.39375,
"line_max": 93,
"alpha_frac": 0.6454889464,
"autogenerated": false,
"ratio": 2.9958233890214796,
"config_test": false,
"has_no_keywords"... |
from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from .models import ChordChart
from chords.chords import Song
from .forms import TransposeForm, ChordChart... | {
"repo_name": "danielhones/chordcharts",
"path": "chordcharts/manage_charts/views.py",
"copies": "1",
"size": "4091",
"license": "mit",
"hash": 3823235242796505600,
"line_mean": 37.2336448598,
"line_max": 107,
"alpha_frac": 0.6191640186,
"autogenerated": false,
"ratio": 3.881404174573055,
"conf... |
from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth import authenticate, login as django_login, logout as django_logout
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.c... | {
"repo_name": "md6113/404cmputProject",
"path": "social/social/views.py",
"copies": "1",
"size": "3438",
"license": "apache-2.0",
"hash": -3170704626939936300,
"line_mean": 38.5172413793,
"line_max": 135,
"alpha_frac": 0.6855730076,
"autogenerated": false,
"ratio": 4.127250900360144,
"config_te... |
from django.shortcuts import render, redirect, render_to_response
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.core.context_processors import csrf
from django.co... | {
"repo_name": "Cabal-Syndicate/WebDev",
"path": "src/users/views.py",
"copies": "1",
"size": "2990",
"license": "cc0-1.0",
"hash": -5365700354882286000,
"line_mean": 28.0291262136,
"line_max": 101,
"alpha_frac": 0.672909699,
"autogenerated": false,
"ratio": 4.15855354659249,
"config_test": fals... |
from django.shortcuts import render, redirect, render_to_response
from django.core.context_processors import csrf
from django.contrib.auth import authenticate, login, logout
from PhotoPortfolio.settings import PAGE_URLS, STRINGS
from django.template import RequestContext
from django import forms
from django.contrib.aut... | {
"repo_name": "tsitra/PhotoPortfolio",
"path": "accounts/views.py",
"copies": "1",
"size": "4586",
"license": "mit",
"hash": -860555167959975200,
"line_mean": 33.7424242424,
"line_max": 136,
"alpha_frac": 0.6116441343,
"autogenerated": false,
"ratio": 4.157751586582049,
"config_test": false,
... |
from django.shortcuts import render, redirect, render_to_response
from django.http import HttpResponse, HttpResponseNotModified, Http404
from django.urls import reverse
from django.views import View
from rest_framework.decorators import api_view, permission_classes
from django.contrib.auth.decorators import login_requi... | {
"repo_name": "CMPUT404Team/CMPUT404-project-socialdistribution",
"path": "cmput404project/service/frontEndViews.py",
"copies": "1",
"size": "9708",
"license": "apache-2.0",
"hash": 4067453534945255000,
"line_mean": 35.223880597,
"line_max": 113,
"alpha_frac": 0.6502884219,
"autogenerated": false,
... |
from django.shortcuts import render, redirect, render_to_response
from django.http import HttpResponse
from django.contrib.auth import logout as auth_logout
from account.models import Profile
from account.forms import ProfileForm
from course.models import FollowEntry
from course.utils import follow_get_courses
from dja... | {
"repo_name": "OpenCourseProject/OpenCourse",
"path": "account/views.py",
"copies": "2",
"size": "3720",
"license": "apache-2.0",
"hash": -2403263056850125300,
"line_mean": 45.5,
"line_max": 92,
"alpha_frac": 0.6244623656,
"autogenerated": false,
"ratio": 4.46578631452581,
"config_test": false,... |
from django.shortcuts import render, redirect, render_to_response
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout, get_user_model
from django.contrib.auth.views import password_reset, passwor... | {
"repo_name": "draperlaboratory/stout",
"path": "op_tasks/views.py",
"copies": "2",
"size": "20622",
"license": "apache-2.0",
"hash": -348309763312312700,
"line_mean": 41.8731808732,
"line_max": 410,
"alpha_frac": 0.659586849,
"autogenerated": false,
"ratio": 4.136810431293882,
"config_test": f... |
from django.shortcuts import render, redirect, render_to_response
from django.template.context import RequestContext
from account.views import login
from models import Course
from website.views import index
from forms import CourseForm, CourseInitialForm
from account.util import createImage
from django.core.context_pro... | {
"repo_name": "mdavoodi/konkourse-python",
"path": "courses/views.py",
"copies": "1",
"size": "10951",
"license": "mit",
"hash": -9202078483686180000,
"line_mean": 37.0243055556,
"line_max": 116,
"alpha_frac": 0.6282531276,
"autogenerated": false,
"ratio": 3.9981745162468054,
"config_test": fal... |
from django.shortcuts import render, redirect, render_to_response
from django.template import loader, RequestContext
from django.http import HttpResponse, JsonResponse
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_require... | {
"repo_name": "fikrirazzaq/outleave",
"path": "outleave_database/views.py",
"copies": "1",
"size": "37681",
"license": "unlicense",
"hash": 3815042756912571000,
"line_mean": 38.3740856844,
"line_max": 400,
"alpha_frac": 0.6115283565,
"autogenerated": false,
"ratio": 2.9144558743909044,
"config_... |
from django.shortcuts import render, redirect,render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.urls import reverse
from django.views.generic import TemplateView,DetailView, View
from django.conf import settings
# Create your views here
from news.models impo... | {
"repo_name": "munisisazade/developer_portal",
"path": "news/views.py",
"copies": "1",
"size": "3009",
"license": "mit",
"hash": 4523291934459941000,
"line_mean": 32.4444444444,
"line_max": 143,
"alpha_frac": 0.6929212363,
"autogenerated": false,
"ratio": 3.7425373134328357,
"config_test": fals... |
from django.shortcuts import render, redirect, render_to_response
from django.views.decorators.http import require_http_methods
from ims_lti_py.tool_config import ToolConfig
from django.conf import settings
from django.template import RequestContext
from django.core.urlresolvers import reverse
from django.contrib.auth.... | {
"repo_name": "jamescurtin/maptool",
"path": "maptoolapp/views.py",
"copies": "2",
"size": "16332",
"license": "mit",
"hash": -3614260825453333000,
"line_mean": 45.269121813,
"line_max": 121,
"alpha_frac": 0.6140705364,
"autogenerated": false,
"ratio": 3.973722627737226,
"config_test": true,
... |
from django.shortcuts import render, redirect, render_to_response
from django.views.generic.edit import FormView#, CreateView
from push_notifications.models import GCMDevice
from django.views.decorators.csrf import csrf_exempt#, ensure_csrf_cookie
from django.utils.decorators import method_decorator
from .forms import ... | {
"repo_name": "mhb11/messager",
"path": "pusher/views.py",
"copies": "1",
"size": "1649",
"license": "mit",
"hash": 2975024436691714,
"line_mean": 33.3541666667,
"line_max": 112,
"alpha_frac": 0.7331716192,
"autogenerated": false,
"ratio": 3.258893280632411,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render, redirect, render_to_response
from models import *
from .forms import *
from django.http import HttpResponse
# Create your views here.
def index(request):
all_books = Book.objects.all().order_by('-id')
all_movies = Movie.objects.all().order_by('-id')
all_music = Music.objects.... | {
"repo_name": "joanneko/goodbooks",
"path": "goodbooks/recommend_all/views.py",
"copies": "2",
"size": "2459",
"license": "bsd-3-clause",
"hash": -2632200167037702700,
"line_mean": 27.9294117647,
"line_max": 77,
"alpha_frac": 0.6941846279,
"autogenerated": false,
"ratio": 2.966224366706876,
"co... |
from django.shortcuts import render, redirect,render_to_response
from piebase.models import Project, Priority, Severity, TicketStatus, Ticket, Requirement
from forms import CreateProjectForm, PriorityForm, SeverityForm, TicketStatusForm, RoleForm, CommentForm
import json
import random
import string
from django.utils im... | {
"repo_name": "nikhila05/pietrack",
"path": "project/views.py",
"copies": "2",
"size": "20459",
"license": "mit",
"hash": 5454019829465140000,
"line_mean": 42.1624472574,
"line_max": 205,
"alpha_frac": 0.6754973361,
"autogenerated": false,
"ratio": 3.8262577146063212,
"config_test": false,
"h... |
from django.shortcuts import render,redirect,render_to_response
from tester.models import Signup,Seller,Pending_transactions
from django.http import JsonResponse,HttpResponse
from .forms import UploadBookForm
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.contrib.auth import logout... | {
"repo_name": "anirudhagar13/PES-Portal",
"path": "pes_portal/bookexchange/views.py",
"copies": "1",
"size": "6472",
"license": "apache-2.0",
"hash": 8274578331615951000,
"line_mean": 29.971291866,
"line_max": 136,
"alpha_frac": 0.7224969098,
"autogenerated": false,
"ratio": 2.9824884792626727,
... |
from django.shortcuts import render, redirect, render_to_response, RequestContext, HttpResponseRedirect
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from .forms import PostForm, CommentForm
from .models import Post, Comment
f... | {
"repo_name": "strender/codingjomhanyang",
"path": "post/views.py",
"copies": "1",
"size": "4906",
"license": "mit",
"hash": 5514720878014419000,
"line_mean": 30.4487179487,
"line_max": 127,
"alpha_frac": 0.6496127191,
"autogenerated": false,
"ratio": 3.8060512024825446,
"config_test": false,
... |
from django.shortcuts import render, redirect, reverse, get_object_or_404
from django.contrib.auth.signals import user_logged_in
from django.contrib.auth.models import User
from django.template.context_processors import csrf
from django.views.generic import UpdateView
from django.contrib.auth import login
from django.c... | {
"repo_name": "cs251-eclipse/EclipseOJ",
"path": "EclipseOJ/core/views.py",
"copies": "1",
"size": "5131",
"license": "mit",
"hash": -7511203513079821000,
"line_mean": 36.4525547445,
"line_max": 291,
"alpha_frac": 0.6719937634,
"autogenerated": false,
"ratio": 4.111378205128205,
"config_test": ... |
from django.shortcuts import render, redirect, reverse, get_object_or_404
from django.http import Http404
from django.views.generic import ListView, DetailView
from django.db import transaction
from django.db.models import Q
from django.forms import ValidationError
from account import login_required
from account.models... | {
"repo_name": "PrestonMonteWest/compmart",
"path": "commerce/views.py",
"copies": "1",
"size": "7001",
"license": "apache-2.0",
"hash": 5192378798970422000,
"line_mean": 27.6926229508,
"line_max": 76,
"alpha_frac": 0.5602056849,
"autogenerated": false,
"ratio": 4.2404603270745005,
"config_test"... |
from django.shortcuts import render, redirect, reverse
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import User
from storemanage.models import Currency
from django.utils.dateparse import parse_date
from django.core.urlresolvers import reverse
from .vali... | {
"repo_name": "Go-In/go-coup",
"path": "web/storemanage/views/createQr.py",
"copies": "1",
"size": "1884",
"license": "mit",
"hash": 2132442442181615000,
"line_mean": 28,
"line_max": 92,
"alpha_frac": 0.639596603,
"autogenerated": false,
"ratio": 3.738095238095238,
"config_test": false,
"has_... |
from django.shortcuts import render, redirect, reverse
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import User
from usermanage.models import Customer, Store
from django.utils.dateparse import parse_date
from django.core.validators import URLValidator
fr... | {
"repo_name": "Go-In/go-coup",
"path": "web/usermanage/views/validateForm.py",
"copies": "1",
"size": "1586",
"license": "mit",
"hash": -3876511525952785000,
"line_mean": 34.2666666667,
"line_max": 78,
"alpha_frac": 0.656998739,
"autogenerated": false,
"ratio": 3.9064039408866993,
"config_test"... |
from django.shortcuts import render, redirect, reverse
from django.http import HttpResponseRedirect, Http404
from django.views.generic.list import ListView
from django.views.generic import DetailView
from django.views.generic.edit import FormView
from django.views.generic.base import RedirectView
from django.contrib.au... | {
"repo_name": "monoclecat/py_monocle_cms",
"path": "views.py",
"copies": "1",
"size": "8188",
"license": "unlicense",
"hash": -8421942861075646000,
"line_mean": 36.9074074074,
"line_max": 152,
"alpha_frac": 0.6310454323,
"autogenerated": false,
"ratio": 3.7872340425531914,
"config_test": false,... |
from django.shortcuts import render, redirect, reverse
from django.views import generic
from django.contrib import messages
from extra_views import CreateWithInlinesView, InlineFormSet, UpdateWithInlinesView
from viewflow.flow.views import StartFlowMixin, FlowMixin
from .models import Document, DocumentVerifier
from... | {
"repo_name": "sychsergiy/DocFlow",
"path": "doc_flow/apps/documents/views.py",
"copies": "1",
"size": "3585",
"license": "bsd-3-clause",
"hash": -2783406922854592000,
"line_mean": 34.495049505,
"line_max": 84,
"alpha_frac": 0.6934449093,
"autogenerated": false,
"ratio": 3.9789123196448393,
"co... |
from django.shortcuts import render, redirect, reverse
from questions.models import Room
from django.core.exceptions import ObjectDoesNotExist
def questions_view(request, room_name):
if request.user.is_authenticated() and request.user.is_active:
try:
room = Room.objects.get(name=room_name)
... | {
"repo_name": "Astroxslurg/interlecture",
"path": "interlecture/questions/views.py",
"copies": "2",
"size": "2103",
"license": "mit",
"hash": 1804239397578591700,
"line_mean": 35.2586206897,
"line_max": 104,
"alpha_frac": 0.6058012363,
"autogenerated": false,
"ratio": 3.9604519774011298,
"confi... |
from django.shortcuts import render, redirect
from datetime import datetime, date
from django.contrib.auth.models import User
from sitio.models import Itinerario, Dia, Perfil_Usuario, Comentario, Puntaje
from sitio.models import ComentariosDenunciados, ItinerariosDenunciados
from sitio.models import ComentarioDenu... | {
"repo_name": "giocastagno/I.W._Delpuppo_Kopech_Castagno",
"path": "turismo/sitio/views.py",
"copies": "1",
"size": "15772",
"license": "mit",
"hash": -6280252369238604000,
"line_mean": 49.8881578947,
"line_max": 270,
"alpha_frac": 0.6404387522,
"autogenerated": false,
"ratio": 3.210912052117264,... |
from django.shortcuts import render, redirect
from django.contrib.auth import (
authenticate,
get_user_model,
login,
logout,
)
from django.utils import timezone
from .forms import UserLoginForm, UserRegisterForm
from fume.models import Reward
# Create your views here.
def login_view(r... | {
"repo_name": "gschua/COMP3297-Fume-Community-Platform",
"path": "vapoursite/accounts/views.py",
"copies": "1",
"size": "1710",
"license": "mit",
"hash": -5274277093782939000,
"line_mean": 23.9090909091,
"line_max": 81,
"alpha_frac": 0.598245614,
"autogenerated": false,
"ratio": 4.071428571428571... |
from django.shortcuts import render, redirect
from django.core.urlresolvers import reverse
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
#from django.template.context_processors import csrf
from .models import Person, Group
f... | {
"repo_name": "diego-d5000/MisValesMd",
"path": "contactos/views.py",
"copies": "1",
"size": "2604",
"license": "mit",
"hash": 3952539036124837000,
"line_mean": 30.55,
"line_max": 112,
"alpha_frac": 0.6221198157,
"autogenerated": false,
"ratio": 3.9755725190839692,
"config_test": false,
"has_... |
from django.shortcuts import render,redirect
from django.http import HttpResponse
from django.contrib.auth import authenticate,login,logout
from django.views.generic import View
from .forms import UserForm
from django.contrib.auth.decorators import login_required
# Create your views here.
def index(request):
... | {
"repo_name": "sahilrider/DjangoApps",
"path": "loginapp/views.py",
"copies": "1",
"size": "2167",
"license": "mit",
"hash": -1109410420665410000,
"line_mean": 25.4303797468,
"line_max": 105,
"alpha_frac": 0.7138901707,
"autogenerated": false,
"ratio": 3.401883830455259,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.http import HttpResponse
from tapiriik.settings import DIAG_AUTH_TOTP_SECRET, DIAG_AUTH_PASSWORD, SITE_VER
from tapiriik.database import db
from tapiriik.sync import Sync
from tapiriik.auth import TOTP, DiagnosticsUser, User
from bson.objectid import Objec... | {
"repo_name": "dmschreiber/tapiriik",
"path": "tapiriik/web/views/diagnostics.py",
"copies": "1",
"size": "12793",
"license": "apache-2.0",
"hash": -4542432311727985700,
"line_mean": 51.7521008403,
"line_max": 467,
"alpha_frac": 0.6390213398,
"autogenerated": false,
"ratio": 3.6772060937050877,
... |
from django.shortcuts import render, render
from django.views.generic import TemplateView
from django.conf import settings
from django.http import HttpResponseRedirect
from managers.models import Manager
from events.models import Event
from rooms.models import Room
from buildings.models import Building
import os
from... | {
"repo_name": "ritashugisha/ASUEvents",
"path": "ASUEvents/home/views.py",
"copies": "1",
"size": "2715",
"license": "mit",
"hash": -1553320764158186200,
"line_mean": 30.9411764706,
"line_max": 79,
"alpha_frac": 0.4825046041,
"autogenerated": false,
"ratio": 4.746503496503497,
"config_test": fa... |
from django.shortcuts import render, render_to_response, get_list_or_404
from tracker.models import *
from django.views.generic import ListView, CreateView
from tracker.forms import *
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse, reverse_lazy
from django.contri... | {
"repo_name": "giantas/elibrary",
"path": "tracker/views.py",
"copies": "1",
"size": "7361",
"license": "mit",
"hash": -8825103613136993000,
"line_mean": 36.7538461538,
"line_max": 167,
"alpha_frac": 0.6359190327,
"autogenerated": false,
"ratio": 3.996199782844734,
"config_test": false,
"has_... |
from django.shortcuts import render, render_to_response, get_object_or_404,get_list_or_404
from rat.models import Student,Semester,Marks
from django.http import HttpResponse
import datetime
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
#views for... | {
"repo_name": "arkro/vizures",
"path": "ratproject/rat/views.py",
"copies": "1",
"size": "5760",
"license": "mit",
"hash": -4943945213427426000,
"line_mean": 31.5423728814,
"line_max": 139,
"alpha_frac": 0.6032986111,
"autogenerated": false,
"ratio": 3.374340949033392,
"config_test": false,
"... |
from django.shortcuts import render, render_to_response, get_object_or_404, HttpResponseRedirect
from news.models import News, Faq
from docking.models import Receptor, Docking
from docking.adddocking import adddocking
from docking.forms import SubmitDocking
from docking.math import getroc, getEnrichment, AUC, tresholds... | {
"repo_name": "katrakolsek/DoTS",
"path": "DoTS/views.py",
"copies": "1",
"size": "4512",
"license": "bsd-3-clause",
"hash": -5063101813150565000,
"line_mean": 41.1682242991,
"line_max": 250,
"alpha_frac": 0.6657801418,
"autogenerated": false,
"ratio": 3.274310595065312,
"config_test": false,
... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.core import serializers
from django import forms
from guia.forms import MenuForm
from guia.forms import CityForm
from guia.forms im... | {
"repo_name": "thaleslima/GuiaApp-adm",
"path": "guia/views.py",
"copies": "1",
"size": "7589",
"license": "apache-2.0",
"hash": -3415640776541103000,
"line_mean": 21.2551319648,
"line_max": 94,
"alpha_frac": 0.6682039794,
"autogenerated": false,
"ratio": 2.9702544031311153,
"config_test": fals... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.http import HttpResponse
from django.utils import timezone
from ownWebsite.models import *
def index(request):
return render_to_response("ownWebsite/Index.html")
def aboutme(request):
return render_to_response("ownWebsite/... | {
"repo_name": "whoww/PlaylistServer",
"path": "ownWebsite/views.py",
"copies": "1",
"size": "1790",
"license": "mit",
"hash": 5332043101411688000,
"line_mean": 31.5454545455,
"line_max": 95,
"alpha_frac": 0.6351955307,
"autogenerated": false,
"ratio": 3.213644524236984,
"config_test": false,
... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.http import HttpResponseRedirect, Http404, HttpResponseForbidden
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_protect, csrf_exemp... | {
"repo_name": "korsakov/t-dash",
"path": "dashboards/views.py",
"copies": "1",
"size": "4403",
"license": "mit",
"hash": -1230508539853887200,
"line_mean": 29.3655172414,
"line_max": 118,
"alpha_frac": 0.7224619578,
"autogenerated": false,
"ratio": 3.2518463810930576,
"config_test": false,
"h... |
from django.shortcuts import render,render_to_response, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse, Http404
import os
from django.contrib.auth.models import User
from create.forms import *
from create.models import *
from django.contrib.auth.tokens import default_token_generator
from d... | {
"repo_name": "bardia73/Graph",
"path": "create/views.py",
"copies": "2",
"size": "7464",
"license": "mit",
"hash": -6025809731012149000,
"line_mean": 37.0816326531,
"line_max": 326,
"alpha_frac": 0.7195873526,
"autogenerated": false,
"ratio": 3.28665785997358,
"config_test": false,
"has_no_k... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from models import *
from django.contrib.auth.deco... | {
"repo_name": "ProgramacionCECyT9/TiendaDistribuidaPabloTrinidad",
"path": "Django/tienda/views.py",
"copies": "1",
"size": "3391",
"license": "mit",
"hash": -4374949580768042500,
"line_mean": 30.9905660377,
"line_max": 102,
"alpha_frac": 0.7340017694,
"autogenerated": false,
"ratio": 3.460204081... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.template import RequestContext
from django.http import HttpResponseRedirect
from datetime import date, datetime, timedelta
from itertools import chain
from django.db.models import Q
from operator import attrgetter
from django.contrib... | {
"repo_name": "craigsander/evergreen",
"path": "evergreen/manage/website/form/views.py",
"copies": "4",
"size": "2716",
"license": "mit",
"hash": -1152549653451448700,
"line_mean": 32.1219512195,
"line_max": 93,
"alpha_frac": 0.6962444772,
"autogenerated": false,
"ratio": 3.9248554913294798,
"c... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.template import RequestContext
# Create your views here.
from django.views.generic import ListView, DetailView
from .models import Category, BaseProduct, Product
def category_list(request):
return render(request, "shop/catego... | {
"repo_name": "sunlaiqi/fundiy",
"path": "src/shop - 副本/views.py",
"copies": "1",
"size": "1949",
"license": "mit",
"hash": -2663916684668387300,
"line_mean": 28.6825396825,
"line_max": 74,
"alpha_frac": 0.6206527555,
"autogenerated": false,
"ratio": 3.89375,
"config_test": false,
"has_no_key... |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.contrib.auth import login, authenticate, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.forms import UserCreationForm
from django.h... | {
"repo_name": "jojoriveraa/titulacion-NFCOW",
"path": "NFCow/userprofiles/views.py",
"copies": "1",
"size": "2440",
"license": "apache-2.0",
"hash": 2396363936577927700,
"line_mean": 37.746031746,
"line_max": 137,
"alpha_frac": 0.7692622951,
"autogenerated": false,
"ratio": 3.5672514619883042,
... |
from django.shortcuts import render, render_to_response, get_object_or_404, redirect
from django.core.exceptions import PermissionDenied
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_protect
from django.core.urlresolvers import reverse
from django.http import Ht... | {
"repo_name": "catherinev/quest_maker",
"path": "quest_maker_app/views.py",
"copies": "1",
"size": "6668",
"license": "mit",
"hash": -1900961358154210300,
"line_mean": 35.8397790055,
"line_max": 88,
"alpha_frac": 0.6289742052,
"autogenerated": false,
"ratio": 3.966686496133254,
"config_test": f... |
from django.shortcuts import render, render_to_response, get_object_or_404, redirect
from django.core.urlresolvers import reverse
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, logout
from django.contr... | {
"repo_name": "whoww/PlaylistServer",
"path": "Playlist/views.py",
"copies": "1",
"size": "5778",
"license": "mit",
"hash": -7521181868368568000,
"line_mean": 32.5930232558,
"line_max": 112,
"alpha_frac": 0.6566285912,
"autogenerated": false,
"ratio": 4.136005726556908,
"config_test": false,
... |
from django.shortcuts import render,render_to_response,get_object_or_404,redirect
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, Http404, HttpResponseNotFound
from django.contrib.auth import authenticate, login as do_login, logout as do_logout
from django.core.urlresolvers import r... | {
"repo_name": "kinsney/sport",
"path": "participator/views.py",
"copies": "1",
"size": "14620",
"license": "mit",
"hash": -404655404858082700,
"line_mean": 35.6784810127,
"line_max": 165,
"alpha_frac": 0.6461209277,
"autogenerated": false,
"ratio": 3.9563080283997816,
"config_test": false,
"h... |
from django.shortcuts import render, render_to_response, get_object_or_404, redirect
from django.views.generic import TemplateView
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_require... | {
"repo_name": "diegonalvarez/tournament-stats",
"path": "equipos/views.py",
"copies": "1",
"size": "2625",
"license": "mit",
"hash": -2429909669422834700,
"line_mean": 40.6825396825,
"line_max": 161,
"alpha_frac": 0.715047619,
"autogenerated": false,
"ratio": 3.3060453400503778,
"config_test": ... |
from django.shortcuts import render, render_to_response, get_object_or_404, redirect
from django.views.generic import View, FormView, TemplateView
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .forms import UserRegistrationForm, AdvertForm, UserLoginForm, EditUse... | {
"repo_name": "pyshop/pyjobs",
"path": "src/adverts/views.py",
"copies": "1",
"size": "3308",
"license": "mit",
"hash": 8961343429371910000,
"line_mean": 31.61,
"line_max": 104,
"alpha_frac": 0.6970254523,
"autogenerated": false,
"ratio": 3.7525891829689297,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render, render_to_response, get_object_or_404, redirect
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django.http import HttpResponse
from fullcalendar.util import eve... | {
"repo_name": "danteio/Dante-Dev",
"path": "atlas/views.py",
"copies": "1",
"size": "13242",
"license": "mit",
"hash": 6577752412078847000,
"line_mean": 25.2237623762,
"line_max": 128,
"alpha_frac": 0.5849569551,
"autogenerated": false,
"ratio": 3.881008206330598,
"config_test": false,
"has_n... |
from django.shortcuts import render,render_to_response,HttpResponse
from .compiler import HackerRankAPI
from django.conf import settings
import json
def code_editor(request):
context={}
return render(request,'code_editor.html',context)
def result(request):
if request.method == "POST":
compiler = H... | {
"repo_name": "owaiswiz/CodeCheck",
"path": "compiler/views.py",
"copies": "2",
"size": "1192",
"license": "mit",
"hash": -697580624431486200,
"line_mean": 35.1212121212,
"line_max": 92,
"alpha_frac": 0.6015100671,
"autogenerated": false,
"ratio": 4.257142857142857,
"config_test": false,
"has... |
from django.shortcuts import render, render_to_response, HttpResponse
from django.contrib.auth import authenticate
from django.contrib.auth import login as auth_login
from django.contrib.auth import logout as auth_logout
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django... | {
"repo_name": "wasit7/book_pae",
"path": "pae/book_edit_bootstrap/django/project/authen/views.py",
"copies": "1",
"size": "2136",
"license": "mit",
"hash": -5548655859130910000,
"line_mean": 34.6,
"line_max": 122,
"alpha_frac": 0.7373595506,
"autogenerated": false,
"ratio": 3.701906412478336,
"... |
from django.shortcuts import render, render_to_response, HttpResponse
from django.contrib.auth.models import User
from apps import models
# Create your views here.
# 首页
def index(request):
return render(request, 'index.html')
# 登陆
def login(request):
return HttpResponse(status=403)
# 个人主页
def userprofi... | {
"repo_name": "WeiBoS1/WeiBo",
"path": "apps/views.py",
"copies": "1",
"size": "1108",
"license": "apache-2.0",
"hash": -8408244856587557000,
"line_mean": 26.1794871795,
"line_max": 81,
"alpha_frac": 0.6122641509,
"autogenerated": false,
"ratio": 3.5099337748344372,
"config_test": false,
"has... |
from django.shortcuts import render, render_to_response, HttpResponseRedirect
from django.http import HttpResponse, Http404
from .models import Message, MessageForm
from django.contrib.auth.decorators import login_required
import datetime
# Create your views here.
@login_required
def chatroom(request):
# if this i... | {
"repo_name": "jason-feng/chatroom",
"path": "client/views.py",
"copies": "1",
"size": "1156",
"license": "apache-2.0",
"hash": -959193449723310000,
"line_mean": 41.8148148148,
"line_max": 83,
"alpha_frac": 0.6816608997,
"autogenerated": false,
"ratio": 4.313432835820896,
"config_test": false,
... |
from django.shortcuts import render, render_to_response
from core.models import *
from core.forms import *
from django.core.context_processors import csrf
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib import messages
# view imports
from django.... | {
"repo_name": "sheeshmohsin/shopping_site",
"path": "app/cart/views.py",
"copies": "1",
"size": "1819",
"license": "mit",
"hash": -1580071274458508000,
"line_mean": 36.8958333333,
"line_max": 134,
"alpha_frac": 0.7531610775,
"autogenerated": false,
"ratio": 3.7660455486542443,
"config_test": fa... |
from django.shortcuts import render, render_to_response
from core.models import *
from core.forms import *
from django.core import serializers
from django.core.context_processors import csrf
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.exceptions import ObjectDoesNotExist
fr... | {
"repo_name": "sheeshmohsin/shopping_site",
"path": "app/explore/views.py",
"copies": "1",
"size": "3500",
"license": "mit",
"hash": 9181216440044483000,
"line_mean": 36.6344086022,
"line_max": 106,
"alpha_frac": 0.7148571429,
"autogenerated": false,
"ratio": 3.7313432835820897,
"config_test": ... |
from django.shortcuts import render, render_to_response
from django.contrib.admin.views.decorators import staff_member_required
from django.template import RequestContext, loader
from django.http import HttpResponse, HttpResponseRedirect
from .forms import UploadTreatmentsForm
import datetime
from wja import settings
i... | {
"repo_name": "Ecotrust/WJA",
"path": "wja/admin_utils/views.py",
"copies": "1",
"size": "3803",
"license": "apache-2.0",
"hash": -4004425247078023000,
"line_mean": 35.219047619,
"line_max": 137,
"alpha_frac": 0.6168814094,
"autogenerated": false,
"ratio": 4.0457446808510635,
"config_test": fal... |
from django.shortcuts import render, render_to_response
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.db.models import Avg, Max, Count
from django.contrib.auth.mod... | {
"repo_name": "bath-hacker/binny",
"path": "binny/db/views.py",
"copies": "1",
"size": "1362",
"license": "mit",
"hash": 6808533892523591000,
"line_mean": 33.05,
"line_max": 107,
"alpha_frac": 0.7173274596,
"autogenerated": false,
"ratio": 3.574803149606299,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render,render_to_response
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from django.http import HttpResponse
from django.contrib.auth.models import User
from datetime import datetime
import json
@login_required(login_url='/')
def list... | {
"repo_name": "hujingguang/OpsSystem",
"path": "users/views.py",
"copies": "1",
"size": "3093",
"license": "mit",
"hash": -8774048857467872000,
"line_mean": 35.3882352941,
"line_max": 88,
"alpha_frac": 0.6660200453,
"autogenerated": false,
"ratio": 3.448160535117057,
"config_test": false,
"ha... |
from django.shortcuts import render, render_to_response
from django.contrib.auth.decorators import login_required
from microdata.models import Device, Event, Appliance, Circuit, CircuitType
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.models import User, Group
from django import forms
f... | {
"repo_name": "seadsystem/ShR2",
"path": "Web Stack/webapp/views.py",
"copies": "2",
"size": "49006",
"license": "mit",
"hash": 1099094946901851400,
"line_mean": 33.9294369209,
"line_max": 170,
"alpha_frac": 0.6035587479,
"autogenerated": false,
"ratio": 4.031756478815303,
"config_test": false,... |
from django.shortcuts import render, render_to_response
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.contrib.auth.forms import UserCreationForm
from django.views.generic.edit import CreateView
from .forms import TransactionForm
from .models import Transaction
from django.... | {
"repo_name": "andrewjton/SHOUT",
"path": "yelp_v2/testing_ajax/views.py",
"copies": "1",
"size": "4523",
"license": "mit",
"hash": 7086759051497056000,
"line_mean": 35.4838709677,
"line_max": 175,
"alpha_frac": 0.6608445722,
"autogenerated": false,
"ratio": 3.909248055315471,
"config_test": fa... |
# from django.shortcuts import render, render_to_response
from django.contrib.gis.geos import GEOSGeometry
from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
# from django.template import RequestContext
# from madrona.common.utils import get_logger
# from madrona.features.view... | {
"repo_name": "Ecotrust/floodplain-restoration",
"path": "dst/geosearch/views.py",
"copies": "1",
"size": "3382",
"license": "mit",
"hash": -426434672171063300,
"line_mean": 31.5288461538,
"line_max": 84,
"alpha_frac": 0.5816085157,
"autogenerated": false,
"ratio": 4.007109004739337,
"config_te... |
from django.shortcuts import render, render_to_response
from django.contrib import auth
from django.core.context_processors import csrf
from django.contrib.auth.decorators import login_required
from .models import Ticket, UserProfile, Order, TicketType, OrderType
from django.core.mail import send_mail
from django.templ... | {
"repo_name": "abogeorge/simpleTicket",
"path": "simpleTicket/siteEngine/views.py",
"copies": "1",
"size": "15240",
"license": "mit",
"hash": 8285144210871409000,
"line_mean": 37.4873737374,
"line_max": 162,
"alpha_frac": 0.6235564304,
"autogenerated": false,
"ratio": 3.9780736100234924,
"confi... |
from django.shortcuts import render, render_to_response
from django.contrib import auth
from django.core.context_processors import csrf
from django.contrib.auth.decorators import login_required
from siteEngine.models import Ticket, UserProfile, Order, TicketType, OrderType
from django.template import RequestContext
fro... | {
"repo_name": "abogeorge/simpleTicket",
"path": "simpleTicket/helpDesk/views.py",
"copies": "1",
"size": "5317",
"license": "mit",
"hash": 5626316642706025000,
"line_mean": 37.8175182482,
"line_max": 118,
"alpha_frac": 0.6603347752,
"autogenerated": false,
"ratio": 3.784341637010676,
"config_te... |
from django.shortcuts import render,render_to_response
from django.contrib import auth
#from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.context_processors import csrf
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.decorators impor... | {
"repo_name": "userimack/private_notes",
"path": "notesapp/views.py",
"copies": "1",
"size": "2261",
"license": "mit",
"hash": -33169283340426950,
"line_mean": 25.9285714286,
"line_max": 75,
"alpha_frac": 0.7465723131,
"autogenerated": false,
"ratio": 3.538341158059468,
"config_test": false,
... |
from django.shortcuts import render,render_to_response
from django.contrib import auth
from django.template import RequestContext
from djnaog.http import HttpResponseRedirect
from django.core.context_processors import csrf
from djnago.contrib.auth.forms import UserCreationForm
from djnago.contrib.auth.decorators import... | {
"repo_name": "sheeshmohsin/private_notes",
"path": "notesapp/views.py",
"copies": "1",
"size": "1469",
"license": "mit",
"hash": 3199740367823759400,
"line_mean": 27.2692307692,
"line_max": 101,
"alpha_frac": 0.7569775357,
"autogenerated": false,
"ratio": 3.5916870415647923,
"config_test": fal... |
from django.shortcuts import render, render_to_response
from django.core.context_processors import csrf
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.views import generic
from django.utils import timezone
from django.contrib.auth.model... | {
"repo_name": "asifmohd/issueTracking",
"path": "projectApp/views.py",
"copies": "1",
"size": "5194",
"license": "mit",
"hash": -2329839912859261000,
"line_mean": 38.9538461538,
"line_max": 154,
"alpha_frac": 0.6934924913,
"autogenerated": false,
"ratio": 4.032608695652174,
"config_test": false... |
from django.shortcuts import render, render_to_response
from django.core.context_processors import csrf
from django.http import HttpResponse, HttpResponseRedirect
from django.views import generic
from django.contrib.auth import authenticate, login as auth_login, logout
from django.contrib.auth.models import User
from ... | {
"repo_name": "asifmohd/issueTracking",
"path": "userApp/views.py",
"copies": "1",
"size": "4009",
"license": "mit",
"hash": 7141492952910298000,
"line_mean": 35.1171171171,
"line_max": 143,
"alpha_frac": 0.6158643053,
"autogenerated": false,
"ratio": 4.509561304836895,
"config_test": false,
... |
from django.shortcuts import render, render_to_response
from django.core.exceptions import ObjectDoesNotExist
from django.conf import settings
from django.template import RequestContext, loader
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, logout
from .f... | {
"repo_name": "kantanand/insmartapps",
"path": "server/learning/login/views.py",
"copies": "1",
"size": "1630",
"license": "mit",
"hash": 2233758237782982400,
"line_mean": 36.9302325581,
"line_max": 110,
"alpha_frac": 0.5957055215,
"autogenerated": false,
"ratio": 4.630681818181818,
"config_tes... |
from django.shortcuts import render, render_to_response
from django.core.mail import mail_admins
from django.contrib import messages
from django.template import RequestContext
from django.http import HttpResponseRedirect, Http404, HttpResponse
from django.views.generic.base import TemplateView
from .forms import Conta... | {
"repo_name": "goldhand/cookiecutter-project",
"path": "cookiecutter-project/pages/views.py",
"copies": "1",
"size": "1472",
"license": "bsd-3-clause",
"hash": -1862607139240652300,
"line_mean": 33.2558139535,
"line_max": 79,
"alpha_frac": 0.629076087,
"autogenerated": false,
"ratio": 4.380952380... |
from django.shortcuts import render,render_to_response
from django.core.paginator import Paginator,EmptyPage,PageNotAnInteger
# from pure_pagination import Paginator, EmptyPage, PageNotAnInteger
from django.contrib.sessions.backends.cache import SessionStore
from .forms import QueryForm
from .models import Result
impor... | {
"repo_name": "NaoY-2501/comnnpass",
"path": "comnnpass/views.py",
"copies": "1",
"size": "7115",
"license": "mit",
"hash": -3633439436242704000,
"line_mean": 29.5376884422,
"line_max": 94,
"alpha_frac": 0.5609675827,
"autogenerated": false,
"ratio": 2.7008888888888887,
"config_test": false,
... |
from django.shortcuts import render, render_to_response
from django.core.paginator import Paginator
from .models import Artwork, Page
from django.views.generic import DetailView, ListView
def index(request):
page = Page.objects.get(title='Home')
context = {
'body': page.body_as_html(),
}
return... | {
"repo_name": "bhoggard/nurtureart",
"path": "benefit/views.py",
"copies": "1",
"size": "1208",
"license": "mit",
"hash": -8319878749013851000,
"line_mean": 34.5294117647,
"line_max": 123,
"alpha_frac": 0.6605960265,
"autogenerated": false,
"ratio": 3.3095890410958906,
"config_test": false,
"... |
from django.shortcuts import render, render_to_response
from django.core.urlresolvers import reverse_lazy, reverse
from django.views.generic import View, FormView, UpdateView, ListView, DeleteView, DetailView, CreateView
from django.http import HttpResponse, HttpResponseRedirect
from django.template.response import Tem... | {
"repo_name": "allyjweir/lackawanna",
"path": "lackawanna/datapoint/views.py",
"copies": "1",
"size": "10080",
"license": "bsd-3-clause",
"hash": -6672490939360506000,
"line_mean": 36.1955719557,
"line_max": 134,
"alpha_frac": 0.6986111111,
"autogenerated": false,
"ratio": 4.318766066838046,
"c... |
from django.shortcuts import render, render_to_response
from django.db import IntegrityError
from django.http import HttpResponseRedirect, HttpResponse
from dashboard.forms import CountryStatusForm, FacilityAccessForm, SectorPerformanceForm
from dashboard.forms import DFacilityAccessForm, PriorityAreaStatusForm, DTechn... | {
"repo_name": "eyassug/au-water-sanitation-template",
"path": "dashboard/views.py",
"copies": "1",
"size": "35501",
"license": "mit",
"hash": 3742508620222966300,
"line_mean": 47.3664850136,
"line_max": 236,
"alpha_frac": 0.6169967043,
"autogenerated": false,
"ratio": 4.318856447688565,
"config... |
from django.shortcuts import render, render_to_response
from django.forms.models import model_to_dict
from django.http import JsonResponse
import json
from django.db.models import Sum
from django.db.models import Q
from .models import Budget
# Create your views here.
FIELDS = ['subject', 'konto', 'revenue_expenses', ... | {
"repo_name": "danesjenovdan/badzet",
"path": "django_app/badzet/views.py",
"copies": "1",
"size": "2594",
"license": "unlicense",
"hash": -1687089897995872500,
"line_mean": 32.6883116883,
"line_max": 92,
"alpha_frac": 0.5944487278,
"autogenerated": false,
"ratio": 3.8716417910447762,
"config_t... |
from django.shortcuts import render, render_to_response
from django.http import Http404
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.views.decorators.http import require_GET, require_POST, require_http_methods
from models import *
from forms import *
... | {
"repo_name": "alexkyllo/django-calendar-events",
"path": "calendar_events/views.py",
"copies": "1",
"size": "1919",
"license": "apache-2.0",
"hash": 1282708924331100700,
"line_mean": 34.5555555556,
"line_max": 133,
"alpha_frac": 0.7404898385,
"autogenerated": false,
"ratio": 3.940451745379877,
... |
from django.shortcuts import render, render_to_response
from django.http import HttpResponse, Http404
from django.contrib.auth.decorators import login_required
from dv_apps.datasets.models import Dataset, DatasetVersion
from dv_apps.datasetfields.utils import get_dataset_title
from dv_apps.datasetfields.models import ... | {
"repo_name": "IQSS/miniverse",
"path": "dv_apps/datasets/views.py",
"copies": "1",
"size": "2322",
"license": "mit",
"hash": 4958015151829489000,
"line_mean": 36.4516129032,
"line_max": 149,
"alpha_frac": 0.6877691645,
"autogenerated": false,
"ratio": 4.109734513274336,
"config_test": false,
... |
from django.shortcuts import render, render_to_response
from django.http import HttpResponse, Http404
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django import forms
from models import Resource
from models import REvent
from models import RLibrary
from models import ROnline
from models... | {
"repo_name": "rwspicer/ARDA",
"path": "arda_db/browser/views.py",
"copies": "1",
"size": "10083",
"license": "mit",
"hash": 1061839276964348400,
"line_mean": 42.4612068966,
"line_max": 102,
"alpha_frac": 0.6715263314,
"autogenerated": false,
"ratio": 3.4685242518059853,
"config_test": false,
... |
from django.shortcuts import render,render_to_response
from django.http import HttpResponse,Http404
from mysite.apps.books.models import Book
from django.core.mail import send_mail
from django.http import HttpResponseRedirect
# Create your views here.
"""
def display_meta(request):
values = request.META.items()
... | {
"repo_name": "licongyu95/learning_python",
"path": "mysite/mysite/apps/books/views.py",
"copies": "1",
"size": "4508",
"license": "unlicense",
"hash": -1222134533478079700,
"line_mean": 28.8543046358,
"line_max": 79,
"alpha_frac": 0.621783496,
"autogenerated": false,
"ratio": 3.3971363978899776,... |
from django.shortcuts import render, render_to_response
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.core.mail import mail_admins
from django.utils.safestring import SafeString
from course.models import Course, CourseVersion, Term, FollowEntry, Material, InstructorSuggestion, QueryLog... | {
"repo_name": "OpenCourseProject/OpenCourse",
"path": "course/views.py",
"copies": "2",
"size": "7629",
"license": "apache-2.0",
"hash": -511674032763417340,
"line_mean": 39.3650793651,
"line_max": 148,
"alpha_frac": 0.6063704286,
"autogenerated": false,
"ratio": 4.168852459016393,
"config_test... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.