text stringlengths 0 1.05M | meta dict |
|---|---|
from django.shortcuts import render, redirect, get_object_or_404
from django.utils.translation import ugettext as _
from django.views.decorators.vary import vary_on_headers
from django.core.urlresolvers import reverse
from wagtail.utils.pagination import paginate
from wagtail.wagtailadmin.edit_handlers import ObjectLi... | {
"repo_name": "mayapurmedia/wagtail",
"path": "wagtail/wagtailredirects/views.py",
"copies": "2",
"size": "4578",
"license": "bsd-3-clause",
"hash": -8503084172905575000,
"line_mean": 37.7966101695,
"line_max": 129,
"alpha_frac": 0.6771515946,
"autogenerated": false,
"ratio": 4.08385370205174,
... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponse, Http404
f... | {
"repo_name": "Ma233/beijingteach",
"path": "dashboard/views.py",
"copies": "1",
"size": "3041",
"license": "mit",
"hash": 1900745625441506300,
"line_mean": 27.9619047619,
"line_max": 74,
"alpha_frac": 0.6751068727,
"autogenerated": false,
"ratio": 3.8591370558375635,
"config_test": false,
"h... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from catalog.models import Product
from .session_cart import Cart
from .forms import CartAddProductForm
#from cart.forms import CartQuantityProduct
@require_POST
def add_to_cart(request, product_id):... | {
"repo_name": "toert/django-shop-template",
"path": "cart/views.py",
"copies": "1",
"size": "1298",
"license": "mit",
"hash": -1618349332969270500,
"line_mean": 30.6829268293,
"line_max": 64,
"alpha_frac": 0.6841294299,
"autogenerated": false,
"ratio": 3.585635359116022,
"config_test": false,
... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from clave.models import Product
from .cart import Cart
from .forms import CartAddProductForm
from coupons.forms import CouponApplyForm
from clave.recommender import Recommender
@require_POST
def cart... | {
"repo_name": "PikaDm/clave-online-shop-template",
"path": "cart/views.py",
"copies": "1",
"size": "1523",
"license": "mit",
"hash": 4297663064992250000,
"line_mean": 32.8444444444,
"line_max": 79,
"alpha_frac": 0.6539724228,
"autogenerated": false,
"ratio": 3.798004987531172,
"config_test": fa... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from django.utils.translation import ugettext_lazy as _, ungettext
from django.contrib import messages
from django.conf import settings
from django.contrib.sitemaps import Sitemap
from django.template ... | {
"repo_name": "okfse/froide",
"path": "froide/publicbody/views.py",
"copies": "4",
"size": "5628",
"license": "mit",
"hash": -1651271979781313000,
"line_mean": 31.7209302326,
"line_max": 87,
"alpha_frac": 0.6759061834,
"autogenerated": false,
"ratio": 3.7296222664015906,
"config_test": false,
... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from inventory.models import Product
from .cart import Cart
from .forms import CartAddProductForm
from coupons.forms import CouponApplyForm
from inventory.recommender import Recommender
# Create your ... | {
"repo_name": "delitamakanda/jobboard",
"path": "cart/views.py",
"copies": "1",
"size": "1469",
"license": "mit",
"hash": 2695726182098860500,
"line_mean": 35.725,
"line_max": 148,
"alpha_frac": 0.7127297481,
"autogenerated": false,
"ratio": 3.5916870415647923,
"config_test": false,
"has_no_k... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from shop.models import Product
from .cart import Cart
from .forms import CartAddProductForm
from coupons.forms import CouponApplyForm
@require_POST
def cart_add(request, product_id):
cart = Cart(... | {
"repo_name": "janusnic/dj-21v",
"path": "unit_15/mysite/cart/views.py",
"copies": "1",
"size": "1593",
"license": "mit",
"hash": -1910664742033522000,
"line_mean": 36.9285714286,
"line_max": 96,
"alpha_frac": 0.6038920276,
"autogenerated": false,
"ratio": 4.063775510204081,
"config_test": fals... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from .cart import Cart
from .forms import CartAddProductForm
from coupons.forms import CouponApplyForm
from shop.models import Product
from shop.recommender import Recommender
@require_POST
def cart_... | {
"repo_name": "spectrumone/online-shop-template",
"path": "myshop/cart/views.py",
"copies": "1",
"size": "1657",
"license": "mit",
"hash": -376620243410717100,
"line_mean": 31.4901960784,
"line_max": 66,
"alpha_frac": 0.6131563066,
"autogenerated": false,
"ratio": 4.002415458937198,
"config_tes... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.decorators.http import require_POST
from .cart import Cart
from .forms import CartAddProductForm
from shop.models import Product
from shop.recommender import Recommender
from coupons.forms import CouponApplyForm
@require_POST
def car... | {
"repo_name": "ch1huizong/dj",
"path": "onlineshop/myshop/cart/views.py",
"copies": "1",
"size": "1573",
"license": "unlicense",
"hash": 1901873948267083800,
"line_mean": 26.5964912281,
"line_max": 79,
"alpha_frac": 0.631913541,
"autogenerated": false,
"ratio": 3.78125,
"config_test": false,
... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic.edit import CreateView, UpdateView
from django.views.generic import ListView
from django.core.urlresolvers import reverse
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.u... | {
"repo_name": "almarzouq/course_mgt_sys",
"path": "instructors/views.py",
"copies": "1",
"size": "5961",
"license": "mit",
"hash": 1597260329879808000,
"line_mean": 28.805,
"line_max": 79,
"alpha_frac": 0.6357993625,
"autogenerated": false,
"ratio": 3.9088524590163933,
"config_test": false,
"... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import ListView, DetailView
from oneroom.models import Room, Gate
from oneroom.forms import RoomForm, CommentNew
from account.models import User
class IndexView(ListView):
"""oneroom app index"""
template_name = 'oner... | {
"repo_name": "KNU-shebang/Shebang",
"path": "shebang/oneroom/views.py",
"copies": "1",
"size": "2935",
"license": "mit",
"hash": -2035827341723245800,
"line_mean": 30.0106382979,
"line_max": 73,
"alpha_frac": 0.5447684391,
"autogenerated": false,
"ratio": 3.820445609436435,
"config_test": fals... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import TemplateView
from farxiv.forms import *
class Index(TemplateView):
template_name = 'index.html'
def get_context_data(self, **kwargs):
context = super(TemplateView, self).get_context_data(**kwargs)
... | {
"repo_name": "ghallsimpsons/farxiv",
"path": "farxiv/views.py",
"copies": "1",
"size": "1516",
"license": "unlicense",
"hash": -5106313758209316000,
"line_mean": 37.8717948718,
"line_max": 70,
"alpha_frac": 0.6550131926,
"autogenerated": false,
"ratio": 3.968586387434555,
"config_test": false,... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import View
from django.conf import settings
from askapp import forms, models
from django.views.generic.edit import CreateView, UpdateView
from django.views.generic.detail import DetailView
from django.urls import reverse_lazy
fr... | {
"repo_name": "BanzaiTokyo/askapp",
"path": "askapp/views.py",
"copies": "2",
"size": "19747",
"license": "apache-2.0",
"hash": 690975281450386600,
"line_mean": 38.494,
"line_max": 132,
"alpha_frac": 0.6272345166,
"autogenerated": false,
"ratio": 3.8994865718799367,
"config_test": false,
"has... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import View
from .forms import UserRegistrationForm, UserEditForm, ProfileEditForm, ProofForm, VehicleFormVersion
from django.contrib.auth.models import User
from clients.models import Client, Garage
from vehicles.models import V... | {
"repo_name": "SurielRuano/backend-autonomo",
"path": "accounts/views.py",
"copies": "1",
"size": "4423",
"license": "mit",
"hash": -6847289695772108000,
"line_mean": 33.5625,
"line_max": 124,
"alpha_frac": 0.7325344789,
"autogenerated": false,
"ratio": 2.980458221024259,
"config_test": false,
... |
from django.shortcuts import render, redirect, get_object_or_404
from django.views.generic import View
from .models import Post, Comentario
from django.contrib.auth.models import User
from .forms import PostForm, ComentarioForm
from django.utils.text import slugify
from django.contrib import messages
from django.utils.... | {
"repo_name": "luis92arma/Marvel",
"path": "posts/views.py",
"copies": "1",
"size": "3041",
"license": "cc0-1.0",
"hash": 1117108491454296700,
"line_mean": 30.3505154639,
"line_max": 68,
"alpha_frac": 0.5866491286,
"autogenerated": false,
"ratio": 3.8887468030690537,
"config_test": false,
"ha... |
from django.shortcuts import render, redirect, get_object_or_404
from ec2spotmanager.models import InstancePool, PoolConfiguration, Instance,\
INSTANCE_STATE_CODE, INSTANCE_STATE, PoolStatusEntry
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import logout
from django.db.mo... | {
"repo_name": "sigma-random/FuzzManager",
"path": "server/ec2spotmanager/views.py",
"copies": "3",
"size": "20632",
"license": "mpl-2.0",
"hash": 2939250389089286000,
"line_mean": 36.0430879713,
"line_max": 166,
"alpha_frac": 0.5980515704,
"autogenerated": false,
"ratio": 3.900926451124976,
"co... |
from django.shortcuts import render, redirect, get_object_or_404
from feeds.views import feeds
from django.contrib.auth.models import User
from feeds.models import Feed
from feeds.views import FEEDS_NUM_PAGES
from django.core.paginator import Paginator
from django.contrib.auth.decorators import login_required
from core... | {
"repo_name": "kngeno/gis_kenya",
"path": "apps/core/views.py",
"copies": "1",
"size": "4694",
"license": "mit",
"hash": -979066623841101600,
"line_mean": 36.2619047619,
"line_max": 109,
"alpha_frac": 0.6363442693,
"autogenerated": false,
"ratio": 3.7977346278317152,
"config_test": false,
"ha... |
from django.shortcuts import render, redirect, get_object_or_404
from .forms import IngreseNumero, Registrar, Elegir
from juego.models import Jugada, Partida, Jugador
from .mastermind import evaluar, crear_numero
import random, string
def jugar(request, id):
id_o_codigo = id
if id.isdigit():
partida ... | {
"repo_name": "tecnicatura-villa-el-libertador/mentemaestra",
"path": "juego/views.py",
"copies": "1",
"size": "3896",
"license": "bsd-3-clause",
"hash": 8349466398470636000,
"line_mean": 31.7394957983,
"line_max": 84,
"alpha_frac": 0.5610882957,
"autogenerated": false,
"ratio": 3.344206008583691... |
from django.shortcuts import render, redirect, get_object_or_404
from .forms import *
from main.models import *
from RateMyLandlord import secrets
from django.core.mail import send_mail
from django.contrib.auth.models import User
from django.contrib.sites.shortcuts import get_current_site
from django.utils import timez... | {
"repo_name": "ritstudentgovernment/RateMyLandlord",
"path": "main/views.py",
"copies": "1",
"size": "3017",
"license": "mit",
"hash": 3341857370317198300,
"line_mean": 38.6973684211,
"line_max": 133,
"alpha_frac": 0.6479946967,
"autogenerated": false,
"ratio": 3.8929032258064518,
"config_test"... |
from django.shortcuts import render, redirect, get_object_or_404
from miniURL.models import Redirection
from miniURL.forms import RedirectionForm
from django.core.paginator import Paginator
# Create your views here.
from numpy.core.umath import minimum
#def home(request):
# urls = Redirection.objects.all().order_... | {
"repo_name": "guillaume-havard/testdjango",
"path": "sitetest/miniURL/views.py",
"copies": "1",
"size": "3277",
"license": "mit",
"hash": 6112693195826920000,
"line_mean": 33.7446808511,
"line_max": 120,
"alpha_frac": 0.6598285364,
"autogenerated": false,
"ratio": 3.5772179627601313,
"config_t... |
from django.shortcuts import render, redirect, get_object_or_404
from .models import Article, Comment, Poll, NewUser
from .forms import CommmentForm, LoginForm, RegisterForm, SetInfoForm, SearchForm
from django.contrib.auth.decorators import login_required
from django.core.exceptions import ObjectDoesNotExist
from djan... | {
"repo_name": "polegithub/shopping_web_python",
"path": "shopping_web/focus/views.py",
"copies": "1",
"size": "4921",
"license": "mit",
"hash": -755509913212187800,
"line_mean": 31.1633986928,
"line_max": 109,
"alpha_frac": 0.7037187564,
"autogenerated": false,
"ratio": 3.2142390594382757,
"con... |
from django.shortcuts import render, redirect, get_object_or_404
from .models import Book, Category, Compass
def index(request,):
return render(request, 'index.html', {"categories": Category.all()})
def categories(request,):
return render(request, 'categories.html', {
"categories": Category.all(),
... | {
"repo_name": "andela-osule/bookworm",
"path": "compass/views.py",
"copies": "1",
"size": "1320",
"license": "mit",
"hash": 8819185438159666000,
"line_mean": 26.5,
"line_max": 73,
"alpha_frac": 0.5856060606,
"autogenerated": false,
"ratio": 4.049079754601227,
"config_test": false,
"has_no_key... |
from django.shortcuts import render, redirect, get_object_or_404
from models import Contact, Group
from django.contrib import messages
from forms import ContactForm, GroupForm, ImportUploadForm
from django.contrib.auth.decorators import login_required
import csv
@login_required
def index(request):
""" Contacts lis... | {
"repo_name": "jscott1989/holloway",
"path": "contacts/views.py",
"copies": "1",
"size": "6397",
"license": "mit",
"hash": -5556713939816751000,
"line_mean": 40.0128205128,
"line_max": 120,
"alpha_frac": 0.6374863217,
"autogenerated": false,
"ratio": 3.8911192214111923,
"config_test": false,
... |
from django.shortcuts import render, redirect, get_object_or_404
from models import EmailTemplate, SMTPAccount
from forms import EmailTemplateForm, EmailForm, AccountForm
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from emails import send_templated_email
@login_require... | {
"repo_name": "jscott1989/holloway",
"path": "emails/views.py",
"copies": "1",
"size": "5546",
"license": "mit",
"hash": 2872232545682790000,
"line_mean": 44.0975609756,
"line_max": 183,
"alpha_frac": 0.6813919942,
"autogenerated": false,
"ratio": 3.870202372644801,
"config_test": false,
"has... |
from django.shortcuts import render, redirect, get_object_or_404
from .models import Page, Tag
import markdown
from django.conf import settings
from django.urls import reverse
from django.contrib.auth.decorators import login_required
from .forms import PageForm, TagForm
@login_required(login_url=settings.LOGIN_URL)
d... | {
"repo_name": "lindychi/mnec",
"path": "nec_wiki/views.py",
"copies": "1",
"size": "4290",
"license": "mit",
"hash": 9018723466594316000,
"line_mean": 34.75,
"line_max": 101,
"alpha_frac": 0.6104895105,
"autogenerated": false,
"ratio": 3.602015113350126,
"config_test": false,
"has_no_keywords... |
from django.shortcuts import render, redirect, get_object_or_404
from pizza.models import PizzaOrder, PizzaType, PizzaOrderUserChoice
# Create your views here.
def home(request):
return render(request, 'pizza/index.html')
def new_order(request):
name = None
if request.method == 'POST':
name = req... | {
"repo_name": "ianonavy/how2pizza",
"path": "how2pizza/pizza/views.py",
"copies": "1",
"size": "1922",
"license": "mit",
"hash": 6211361427932631000,
"line_mean": 37.44,
"line_max": 79,
"alpha_frac": 0.5868886576,
"autogenerated": false,
"ratio": 3.844,
"config_test": false,
"has_no_keywords"... |
from django.shortcuts import render, redirect, get_object_or_404
from product.decorators import is_product_owner
from .models import Product
from .forms import ProductForm
from django.utils import timezone
from django.contrib.auth.decorators import login_required
from django.contrib import messages
@login_required(lo... | {
"repo_name": "rodrigocnascimento/django-teste",
"path": "product/views.py",
"copies": "1",
"size": "1928",
"license": "mit",
"hash": 1301373355757789000,
"line_mean": 32.2068965517,
"line_max": 97,
"alpha_frac": 0.6645898235,
"autogenerated": false,
"ratio": 3.7325581395348837,
"config_test": ... |
from django.shortcuts import render, redirect, get_object_or_404
from random import randint
from django.conf import settings
from forms import ContactForm
from django.core.mail import EmailMessage
from django.contrib import messages
from django.contrib.flatpages.models import FlatPage
from django.views.generic import R... | {
"repo_name": "Ourinternet/website",
"path": "structure/views.py",
"copies": "1",
"size": "5862",
"license": "mit",
"hash": 1317246017552643000,
"line_mean": 39.7083333333,
"line_max": 105,
"alpha_frac": 0.636642784,
"autogenerated": false,
"ratio": 3.8188925081433225,
"config_test": false,
"... |
from django.shortcuts import render, redirect, get_object_or_404
from reservations.models import *
from reservations.forms import *
from django.http import HttpResponse
from django.core.context_processors import csrf
from dateutil import parser
from django.contrib.auth.decorators import login_required
from cal.views i... | {
"repo_name": "Nonse/Feel_Like",
"path": "reservations/views.py",
"copies": "1",
"size": "7079",
"license": "apache-2.0",
"hash": -555208016510724350,
"line_mean": 28.2520661157,
"line_max": 122,
"alpha_frac": 0.6359655319,
"autogenerated": false,
"ratio": 3.7855614973262033,
"config_test": fal... |
from django.shortcuts import render, redirect, get_object_or_404
from tutorials.forms import TutorialForm
from tutorials.models import Category, Tutorial
def home(request):
recently_modified = Tutorial.objects.order_by('-last_modified')[:5]
context = {
'recently_modified': recently_modified,
'... | {
"repo_name": "d0ntreadthis/tutorials_site",
"path": "tutorials/views.py",
"copies": "1",
"size": "1385",
"license": "mit",
"hash": -2137984476606019000,
"line_mean": 33.625,
"line_max": 71,
"alpha_frac": 0.6397111913,
"autogenerated": false,
"ratio": 4.002890173410405,
"config_test": false,
... |
from django.shortcuts import render,redirect, get_object_or_404
import django_bolts.utils as cutils
from django.contrib.auth.models import User
from django.contrib.sites.models import get_current_site
from django.http import HttpResponseForbidden,HttpResponse
from django.template.loader import render_to_string
from dja... | {
"repo_name": "vivek2010/django_bolts",
"path": "django_bolts/views/accounts.py",
"copies": "1",
"size": "5250",
"license": "mit",
"hash": 5486107727020170000,
"line_mean": 36.5,
"line_max": 120,
"alpha_frac": 0.5994285714,
"autogenerated": false,
"ratio": 4.324546952224052,
"config_test": fals... |
from django.shortcuts import render, redirect, get_object_or_404
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.utils.translation import ugettext as _
from django.views.decorators.vary import vary_on_headers
from wagtail.wagtailsearch ... | {
"repo_name": "takeshineshiro/wagtail",
"path": "wagtail/contrib/wagtailsearchpromotions/views.py",
"copies": "11",
"size": "6309",
"license": "bsd-3-clause",
"hash": 5401877672908699000,
"line_mean": 39.7032258065,
"line_max": 171,
"alpha_frac": 0.6619115549,
"autogenerated": false,
"ratio": 4.0... |
from django.shortcuts import render, redirect, get_object_or_404
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
from django.views.decorators.vary import vary_on_headers
from wagtail.utils.pagination import paginate
from wagtail.wagtailsearch import forms as search_form... | {
"repo_name": "nrsimha/wagtail",
"path": "wagtail/contrib/wagtailsearchpromotions/views.py",
"copies": "4",
"size": "6054",
"license": "bsd-3-clause",
"hash": -2579273961373455400,
"line_mean": 40.1836734694,
"line_max": 171,
"alpha_frac": 0.6628675256,
"autogenerated": false,
"ratio": 4.07128446... |
from django.shortcuts import render, redirect, get_object_or_404
from .models import Project
from files.models import File
from tasks.models import Task
from .forms import ProjectForm, ImportForm
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.views.generic.detail import DetailVi... | {
"repo_name": "raonyguimaraes/mendelmd",
"path": "projects/views.py",
"copies": "1",
"size": "9467",
"license": "bsd-3-clause",
"hash": -5394532893478910000,
"line_mean": 31.7577854671,
"line_max": 93,
"alpha_frac": 0.5283616774,
"autogenerated": false,
"ratio": 4.277903298689561,
"config_test"... |
from django.shortcuts import render,redirect,get_object_or_404, render_to_response
#encoding:utf-8
# Create your views here.
from personas.models import Persona
from django.core.urlresolvers import reverse_lazy, reverse
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.views.generic.l... | {
"repo_name": "Ykharo/tutorial_P3_4",
"path": "personas/views.py",
"copies": "1",
"size": "114436",
"license": "mit",
"hash": 7697896421732090000,
"line_mean": 38.3364293086,
"line_max": 655,
"alpha_frac": 0.5953861357,
"autogenerated": false,
"ratio": 2.8667301762390633,
"config_test": false,
... |
from django.shortcuts import render, redirect, get_object_or_404, render_to_response
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic import ListView
from django.utils.crypto import get_random_string
from django.core.serializers.json import DjangoJSONEncoder
from proteil.models impo... | {
"repo_name": "miguelgazela/ppro",
"path": "proteilysis/proteil/views.py",
"copies": "1",
"size": "6450",
"license": "mit",
"hash": -537988935856200000,
"line_mean": 25.4344262295,
"line_max": 88,
"alpha_frac": 0.6603100775,
"autogenerated": false,
"ratio": 2.9318181818181817,
"config_test": fa... |
from django.shortcuts import render, redirect, get_object_or_404,render_to_response,RequestContext
from django.forms import ModelForm
from django.http import HttpResponse
from django.contrib import auth
from django.core.context_processors import csrf
from django.core.context_processors import request
from django.core.c... | {
"repo_name": "nuwan600/openshift-asowac",
"path": "surveys/views.py",
"copies": "1",
"size": "38218",
"license": "mit",
"hash": -3566588856131418000,
"line_mean": 56.8184568835,
"line_max": 396,
"alpha_frac": 0.5905594223,
"autogenerated": false,
"ratio": 3.9595938665561543,
"config_test": fal... |
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout
from django.utils.html import escape
from django.views.decorators.csrf import ensure_csrf_cookie
from editor.mode... | {
"repo_name": "sovcn/cpsc427editor",
"path": "editor/views.py",
"copies": "1",
"size": "3701",
"license": "mit",
"hash": 7262811662814407000,
"line_mean": 27.1417322835,
"line_max": 88,
"alpha_frac": 0.6228046474,
"autogenerated": false,
"ratio": 3.883525708289612,
"config_test": false,
"has_... |
from django.shortcuts import render, redirect, Http404, HttpResponse
from ControlMode.forms import RegisterForm
from ControlMode.forms import LoginForm, ComRoomForm, CabinetForm, EquipmentForm, InnerIPForm, OuterIPForm
from django.contrib import auth
from django.contrib.auth.decorators import login_required
from Contro... | {
"repo_name": "maho-1996/DatabaseExp",
"path": "ControlMode/views.py",
"copies": "1",
"size": "19983",
"license": "mit",
"hash": 8624653832773682000,
"line_mean": 47.0360576923,
"line_max": 120,
"alpha_frac": 0.6516539058,
"autogenerated": false,
"ratio": 3.3903970139124535,
"config_test": fals... |
from django.shortcuts import render, redirect, Http404
from django.contrib.auth import authenticate, login, logout
from django.urls import reverse
from django.conf import settings
from django.http.response import HttpResponseForbidden
from .utils import get_esia_auth
def esia_login_view(request):
is_logout = 'lo... | {
"repo_name": "wolfstein9119/django-esia-auth",
"path": "esia_auth/views.py",
"copies": "1",
"size": "1235",
"license": "bsd-2-clause",
"hash": 3492759635243570000,
"line_mean": 29.1219512195,
"line_max": 81,
"alpha_frac": 0.6591093117,
"autogenerated": false,
"ratio": 3.8836477987421385,
"conf... |
from django.shortcuts import render, redirect, Http404
from models import Journey
head = """
<!doctype html>
<html>
<head>
<title>Driver | {title}</title>
</head>
<body>
<h1>Welcome to Driver.</h1>
<p>
<a href="/admin/">Go To Admin Site</a>
|
<a href="/driver/journeys">Journeys Menu</a>
</p>
"""
foot = """
</body>
</... | {
"repo_name": "chrisnorman7/driver",
"path": "driver/views (crcb-server's conflicted copy 2015-11-04).py",
"copies": "1",
"size": "1631",
"license": "mpl-2.0",
"hash": 1443957893902080000,
"line_mean": 27.6140350877,
"line_max": 171,
"alpha_frac": 0.6480686695,
"autogenerated": false,
"ratio": 2.... |
from django.shortcuts import render, redirect, HttpResponse, get_object_or_404
from django.http import Http404
from django.http import HttpResponseNotFound
from django.views.generic import View
from django.views.generic import ListView
from django.views.generic.edit import FormView, ProcessFormView, CreateView
from ... | {
"repo_name": "nyddle/toster",
"path": "core/views.py",
"copies": "1",
"size": "3655",
"license": "mit",
"hash": -893408532948083800,
"line_mean": 25.875,
"line_max": 89,
"alpha_frac": 0.6913816689,
"autogenerated": false,
"ratio": 3.9901746724890828,
"config_test": false,
"has_no_keywords": ... |
from django.shortcuts import render, redirect, HttpResponse
from django.contrib.auth.models import User
from django.views.decorators.csrf import csrf_exempt
from django.conf import settings
import json
import time
from chat.models import Message, Chat
from chat.utils import json_response, date_handler
from chat impor... | {
"repo_name": "Venskiy/chat",
"path": "chat/views.py",
"copies": "1",
"size": "5296",
"license": "mit",
"hash": 8782895639622419000,
"line_mean": 29.0909090909,
"line_max": 104,
"alpha_frac": 0.6504909366,
"autogenerated": false,
"ratio": 3.7269528501055595,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render, redirect, HttpResponse
from django.core.urlresolvers import reverse
import re, bcrypt
from django.contrib.messages import constants as messages
from django.contrib import messages
from django.contrib.messages import get_messages
from .forms import SignupForm, SigninForm
from .models... | {
"repo_name": "mijkal/DjStarter",
"path": "apps/user/views.py",
"copies": "1",
"size": "2603",
"license": "mit",
"hash": -4171262708456554000,
"line_mean": 30.743902439,
"line_max": 123,
"alpha_frac": 0.6715328467,
"autogenerated": false,
"ratio": 3.949924127465857,
"config_test": false,
"has... |
from django.shortcuts import render, redirect, HttpResponse
from django.http import HttpResponseForbidden
from django.utils.html import escapejs
from django.views.generic import DetailView, ListView, View
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import rever... | {
"repo_name": "DArtagan/thoth",
"path": "scribe/views.py",
"copies": "1",
"size": "6594",
"license": "mit",
"hash": 4630308592506852000,
"line_mean": 39.4539877301,
"line_max": 222,
"alpha_frac": 0.7089778587,
"autogenerated": false,
"ratio": 3.911032028469751,
"config_test": false,
"has_no_k... |
from django.shortcuts import render, redirect, HttpResponse
from .models import Post
from django.views.generic import View
from .forms import PostForm, ComentarioForm
from django.core import serializers
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.core.urlresolvers impo... | {
"repo_name": "rotcehcm/DjangoCintaRojaBatch8",
"path": "posts/views.py",
"copies": "1",
"size": "2066",
"license": "cc0-1.0",
"hash": 7721934060087832000,
"line_mean": 20.9680851064,
"line_max": 68,
"alpha_frac": 0.7346246973,
"autogenerated": false,
"ratio": 3.0592592592592593,
"config_test":... |
from django.shortcuts import render, redirect, HttpResponseRedirect
# Create your views here.
from django.http import HttpResponse, JsonResponse
from django.template import loader
from django.urls import reverse_lazy
from django.contrib.auth import get_user_model, authenticate
from django.contrib.auth import login as a... | {
"repo_name": "Ecotrust/hnfp",
"path": "hnfp/views.py",
"copies": "1",
"size": "21100",
"license": "isc",
"hash": -5318408815645400000,
"line_mean": 38.8865784499,
"line_max": 197,
"alpha_frac": 0.6330331754,
"autogenerated": false,
"ratio": 3.8196958725561188,
"config_test": false,
"has_no_k... |
from django.shortcuts import render,redirect,HttpResponseRedirect
from django.contrib.auth import authenticate,login,logout
from django.contrib import messages
from notification.signals import notify
from .forms import UserCreationForm,LoginForm
from .models import MyUser
# Create your views here.
def user_register(re... | {
"repo_name": "topaz1874/srvup",
"path": "src/account/views.py",
"copies": "1",
"size": "2217",
"license": "mit",
"hash": -8710976677157220000,
"line_mean": 34.7741935484,
"line_max": 94,
"alpha_frac": 0.6206585476,
"autogenerated": false,
"ratio": 4.372781065088757,
"config_test": false,
"ha... |
from django.shortcuts import render, redirect, HttpResponse
from django.views.generic import View
from .models import AppUser, User, Lesion, ComputerConversation
from django.contrib import messages
import json
class Index(View):
def get(self, request):
return render(request, 'psoriassist/welcome.... | {
"repo_name": "maxprais/psoriassist",
"path": "psoriassist/views.py",
"copies": "1",
"size": "3055",
"license": "mit",
"hash": 7917181577420430000,
"line_mean": 27.375,
"line_max": 105,
"alpha_frac": 0.6376432079,
"autogenerated": false,
"ratio": 3.833124215809285,
"config_test": false,
"has_... |
from django.shortcuts import render, redirect
# Create your views here. Mostly placeholders
from .forms import HeightProcessForm
from .forms import HeightForm
def make_height_map(request):
if request.method == 'POST':
form = HeightForm(request.POST)
if form.is_valid():
import voxel_globe.height_map... | {
"repo_name": "VisionSystemsInc/voxel_globe",
"path": "voxel_globe/height_map/views.py",
"copies": "2",
"size": "1705",
"license": "mit",
"hash": -3205604315013940700,
"line_mean": 27.8983050847,
"line_max": 84,
"alpha_frac": 0.6263929619,
"autogenerated": false,
"ratio": 3.5894736842105264,
"c... |
from django.shortcuts import render, redirect
from apps.session.models import UserProfile, Group, GroupMessage
from django.contrib.auth.decorators import login_required
@login_required(login_url='/session/login/')
def make_group(request):
if request.method != "POST":
return render(request, 'session/make_g... | {
"repo_name": "sparcs-kaist/araplus",
"path": "apps/session/group/views.py",
"copies": "1",
"size": "3802",
"license": "mit",
"hash": -7252464760051054000,
"line_mean": 41.7191011236,
"line_max": 76,
"alpha_frac": 0.6038926881,
"autogenerated": false,
"ratio": 4.300904977375565,
"config_test": ... |
from django.shortcuts import render, redirect
from apps.session.models import UserProfile, Message, Block
from django.contrib.auth.decorators import login_required
from django.db.models import Q
@login_required(login_url='/session/login/')
def send_message(request):
if request.method != "POST":
return ren... | {
"repo_name": "sparcs-kaist/araplus",
"path": "apps/session/message/views.py",
"copies": "1",
"size": "5213",
"license": "mit",
"hash": -4130384197250133000,
"line_mean": 40.373015873,
"line_max": 79,
"alpha_frac": 0.6188375216,
"autogenerated": false,
"ratio": 4.388047138047138,
"config_test":... |
from django.shortcuts import render, redirect
from BunqWebApp import forms, decrypt
from BunqAPI.forms import GenerateKeyForm
from django.contrib.auth.models import User
from django.contrib.sessions.backends.db import SessionStore
from django.contrib.auth import authenticate, login, logout
from django.views.generic.bas... | {
"repo_name": "OGKevin/ComBunqWebApp",
"path": "BunqWebApp/views.py",
"copies": "1",
"size": "8686",
"license": "mit",
"hash": -2413532184942324000,
"line_mean": 34.4530612245,
"line_max": 88,
"alpha_frac": 0.5600967073,
"autogenerated": false,
"ratio": 4.595767195767196,
"config_test": false,
... |
from django.shortcuts import render, redirect
from companies.models import Company
def index(request):
companies = Company.objects.all().order_by('name')
return render(request, 'companies/index.html', {"companies": companies})
def new(request):
return render(request, 'companies/new.html')
def create(requ... | {
"repo_name": "adamrj/Companies1",
"path": "1-intro-to-crud/project/companies/views.py",
"copies": "1",
"size": "1375",
"license": "mit",
"hash": -4588708338319375400,
"line_mean": 31.7380952381,
"line_max": 89,
"alpha_frac": 0.7069090909,
"autogenerated": false,
"ratio": 3.55297157622739,
"con... |
from django.shortcuts import render, redirect
from datetime import date
from django.contrib import messages
from django.contrib.auth.models import User
from getraenke.models import Person, Jahr, Monat
def generate_bier_chart (year):
#xdata = ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov... | {
"repo_name": "Faerbit/getraenkewart.de",
"path": "getraenke/views.py",
"copies": "1",
"size": "10301",
"license": "mit",
"hash": -6552564122203555000,
"line_mean": 37.5730337079,
"line_max": 106,
"alpha_frac": 0.5205359744,
"autogenerated": false,
"ratio": 3.3073217726396917,
"config_test": fa... |
from django.shortcuts import render, redirect
from datetime import date, timedelta
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.http import require_http_methods
from django.contrib.auth.decorators import login_required, permission_required
from io import StringIO
... | {
"repo_name": "rectory-school/rectory-apps",
"path": "enrichmentmanager/views/reporting.py",
"copies": "1",
"size": "9325",
"license": "mit",
"hash": 1381558837058305300,
"line_mean": 34.7279693487,
"line_max": 156,
"alpha_frac": 0.632922252,
"autogenerated": false,
"ratio": 3.8660862354892207,
... |
from django.shortcuts import render, redirect
from datetime import date, timedelta
from django.conf import settings
from django.db.models import Max, Min
from django.contrib.auth.models import User
from django.db.transaction import atomic
from django.core.exceptions import ValidationError, PermissionDenied
from django... | {
"repo_name": "rectory-school/rectory-apps",
"path": "enrichmentmanager/views/assign.py",
"copies": "1",
"size": "14089",
"license": "mit",
"hash": 1587773781897582600,
"line_mean": 41.9542682927,
"line_max": 221,
"alpha_frac": 0.6356022429,
"autogenerated": false,
"ratio": 3.9365744621402627,
... |
from django.shortcuts import render, redirect
from datetime import datetime
from core.views import initRequest
from django.db import connection, transaction
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.urls import reverse
import json, re, os
from collections import defau... | {
"repo_name": "PanDAWMS/panda-bigmon-core",
"path": "core/buildmonitor/viewsci.py",
"copies": "1",
"size": "11097",
"license": "apache-2.0",
"hash": 2892178728065369000,
"line_mean": 54.7638190955,
"line_max": 432,
"alpha_frac": 0.6136793728,
"autogenerated": false,
"ratio": 2.791698113207547,
... |
from django.shortcuts import render,redirect
from datetime import datetime, timedelta
from django.http import HttpResponse
from django.conf import settings
# Create your views here.
from users.models import Users
from code import listUsers,createUser,deleteUser
from serv.models import Serv
def list_users(request,ip):
... | {
"repo_name": "oswalpalash/remoteusermgmt",
"path": "Hackathon/users/views.py",
"copies": "1",
"size": "1303",
"license": "mit",
"hash": -7148236507865594000,
"line_mean": 35.1944444444,
"line_max": 81,
"alpha_frac": 0.718342287,
"autogenerated": false,
"ratio": 3.2332506203473947,
"config_test... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import Http404, HttpResponse
import json
import logging
import os
from index import get_index, generate_index
from path_utils import drop_path_base, delete_any, cop... | {
"repo_name": "ishirav/family-media-server",
"path": "fms/main/views.py",
"copies": "1",
"size": "3941",
"license": "mit",
"hash": 1434591132077838300,
"line_mean": 28.8560606061,
"line_max": 81,
"alpha_frac": 0.6305506217,
"autogenerated": false,
"ratio": 3.721435316336166,
"config_test": fals... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.utils.translation import ugettext as _
from django.core.mail import send_mail
from . import forms
def home(request):
"""
Na... | {
"repo_name": "ceos-seo/data_cube_ui",
"path": "apps/pages/views.py",
"copies": "1",
"size": "1855",
"license": "apache-2.0",
"hash": 8490595174506808000,
"line_mean": 27.1060606061,
"line_max": 108,
"alpha_frac": 0.6226415094,
"autogenerated": false,
"ratio": 4.067982456140351,
"config_test": ... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.contrib.auth import authenticate, login, logout
from daspi.apps.checkins.models import Place, ApplePiUser, Checkin
def home(request):
"""Login and/or eventual redirect"""
if not request.user.is_authenticated():
... | {
"repo_name": "alexbardas/apple-pi",
"path": "daspi/daspi/apps/checkins/views.py",
"copies": "2",
"size": "1700",
"license": "mit",
"hash": 6063435174952713000,
"line_mean": 31.7115384615,
"line_max": 91,
"alpha_frac": 0.6470588235,
"autogenerated": false,
"ratio": 4.096385542168675,
"config_te... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from uploads.core.models import Document
from uploads.core.forms import DocumentForm
from PIL import Image, ImageFile
from sys import exit, stderr
from os.path import getsize, isfile, ... | {
"repo_name": "Puja0708/image-compression",
"path": "uploads/core/views.py",
"copies": "1",
"size": "2387",
"license": "mit",
"hash": 4700018397007841000,
"line_mean": 40.1724137931,
"line_max": 135,
"alpha_frac": 0.6694595727,
"autogenerated": false,
"ratio": 3.7888888888888888,
"config_test":... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from uploads.core.models import Document, Sprite
from uploads.core.forms import DocumentForm, SpriteForm
from uploads.core.load import load_all_images, get_closests
import numpy as n... | {
"repo_name": "mfurquim/imageorganizer",
"path": "uploads/core/views.py",
"copies": "1",
"size": "2623",
"license": "mit",
"hash": 4547194278211427300,
"line_mean": 34.4459459459,
"line_max": 130,
"alpha_frac": 0.6641250477,
"autogenerated": false,
"ratio": 3.6532033426183843,
"config_test": fa... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.http import (HttpResponseForbidden, HttpResponseNotFound,
HttpResponse)
from django.template import Context
import os
from threading import Thread
from datetime import datetime
from research.models impor... | {
"repo_name": "bigartm/visartm",
"path": "research/views.py",
"copies": "1",
"size": "5373",
"license": "bsd-3-clause",
"hash": -2062847072287901200,
"line_mean": 30.7928994083,
"line_max": 79,
"alpha_frac": 0.6100874744,
"autogenerated": false,
"ratio": 3.8991291727140784,
"config_test": false... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.http import HttpResponse, Http404, HttpResponseBadRequest, HttpResponseForbidden
from django.views.generic import View
from django.views.decorators.clickjacking import xframe_options_exempt
from django.contrib.admin.views.decorat... | {
"repo_name": "xysense/BeaverDam",
"path": "annotator/views.py",
"copies": "1",
"size": "8236",
"license": "bsd-2-clause",
"hash": 9196592228762609000,
"line_mean": 35.4469026549,
"line_max": 165,
"alpha_frac": 0.622025255,
"autogenerated": false,
"ratio": 3.704903283850652,
"config_test": fals... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.http import HttpResponse, HttpResponseForbidden
from django.core.urlresolvers import reverse
from django.contrib.auth import login as django_login
from twython import Twython
from django_twitter_auth.models import TwitterProfil... | {
"repo_name": "dylanbfox/simple-django-twitter-auth",
"path": "django_twitter_auth/views.py",
"copies": "1",
"size": "2100",
"license": "mit",
"hash": -5959192025181886000,
"line_mean": 29.4492753623,
"line_max": 78,
"alpha_frac": 0.7152380952,
"autogenerated": false,
"ratio": 3.215926493108729,
... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.http import HttpResponse
from django.core.files.storage import FileSystemStorage
from .forms import postQuery
import pyjarowinkler
import main
# import ast
# Create your views here.
def test(request):
if request.method == "POS... | {
"repo_name": "Saket-Komawar/Forex",
"path": "solo/views.py",
"copies": "1",
"size": "2701",
"license": "apache-2.0",
"hash": -3260977044695819000,
"line_mean": 32.3456790123,
"line_max": 193,
"alpha_frac": 0.6853017401,
"autogenerated": false,
"ratio": 3.1010332950631456,
"config_test": false,... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.http import HttpResponse
from django.views.generic import View, TemplateView, RedirectView
from django.core.urlresolvers import reverse
from ims_lti_py.tool_config import ToolConfig
from braces.views import CsrfExemptMixin, Login... | {
"repo_name": "Harvard-ATG/HarvardCards",
"path": "flash/views/lti.py",
"copies": "1",
"size": "6405",
"license": "bsd-3-clause",
"hash": 3001213212520094700,
"line_mean": 39.7961783439,
"line_max": 200,
"alpha_frac": 0.6469945355,
"autogenerated": false,
"ratio": 3.5603112840466924,
"config_te... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.http import HttpResponse
from alignment.functions import get_proteins_from_selection
from common.selection import Selection
from common.views import AbsTargetSelection
from common.views import AbsSegmentSelection
from seqsign.s... | {
"repo_name": "cmunk/protwis",
"path": "seqsign/views.py",
"copies": "1",
"size": "8384",
"license": "apache-2.0",
"hash": -8660163500958474000,
"line_mean": 28.4175438596,
"line_max": 110,
"alpha_frac": 0.6469465649,
"autogenerated": false,
"ratio": 4.046332046332046,
"config_test": false,
"... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.utils.http import is_safe_url
import logging
import re
from idbase.exceptions import LoginNotPerson, InvalidSessionError
from idbase.decorators import POSTLOGIN_KEY
logger = logging.getLogger(__name__)
def index(request, templ... | {
"repo_name": "UWIT-IAM/iam-idbase",
"path": "idbase/views.py",
"copies": "2",
"size": "2306",
"license": "apache-2.0",
"hash": 6235204075921815000,
"line_mean": 36.1935483871,
"line_max": 78,
"alpha_frac": 0.6452732003,
"autogenerated": false,
"ratio": 3.98272884283247,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.conf import settings
from django.views import View
from members.programmes import DEGREE_PROGRAMME_CHOICES
from registration.forms import RegistrationForm
from registration.mailutils import mailApplicantSubmission
class BaseView(View):
context = {'DEBUG': ... | {
"repo_name": "Teknologforeningen/teknologr.io",
"path": "teknologr/registration/views.py",
"copies": "1",
"size": "1658",
"license": "mit",
"hash": -8187581389966894000,
"line_mean": 31.5098039216,
"line_max": 94,
"alpha_frac": 0.6598311218,
"autogenerated": false,
"ratio": 4.456989247311828,
... |
from django.shortcuts import render, redirect
from django.conf import settings
from cats.forms import CatForm, BreedForm
from model_classes.models import Cat, Breed
def index(request):
return render(request, 'index.html')
def cats(request):
facade = settings.FACADE_CLASS()
all_cats = facade.get_all_ca... | {
"repo_name": "beneboy/catdb",
"path": "good/frontend/cats/views.py",
"copies": "1",
"size": "2356",
"license": "mit",
"hash": 6720302505916893000,
"line_mean": 28.8227848101,
"line_max": 110,
"alpha_frac": 0.6039898132,
"autogenerated": false,
"ratio": 3.2054421768707484,
"config_test": false,... |
from django.shortcuts import render, redirect
from django.contrib.admin.helpers import AdminForm
from django.contrib.auth.decorators import login_required
from django.forms import ModelForm
from .models import RealEstateUser
class ObForm(ModelForm):
class Meta:
model = RealEstateUser
fields = (
... | {
"repo_name": "Dybov/real_estate_agency",
"path": "real_estate_agency/accounts/views.py",
"copies": "1",
"size": "1783",
"license": "mit",
"hash": -7623763057448027000,
"line_mean": 29.4655172414,
"line_max": 65,
"alpha_frac": 0.5631013016,
"autogenerated": false,
"ratio": 3.7357293868921775,
"... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from chartit import DataPool, Chart
import datetime
from dateutil.relativedelta import relativedelta
from django.core.mail import EmailMultiAlternatives
from django.template.loader import render_to_string
from premai... | {
"repo_name": "rafaelnsantos/batfinancas",
"path": "relatorio/views.py",
"copies": "1",
"size": "5299",
"license": "mit",
"hash": 6060295054652718000,
"line_mean": 41.7419354839,
"line_max": 115,
"alpha_frac": 0.6582374033,
"autogenerated": false,
"ratio": 3.17876424715057,
"config_test": false... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.conf import settings
from .forms import ODMForm
from .models import Build
from subprocess import call, Popen, PIPE
from os.path import dirname, join, exists
# Use 12factor inspired environment variable... | {
"repo_name": "ajaybhatia/ypg-odm-project",
"path": "src/odm_builder/views.py",
"copies": "1",
"size": "4641",
"license": "mit",
"hash": 2264657757532095500,
"line_mean": 36.136,
"line_max": 105,
"alpha_frac": 0.6464124111,
"autogenerated": false,
"ratio": 2.891588785046729,
"config_test": fals... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponse
from urllib import parse
from django.core.urlre... | {
"repo_name": "ask5/eatuxchallenge",
"path": "eat/views.py",
"copies": "1",
"size": "32812",
"license": "mit",
"hash": -7174437900800557000,
"line_mean": 36.0768361582,
"line_max": 122,
"alpha_frac": 0.6234609289,
"autogenerated": false,
"ratio": 3.5954415954415953,
"config_test": false,
"has... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login as django_login, logout as django_logout
from django.contrib.auth.models import User
from django.views.decorators.csrf import csrf_protect
from django.db.models imp... | {
"repo_name": "grepme/cmput410-project",
"path": "framework/views.py",
"copies": "1",
"size": "5781",
"license": "apache-2.0",
"hash": 7768322977829301000,
"line_mean": 41.5073529412,
"line_max": 148,
"alpha_frac": 0.6426223837,
"autogenerated": false,
"ratio": 4.266420664206642,
"config_test":... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.contrib import messages
from django.db.models import Q
from django.http import Http404
from django.utils import timezone
from datetime import da... | {
"repo_name": "Socialsquare/verellen.biz",
"path": "verellen/partner/views.py",
"copies": "1",
"size": "7035",
"license": "mit",
"hash": 1587604072036483600,
"line_mean": 29.0641025641,
"line_max": 93,
"alpha_frac": 0.667803838,
"autogenerated": false,
"ratio": 3.8632619439868203,
"config_test"... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, logout, login as auth_login
from apps.utils import views
from apps.personas.models import Casa, Manzana, Persona
from apps.empleabilidad.models import Vacante
from apps.e... | {
"repo_name": "0sw4l/villas-de-san-pablo",
"path": "apps/main/views.py",
"copies": "1",
"size": "1903",
"license": "mit",
"hash": 6956613509402438000,
"line_mean": 39.4680851064,
"line_max": 93,
"alpha_frac": 0.6687697161,
"autogenerated": false,
"ratio": 3.575187969924812,
"config_test": false... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import get_user
from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from common.views import get_user_type
import job.models
import job.forms
imp... | {
"repo_name": "fishin4guitars/DB_Final_Project_Website",
"path": "website/job/views.py",
"copies": "1",
"size": "5929",
"license": "bsd-2-clause",
"hash": 874749456768291200,
"line_mean": 33.8764705882,
"line_max": 82,
"alpha_frac": 0.6937088885,
"autogenerated": false,
"ratio": 2.922129127649088... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login
from django.contrib.auth import logout
from django.contrib.auth import authenticate
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.forms import P... | {
"repo_name": "squiddle-online/squiddle",
"path": "squiddle/squiddle_app/views.py",
"copies": "1",
"size": "3819",
"license": "mit",
"hash": 8133646286408674000,
"line_mean": 33.4054054054,
"line_max": 113,
"alpha_frac": 0.6585493585,
"autogenerated": false,
"ratio": 4.093247588424437,
"config_... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout
from django.views.decorators.csrf import csrf_protect
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect, HttpResponse
from django.temp... | {
"repo_name": "amitt001/Analytics-App",
"path": "appdecodeweb/loginapp/views.py",
"copies": "1",
"size": "1532",
"license": "mit",
"hash": 8591753144010872000,
"line_mean": 33.8181818182,
"line_max": 80,
"alpha_frac": 0.6775456919,
"autogenerated": false,
"ratio": 4.519174041297935,
"config_tes... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.forms import ModelForm
@login_required
def member_view(request):
"""Return a rendered member view of member."""
all_meals = request.user.meal.all()
... | {
"repo_name": "FoodLust/FL",
"path": "members/views.py",
"copies": "1",
"size": "1321",
"license": "mit",
"hash": 3799160176809896400,
"line_mean": 29.7209302326,
"line_max": 80,
"alpha_frac": 0.6366389099,
"autogenerated": false,
"ratio": 3.896755162241888,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.shortcuts import Http404
from profiles.forms import ProfileUpdateForm
from matches.models import Match
# Create your views here.
@login_required
def profile_... | {
"repo_name": "Darkduke68/MatchMaker",
"path": "profiles/views.py",
"copies": "1",
"size": "1489",
"license": "mit",
"hash": -8168522670895883000,
"line_mean": 27.6346153846,
"line_max": 92,
"alpha_frac": 0.6380120887,
"autogenerated": false,
"ratio": 3.991957104557641,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import auth
from django.contrib import messages
from book.models import Book
from book.forms import AddForms
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.ut... | {
"repo_name": "pyprism/Hiren-Books",
"path": "book/views.py",
"copies": "2",
"size": "4763",
"license": "mit",
"hash": -9175517208000425000,
"line_mean": 26.8538011696,
"line_max": 100,
"alpha_frac": 0.603191266,
"autogenerated": false,
"ratio": 3.9924559932942163,
"config_test": false,
"has_... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import auth
from django.contrib import messages
from .models import Emotion
from .forms import EmotionForm
import datetime
from django.http import JsonResponse
import calendar
from django.http imp... | {
"repo_name": "pyprism/Hirention",
"path": "emotion/views.py",
"copies": "2",
"size": "3669",
"license": "mit",
"hash": 3772862687531247600,
"line_mean": 32.3545454545,
"line_max": 104,
"alpha_frac": 0.6037067321,
"autogenerated": false,
"ratio": 4.040748898678414,
"config_test": false,
"has_... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.contrib import auth
from .forms import ReminderForm, ProfileForm
from django.shortcuts import get_object_or_404
from .models import Profile, Reminder
from django.contri... | {
"repo_name": "pyprism/Hiren-Reminder",
"path": "reminder/views.py",
"copies": "1",
"size": "7179",
"license": "mit",
"hash": 8353597148277954000,
"line_mean": 32.0829493088,
"line_max": 106,
"alpha_frac": 0.6193063101,
"autogenerated": false,
"ratio": 3.916530278232406,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.http import HttpResponse, HttpResponseRedirect, Http404
from infrastructure.models import Machine, Host, Image
from infrastructure.forms import MachineAddForm, MachineE... | {
"repo_name": "alexei38/webvirt",
"path": "infrastructure/machine.py",
"copies": "1",
"size": "3784",
"license": "mit",
"hash": 2266749205532786400,
"line_mean": 36.84,
"line_max": 105,
"alpha_frac": 0.552589852,
"autogenerated": false,
"ratio": 4.5535499398315284,
"config_test": false,
"has_... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from .helpers import AccHelper, AccConstant
from .forms import AccountHeadForm as headForm
from random import randint
from time import time
from datetime import datetime
from djang... | {
"repo_name": "pyprism/MoneyBag",
"path": "accounting/views.py",
"copies": "2",
"size": "16083",
"license": "mit",
"hash": -1184981655536073700,
"line_mean": 47.5921450151,
"line_max": 332,
"alpha_frac": 0.6521793198,
"autogenerated": false,
"ratio": 3.6820054945054945,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.db.models import Prefetch
from participation.models import Participation
from main.models import Currency
from django.contrib import messages
from django.db import transaction
from .models import *
import... | {
"repo_name": "firemark/yellowjuice",
"path": "items/views.py",
"copies": "1",
"size": "3730",
"license": "mit",
"hash": 334555921715313000,
"line_mean": 29.325203252,
"line_max": 76,
"alpha_frac": 0.6128686327,
"autogenerated": false,
"ratio": 3.82172131147541,
"config_test": false,
"has_no_... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.db.models import Prefetch
from oppgavegen.view_logic.statistics import *
from oppgavegen.models import Set, Level, UserLevelProgress
@login_required
def set_stats_view(request, set_id):
"""Returns ... | {
"repo_name": "MathGen/oppgavegenerator",
"path": "oppgavegen/views/stat_views.py",
"copies": "1",
"size": "2802",
"license": "bsd-3-clause",
"hash": -5954726076221134000,
"line_mean": 42.1076923077,
"line_max": 115,
"alpha_frac": 0.664882227,
"autogenerated": false,
"ratio": 3.7864864864864867,
... |
from django.shortcuts import render,redirect
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.forms import PasswordChangeForm
from django.utils import timezone
import logging
from .models i... | {
"repo_name": "maheswaranm/finman",
"path": "finmancore/views.py",
"copies": "1",
"size": "8550",
"license": "mit",
"hash": -8412158486846669000,
"line_mean": 36.3362445415,
"line_max": 114,
"alpha_frac": 0.6587134503,
"autogenerated": false,
"ratio": 3.982300884955752,
"config_test": false,
... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.utils.encoding import smart_str
# from django.core.servers.basehttp import FileWrapper
from tethys_sdk.gizmos import SelectInput, JobsTable, ToggleSwitch
from app im... | {
"repo_name": "CI-WATER/tethysapp-netcdf_to_gssha",
"path": "tethysapp/netcdf_to_gssha/controllers.py",
"copies": "1",
"size": "5643",
"license": "bsd-2-clause",
"hash": -3129692594819194400,
"line_mean": 35.8888888889,
"line_max": 109,
"alpha_frac": 0.5683147262,
"autogenerated": false,
"ratio":... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotAllowed
from django.utils import timezone
from comments.models import Comment
from django.contrib.auth.models import User
from posts.models import Post
from django.db.models imp... | {
"repo_name": "grepme/cmput410-project",
"path": "comments/views.py",
"copies": "1",
"size": "1245",
"license": "apache-2.0",
"hash": 7034198290950220000,
"line_mean": 31.7631578947,
"line_max": 97,
"alpha_frac": 0.6690763052,
"autogenerated": false,
"ratio": 4.307958477508651,
"config_test": f... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotAllowed
from django.utils import timezone
from posts.models import Post
from api.models import Server
from django.contrib.auth.models import User
from django.db.models import Q
... | {
"repo_name": "grepme/cmput410-project",
"path": "posts/views.py",
"copies": "1",
"size": "6174",
"license": "apache-2.0",
"hash": 2193537587024503600,
"line_mean": 35.9700598802,
"line_max": 110,
"alpha_frac": 0.6292517007,
"autogenerated": false,
"ratio": 4.056504599211563,
"config_test": fal... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django_proxy_users import forms as ProxyUsersForms
from django.contrib import messages as DjangoMessages
from django.utils.translation import ugettext as _
LOGIN_URL = "/django/proxy/users/login/"
@login_requ... | {
"repo_name": "opposite-bracket/django-proxy-users",
"path": "django_proxy_users/views.py",
"copies": "1",
"size": "2576",
"license": "mit",
"hash": 563227958784877060,
"line_mean": 23.5333333333,
"line_max": 76,
"alpha_frac": 0.6579968944,
"autogenerated": false,
"ratio": 3.6852646638054365,
"... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from oPOSum.apps.inventory.models import *
from oPOSum.apps.products.models import Product
from oPOSum.apps.branches.models import Branch
from django.contrib.auth.models imp... | {
"repo_name": "xirdneh/oposum",
"path": "oPOSum/apps/inventory/views.py",
"copies": "1",
"size": "28509",
"license": "mit",
"hash": -5822904295864179000,
"line_mean": 47.1570945946,
"line_max": 188,
"alpha_frac": 0.5766600021,
"autogenerated": false,
"ratio": 3.8334005647438483,
"config_test": ... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.utils import timezone
from django.views.generic.edit import DeleteView, CreateView, UpdateView
from django.views.generic.list import ListView
from .forms import RepublicaForm, QuartoForm, QuartosFormSet, ... | {
"repo_name": "rafaelnsantos/batfinancas",
"path": "republica/views.py",
"copies": "1",
"size": "4066",
"license": "mit",
"hash": 3146249999171752400,
"line_mean": 32.6115702479,
"line_max": 87,
"alpha_frac": 0.6886374816,
"autogenerated": false,
"ratio": 3.4871355060034306,
"config_test": fals... |
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from django.contrib import messages
from .forms import AuthForm
from .decorators import has_habitica
from wunderlist.decorators import has_wunderlist
@login_... | {
"repo_name": "passuf/WunderHabit",
"path": "wh_habitica/views.py",
"copies": "1",
"size": "1172",
"license": "mit",
"hash": -3496904851821910500,
"line_mean": 23.9361702128,
"line_max": 81,
"alpha_frac": 0.6825938567,
"autogenerated": false,
"ratio": 3.792880258899676,
"config_test": false,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.