text
stringlengths
0
1.05M
meta
dict
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect def index(request): return render(request, 'base...
{ "repo_name": "additionsolutions/tea", "path": "base/views.py", "copies": "1", "size": "1433", "license": "mit", "hash": -7841772819099198000, "line_mean": 32.3255813953, "line_max": 79, "alpha_frac": 0.6503838102, "autogenerated": false, "ratio": 4.436532507739938, "config_test": false, "has...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.contrib import auth from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext, loader, Context from django.db.models import Q f...
{ "repo_name": "shobhitmittal/headout_hack", "path": "headout/hd_hack/views.py", "copies": "1", "size": "19124", "license": "mit", "hash": 6799512692186887000, "line_mean": 45.3075060533, "line_max": 378, "alpha_frac": 0.7423656139, "autogenerated": false, "ratio": 2.982997972235221, "config_tes...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.contrib.sessions.models import Session import json # Create your views here. from django.core import serializers from django.http import HttpResponse from django.http import JsonResponse from .models import DailyQuote ...
{ "repo_name": "allen-garvey/block-quote-django", "path": "quotes/views.py", "copies": "1", "size": "1068", "license": "mit", "hash": -5705724876996417000, "line_mean": 32.40625, "line_max": 86, "alpha_frac": 0.7677902622, "autogenerated": false, "ratio": 3.5364238410596025, "config_test": false...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.contrib.sites.models import Site from wfs.models import Service, FeatureType import json # xmllint --schema wfs/validation_schemas/WFS-capabilities.xsd # "http://localhost:8000/wfs/?SERVICE=WFS&REQUEST=GetCapabilities&...
{ "repo_name": "vascop/django-wfs", "path": "wfs/views.py", "copies": "1", "size": "9150", "license": "apache-2.0", "hash": 3424549035983898000, "line_mean": 33.9236641221, "line_max": 115, "alpha_frac": 0.5958469945, "autogenerated": false, "ratio": 4.2030316949931095, "config_test": false, "...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.http import FileResponse from rest_framework import status from rest_framework.decorators import api_view, parser_classes from rest_framework.response import Response from rest_framework.parsers import MultiPartParser,...
{ "repo_name": "freenoth/xrest", "path": "xrest/api/views.py", "copies": "1", "size": "4920", "license": "unlicense", "hash": 3128889338264535000, "line_mean": 40.3445378151, "line_max": 119, "alpha_frac": 0.6396341463, "autogenerated": false, "ratio": 4.006514657980456, "config_test": false, ...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse,HttpResponseRedirect,HttpRequest,HttpResponsePermanentRedirect,HttpResponseForbidden import json from models import * MENU = { '1': [ {'name':'Beer','id':1,'price':130}, {'name':'Choc...
{ "repo_name": "prachetos/goibibo-hackathon2016", "path": "hackathon2016/foodnrestaurant/views.py", "copies": "1", "size": "2307", "license": "apache-2.0", "hash": -7528099277663356000, "line_mean": 30.1756756757, "line_max": 121, "alpha_frac": 0.6480277417, "autogenerated": false, "ratio": 2.8694...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from data.models import DataPoint, Met, Alphasense, Dylos, Node, Latest import json import datetime import time from admin import export_as_csv from django.contrib.admin import ModelAdmin #----...
{ "repo_name": "clairityproject/backend", "path": "data/views.py", "copies": "1", "size": "13173", "license": "mit", "hash": 5896713183254085000, "line_mean": 40.0373831776, "line_max": 220, "alpha_frac": 0.5174219995, "autogenerated": false, "ratio": 3.968966556191624, "config_test": true, "h...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from django.contrib.auth.models import User from django.db.models import Q from django.db import models from register.models import AgencyList from register.models import Petitions import json ...
{ "repo_name": "Nikolas1814/Code4Bulgaria", "path": "webServer/sendSignal/views.py", "copies": "1", "size": "2472", "license": "mit", "hash": 5252457574685061000, "line_mean": 35.3676470588, "line_max": 124, "alpha_frac": 0.7536407767, "autogenerated": false, "ratio": 3.327052489905787, "config_...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse import json import helpers from bitcoinrpc.authproxy import AuthServiceProxy as rpcRawProxy import time @csrf_exempt def peercoin_minting_data(request): rpc_raw = rpcRawProxy(helpers.get_rp...
{ "repo_name": "Peerapps/Peerapps", "path": "minting/views.py", "copies": "1", "size": "1461", "license": "mit", "hash": -270069906807751970, "line_mean": 31.4666666667, "line_max": 86, "alpha_frac": 0.6119096509, "autogenerated": false, "ratio": 3.616336633663366, "config_test": false, "has_n...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse from urllib.request import urlopen import re import json def get_home(request): ''' Home page ''' return render(request, 'crawl/main.html', {}) def get_tweets(request): '...
{ "repo_name": "hasanferit/trumpcrawler", "path": "trumpcrawler/crawl/views.py", "copies": "1", "size": "5185", "license": "mit", "hash": -8341207577238153000, "line_mean": 33.3377483444, "line_max": 170, "alpha_frac": 0.5238187078, "autogenerated": false, "ratio": 3.815305371596762, "config_tes...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.template.loader import get_template from django.template import Context from django.http import HttpResponse from django.http import HttpResponseRedirect import datetime from django.db.models import Q from register.mod...
{ "repo_name": "Nikolas1814/Code4Bulgaria", "path": "webServer/signalSendWebPage/views.py", "copies": "1", "size": "2030", "license": "mit", "hash": -450025037331162100, "line_mean": 30.734375, "line_max": 97, "alpha_frac": 0.7320197044, "autogenerated": false, "ratio": 3.4232715008431702, "conf...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from django.template.loader import get_template from django.template import Context from django.http import StreamingHttpResponse from django.http import HttpResponseRedirect import datetime from django.db.models import Q from reg...
{ "repo_name": "Nikolas1814/HackTues", "path": "webServer/register/views.py", "copies": "1", "size": "2097", "license": "mit", "hash": 1666702287007084500, "line_mean": 30.3134328358, "line_max": 148, "alpha_frac": 0.7334287077, "autogenerated": false, "ratio": 3.495, "config_test": false, "ha...
from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt import json def index(request): freesound_ids = ['181425', '370934', '191630', '191630', '232014', '219056', '325407'] return render(request, 'choose_sound.html', {'freesound_ids': freesound_ids}) @csrf_exempt def annot...
{ "repo_name": "AudioCommons/ac-annotator", "path": "music_annotator/views.py", "copies": "1", "size": "1858", "license": "apache-2.0", "hash": 7853975212216633000, "line_mean": 58.2903225806, "line_max": 125, "alpha_frac": 0.4586507073, "autogenerated": false, "ratio": 3.174438687392055, "confi...
from django.shortcuts import render from django.views.decorators.csrf import ensure_csrf_cookie from django.conf import settings from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from etherkeeper.util.helpers import jsonify, srender, jsonerror from etherkeeper.core....
{ "repo_name": "foxichu/etherkeeper", "path": "etherkeeper/core/views.py", "copies": "2", "size": "1539", "license": "mit", "hash": -1999108536808834800, "line_mean": 29.1960784314, "line_max": 70, "alpha_frac": 0.6829109812, "autogenerated": false, "ratio": 3.7445255474452557, "config_test": fa...
from django.shortcuts import render from django.views.decorators.csrf import ensure_csrf_cookie from rest_framework import viewsets, mixins from rest_framework.permissions import AllowAny from {{cookiecutter.app_name}}.users.models import User from {{cookiecutter.app_name}}.users.permissions import IsOwnerOrReadOnly f...
{ "repo_name": "amitassaraf/angular2-django-boilerplate", "path": "{{cookiecutter.github_repository_name}}/src/{{cookiecutter.app_name}}/users/views.py", "copies": "1", "size": "1036", "license": "mit", "hash": -2152905641859532300, "line_mean": 29.4705882353, "line_max": 73, "alpha_frac": 0.698841698...
from django.shortcuts import render from django.views.decorators.http import require_GET try: from wagtail.core.models import Page except ImportError: from wagtail.wagtailcore.models import Page from longclaw.utils import ProductVariant from longclaw.contrib.productrequests.models import ProductRequest @requir...
{ "repo_name": "JamesRamm/longclaw", "path": "longclaw/contrib/productrequests/views.py", "copies": "1", "size": "1155", "license": "mit", "hash": -1138019127740302800, "line_mean": 36.2580645161, "line_max": 76, "alpha_frac": 0.7229437229, "autogenerated": false, "ratio": 4.342105263157895, "co...
from django.shortcuts import render from django.views.decorators.http import require_http_methods from django.core.exceptions import ObjectDoesNotExist from django.views.decorators.csrf import csrf_exempt from django.conf import settings from annoying.functions import get_object_or_None from annoying.decorators import...
{ "repo_name": "moshekan/groupic", "path": "groupic/events/views.py", "copies": "1", "size": "4617", "license": "mit", "hash": -446926975084608600, "line_mean": 27.6770186335, "line_max": 89, "alpha_frac": 0.672298029, "autogenerated": false, "ratio": 3.2884615384615383, "config_test": false, ...
from django.shortcuts import render from django.views.decorators.http import require_http_methods from django.db.models import Q, CharField from rest_framework import generics, status, viewsets from rest_framework.permissions import IsAdminUser from rest_framework.response import Response from rest.serializers import *...
{ "repo_name": "xHeliotrope/injustice_dropper", "path": "injustice/rest/views.py", "copies": "1", "size": "5317", "license": "mit", "hash": -834787383677695100, "line_mean": 31.6196319018, "line_max": 110, "alpha_frac": 0.663155915, "autogenerated": false, "ratio": 3.9472902746844842, "config_te...
from django.shortcuts import render from django.views.decorators.http import require_http_methods from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from django.http import HttpRequest from .models import Greeting import requests import httplib2 import sys from apiclient.discov...
{ "repo_name": "glewis17/bases-finance", "path": "hello/views.py", "copies": "1", "size": "1865", "license": "mit", "hash": 3022745327355861500, "line_mean": 30.0833333333, "line_max": 185, "alpha_frac": 0.7238605898, "autogenerated": false, "ratio": 3.614341085271318, "config_test": false, "h...
from django.shortcuts import render from django.views.decorators.http import require_http_methods from django.views.decorators.csrf import csrf_protect from mezzanine_blocks.models import ImageBlock, RichBlock, Block from django.http import HttpResponseRedirect from mezzanine_advanced_pages.models import RegionBlocks, ...
{ "repo_name": "evolvews/mezzanine_advanced_pages", "path": "views.py", "copies": "1", "size": "2550", "license": "mit", "hash": 4615844242483330000, "line_mean": 46.2407407407, "line_max": 115, "alpha_frac": 0.6843137255, "autogenerated": false, "ratio": 3.817365269461078, "config_test": false,...
from django.shortcuts import render from django.views.generic.base import ContextMixin from django.utils.decorators import method_decorator from django.contrib.auth.decorators import permission_required from django.contrib.auth.decorators import login_required from django.views.decorators.gzip import gzip_page from re...
{ "repo_name": "tuanquanghpvn/bideox", "path": "apps/core/views.py", "copies": "1", "size": "1455", "license": "mit", "hash": 4228427465740048000, "line_mean": 41.7941176471, "line_max": 84, "alpha_frac": 0.7065292096, "autogenerated": false, "ratio": 4.019337016574585, "config_test": false, "...
from django.shortcuts import render from django.views.generic.base import TemplateView # For CI variable names. from django.conf import settings from braces.views import LoginRequiredMixin, StaffuserRequiredMixin def home(request): if request.user.is_authenticated(): user = request.user priv_list ...
{ "repo_name": "kevincwebb/conceptum", "path": "conceptum/conceptum/views.py", "copies": "1", "size": "1206", "license": "bsd-3-clause", "hash": 5551096354819396000, "line_mean": 31.5945945946, "line_max": 67, "alpha_frac": 0.6334991708, "autogenerated": false, "ratio": 3.9671052631578947, "conf...
from django.shortcuts import render from django.views.generic.base import TemplateView from django.contrib.auth import logout as auth_logout from django.db.models import Sum from django.http import HttpResponseRedirect, JsonResponse from django.core import serializers import bestin.services as services from bestin.mode...
{ "repo_name": "IKholopov/HackUPC2017", "path": "hackupc/bestin/views.py", "copies": "1", "size": "1446", "license": "apache-2.0", "hash": 1147987065891476600, "line_mean": 31.8636363636, "line_max": 123, "alpha_frac": 0.7496542185, "autogenerated": false, "ratio": 3.908108108108108, "config_tes...
from django.shortcuts import render from django.views.generic.base import TemplateView from django.contrib.auth.models import User from django.http import HttpResponse from django.views.decorators.http import require_http_methods from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.core....
{ "repo_name": "salimm/django-affiliations", "path": "build/lib/affiliations/views.py", "copies": "2", "size": "2740", "license": "mit", "hash": -8583394557771443000, "line_mean": 32.0120481928, "line_max": 92, "alpha_frac": 0.7069343066, "autogenerated": false, "ratio": 3.6100131752305664, "con...
from django.shortcuts import render from django.views.generic.base import TemplateView from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from blog.models import Post from t...
{ "repo_name": "brandonw/personal-site", "path": "personal-site/blog/views.py", "copies": "1", "size": "1941", "license": "bsd-3-clause", "hash": 1527400065281942800, "line_mean": 29.328125, "line_max": 75, "alpha_frac": 0.6702730551, "autogenerated": false, "ratio": 3.6901140684410647, "config_...
from django.shortcuts import render from django.views.generic.base import TemplateView from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.models import User from core.auth_be import RestBackend from django.shortcuts import ren...
{ "repo_name": "ngr/fe_sm_00", "path": "core/views.py", "copies": "1", "size": "7803", "license": "mit", "hash": -906575203736898600, "line_mean": 39.640625, "line_max": 159, "alpha_frac": 0.6238626169, "autogenerated": false, "ratio": 4.172727272727273, "config_test": false, "has_no_keywords"...
from django.shortcuts import render from django.views.generic.base import TemplateView from rest_framework import generics, permissions, parsers from rest_framework_docs.api_docs import ApiDocumentation from rest_framework_docs.settings import DRFSettings from api.serializers import ( IndividualSerializer, I...
{ "repo_name": "bpatyi/simpleCRM", "path": "api/views.py", "copies": "1", "size": "6965", "license": "mit", "hash": -4253632653857719000, "line_mean": 31.3953488372, "line_max": 88, "alpha_frac": 0.7780330223, "autogenerated": false, "ratio": 4.508090614886731, "config_test": false, "has_no_ke...
from django.shortcuts import render from django.views.generic.base import TemplateView, RedirectView from django.views.generic.edit import FormView, CreateView, UpdateView from django.views.generic.list import ListView from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.contrib.auth imp...
{ "repo_name": "IIITS/iiits.ac.in", "path": "iiits/views.py", "copies": "1", "size": "21783", "license": "mit", "hash": -8363236027910550000, "line_mean": 40.0225988701, "line_max": 102, "alpha_frac": 0.6978836708, "autogenerated": false, "ratio": 3.2057395143487857, "config_test": false, "has...
from django.shortcuts import render from django.views.generic.base import TemplateView, RedirectView from django.views.generic.edit import FormView, View from django.conf import settings from iiits.models import * from iiits.methods import * from iiits.algorithms import * class HomeView(TemplateView): template_name =...
{ "repo_name": "sahalsajjad/iiits.ac.in", "path": "iiits/views.py", "copies": "1", "size": "1384", "license": "mit", "hash": 8165753199104997000, "line_mean": 28.4468085106, "line_max": 73, "alpha_frac": 0.7341040462, "autogenerated": false, "ratio": 2.9509594882729213, "config_test": false, "...
from django.shortcuts import render from django.views.generic.base import TemplateView, View from django.utils.translation import npgettext from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse from django.utils import timezone import pytz from .models import Message class Index(TemplateView): ...
{ "repo_name": "DBarthe/chatbox", "path": "mainapp/views.py", "copies": "1", "size": "4464", "license": "mit", "hash": -8449830471395062000, "line_mean": 32.5714285714, "line_max": 176, "alpha_frac": 0.688844086, "autogenerated": false, "ratio": 3.8851174934725847, "config_test": false, "has_n...
from django.shortcuts import render from django.views.generic.base import View from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.db.models import Q from .models import UserProfile from .forms import LoginForm, RegisterForm # Create your views here. ...
{ "repo_name": "hgt312/SimpleMark", "path": "users/views.py", "copies": "1", "size": "2643", "license": "mit", "hash": 1813800981315904500, "line_mean": 36.9552238806, "line_max": 113, "alpha_frac": 0.5847424302, "autogenerated": false, "ratio": 3.9921507064364206, "config_test": false, "has_n...
from django.shortcuts import render from django.views.generic.base import View from django.http import HttpResponseRedirect from .models import Paragraph, Result from .forms import ResultForm # Create your views here. class QuestionView(View): def get(self, request): if Paragraph.objects.filter(count=0)...
{ "repo_name": "hgt312/SimpleMark", "path": "pars/views.py", "copies": "1", "size": "2542", "license": "mit", "hash": 3957761879880537600, "line_mean": 40.7333333333, "line_max": 106, "alpha_frac": 0.5846645367, "autogenerated": false, "ratio": 4.385288966725044, "config_test": false, "has_no_...
from django.shortcuts import render from django.views.generic.base import View, TemplateView from django.core.files.storage import FileSystemStorage from django.http import HttpResponseRedirect from django.conf import settings import os from .detect import detectfeatures, detectfeatures2 from .models import ImageDetec...
{ "repo_name": "mrava87/EAGE_Hackatoon_2017", "path": "website2.0/mainapp/views.py", "copies": "1", "size": "2695", "license": "mit", "hash": -4069299205446532600, "line_mean": 32.2716049383, "line_max": 119, "alpha_frac": 0.6508348794, "autogenerated": false, "ratio": 3.8335704125177807, "confi...
from django.shortcuts import render from django.views.generic.base import View, TemplateView from django.core.files.storage import FileSystemStorage from django.utils.text import slugify import os, glob from detect import detectfaces, detectfeatures import decimal uploaded_file_url = '' current_image = 'pic01.jpg' ...
{ "repo_name": "mrava87/EAGE_Hackatoon_2017", "path": "website/mainapp/views.py", "copies": "1", "size": "3629", "license": "mit", "hash": -286026381993960060, "line_mean": 36.412371134, "line_max": 126, "alpha_frac": 0.5976853128, "autogenerated": false, "ratio": 3.7450980392156863, "config_tes...
from django.shortcuts import render from django.views.generic.detail import DetailView from django.views.generic import ListView from django.db.models import Avg # from django.shortcuts import get_object_or_404 from rockband import models ## -- Old function-style views -- # def band_listing(request): # """A view ...
{ "repo_name": "AlanCoding/Example-Django-App", "path": "demo/rockband/views.py", "copies": "1", "size": "2058", "license": "mit", "hash": 1463272392872044000, "line_mean": 28.4, "line_max": 75, "alpha_frac": 0.6535471331, "autogenerated": false, "ratio": 3.636042402826855, "config_test": false,...
from django.shortcuts import render from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.utils import timezone from orders.models import Order from rel_products_shopping_carts.models import Rel_Product_Shopping_Cart class OrderDetailView(DetailView): model = O...
{ "repo_name": "jojoriveraa/titulacion-NFCOW", "path": "NFCow/orders/views.py", "copies": "1", "size": "1381", "license": "apache-2.0", "hash": 2209136071940837400, "line_mean": 31.9047619048, "line_max": 104, "alpha_frac": 0.7480086894, "autogenerated": false, "ratio": 3.288095238095238, "confi...
from django.shortcuts import render from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.base import TemplateView from django.shortcuts import render_to_response from django.template import RequestContext from django.template.loader import render_to...
{ "repo_name": "mcmaxwell/idea_digital_agency", "path": "idea/blog/views.py", "copies": "1", "size": "3382", "license": "mit", "hash": -4150628167462185000, "line_mean": 29.4684684685, "line_max": 111, "alpha_frac": 0.5931401538, "autogenerated": false, "ratio": 4.026190476190476, "config_test":...
from django.shortcuts import render from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.edit import CreateView from django.views.generic.edit import UpdateView from .models import Table,Chair from django import forms from crispy_forms.helper import...
{ "repo_name": "wasit7/tutorials", "path": "django/django_generic_view/cp/myapp/views.py", "copies": "1", "size": "2896", "license": "mit", "hash": 6892557636764410000, "line_mean": 27.3921568627, "line_max": 95, "alpha_frac": 0.6574585635, "autogenerated": false, "ratio": 3.344110854503464, "co...
from django.shortcuts import render from django.views.generic.edit import CreateView, DeleteView, UpdateView, FormView, ModelFormMixin from django.views.generic.detail import SingleObjectTemplateResponseMixin from django.db.models import Count from braces.views import LoginRequiredMixin # Attempt to handle path issues...
{ "repo_name": "AndrewGrossman/fuzzy-octo-batman", "path": "src/resume/views.py", "copies": "1", "size": "3960", "license": "mit", "hash": 1474000356985484800, "line_mean": 40.25, "line_max": 123, "alpha_frac": 0.6891414141, "autogenerated": false, "ratio": 4.217252396166134, "config_test": fals...
from django.shortcuts import render from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.shortcuts import render, redirect, get_object_or_404 from .models import App # Create your views here. def index(request): if request.method == 'POST':...
{ "repo_name": "raonyguimaraes/mendelmd", "path": "mapps/views.py", "copies": "1", "size": "1368", "license": "bsd-3-clause", "hash": -893398365542931300, "line_mean": 30.8139534884, "line_max": 104, "alpha_frac": 0.6184210526, "autogenerated": false, "ratio": 3.717391304347826, "config_test": f...
from django.shortcuts import render from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic import View, ListView, DetailView from django.http import HttpResponse, JsonResponse from django.core.urlresolvers import reverse, reverse_lazy from models import Entry from forms impor...
{ "repo_name": "Anjali2906/lifetab", "path": "journal/views.py", "copies": "1", "size": "6098", "license": "mit", "hash": -1580351355468041000, "line_mean": 30.112244898, "line_max": 177, "alpha_frac": 0.6174155461, "autogenerated": false, "ratio": 3.0535803705558338, "config_test": false, "ha...
from django.shortcuts import render from django.views.generic.edit import CreateView, UpdateView from django.views.generic.list import ListView from django.urls import reverse_lazy, reverse from subprocuraduria.models import Subprocuraduria, Direccion class CreateSubprocuraduriaView(CreateView): model = Subprocu...
{ "repo_name": "fcopantoja/sips", "path": "sips/subprocuraduria/views.py", "copies": "1", "size": "2014", "license": "mit", "hash": 3812811399947948500, "line_mean": 30.46875, "line_max": 83, "alpha_frac": 0.7159880834, "autogenerated": false, "ratio": 3.4368600682593855, "config_test": false, ...
from django.shortcuts import render from django.views.generic.edit import FormView from apps.clientes.models import PerfilCliente from django.core.urlresolvers import reverse_lazy from django.views.generic.base import TemplateView from apps.clientes.forms import UserForm from django.views.generic.list import ListView ...
{ "repo_name": "acs-um/gestion-turnos", "path": "apps/clientes/views.py", "copies": "1", "size": "1171", "license": "mit", "hash": 8561394786893468000, "line_mean": 35.625, "line_max": 61, "alpha_frac": 0.7301451751, "autogenerated": false, "ratio": 3.434017595307918, "config_test": false, "ha...
# from django.shortcuts import render from django.views.generic.edit import FormView from django.core.exceptions import ObjectDoesNotExist from .forms import ScapeForm from .models import ScapePlayer import time # from datetime import datetime, timedelta # from django.http import HttpResponse class ScapeView(FormView...
{ "repo_name": "aldenjenkins/foobargamingwebsite", "path": "scape/views.py", "copies": "1", "size": "3522", "license": "bsd-3-clause", "hash": -6085648925555262000, "line_mean": 38.5842696629, "line_max": 116, "alpha_frac": 0.5406019307, "autogenerated": false, "ratio": 3.896017699115044, "confi...
from django.shortcuts import render from django.views.generic.edit import FormView from django.views.generic.base import RedirectView from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import HttpResponse from .forms import RegisterForm from .models import AddressPair, Tx from .u...
{ "repo_name": "realspencerdupre/django-ponzi", "path": "ponzi/views.py", "copies": "1", "size": "1836", "license": "bsd-2-clause", "hash": 1616948666689768700, "line_mean": 29.0983606557, "line_max": 82, "alpha_frac": 0.6895424837, "autogenerated": false, "ratio": 3.849056603773585, "config_tes...
from django.shortcuts import render from django.views.generic.edit import FormView from django.views.generic.base import TemplateView from django.contrib.auth.models import User from gp.models import Complaint, Domain, Upvote from gp.forms import * from django.utils import timezone from django.conf import settings from...
{ "repo_name": "IIITS/IssuesAndSuggestions", "path": "gp/views.py", "copies": "1", "size": "7469", "license": "mit", "hash": 6536772365039859000, "line_mean": 35.2572815534, "line_max": 342, "alpha_frac": 0.738385326, "autogenerated": false, "ratio": 3.1932449764856776, "config_test": false, "...
from django.shortcuts import render from django.views.generic.edit import FormView from .forms import AddressForm from .models import UserAddress # Create your views here. class AddressSelectFormView(FormView): form_class=AddressForm template_name="orders/address_select.html" def get_form(self,*args,**kwargs): ...
{ "repo_name": "abhijitbangera/ecommerce", "path": "src/orders/views.py", "copies": "1", "size": "1100", "license": "mit", "hash": -2443005175768240000, "line_mean": 31.3823529412, "line_max": 74, "alpha_frac": 0.7581818182, "autogenerated": false, "ratio": 3.4161490683229814, "config_test": fal...
from django.shortcuts import render from django.views.generic import CreateView, ListView, DeleteView, UpdateView from django.views.generic.base import TemplateView from django.core.urlresolvers import reverse_lazy from django.views.generic.detail import DetailView from apps.hotelapp.models import Usuario from apps.ho...
{ "repo_name": "AnhellO/DAS_Sistemas", "path": "Ago-Dic-2017/Enrique Castillo/Ordinario/apps/hotelapp/views.py", "copies": "3", "size": "2572", "license": "mit", "hash": -5859307585354265000, "line_mean": 30.7530864198, "line_max": 84, "alpha_frac": 0.7853810264, "autogenerated": false, "ratio": 2...
from django.shortcuts import render from django.views.generic import CreateView, ListView, DetailView from django.contrib.auth.decorators import login_required from nfsmain.forms import * def index(request): template_name = "nfsmain/index.html" return render(request, template_name) @login_required() def adm...
{ "repo_name": "Kirkkonen/NetForSpeech", "path": "nfsmain/views.py", "copies": "1", "size": "1427", "license": "apache-2.0", "hash": -8263378148604514000, "line_mean": 20.3134328358, "line_max": 108, "alpha_frac": 0.728100911, "autogenerated": false, "ratio": 3.898907103825137, "config_test": fa...
from django.shortcuts import render from django.views.generic import CreateView from django.contrib import messages from datetimewidget.widgets import DateTimeWidget from .models import Appointment class AppointmentCreateMixin(object): fields = ('patient_name', 'patient_middlename', ...
{ "repo_name": "thefivekey/django-doctor-appointment", "path": "polyclinic/appointments/views.py", "copies": "1", "size": "2452", "license": "mit", "hash": -6856038824313866000, "line_mean": 33.9705882353, "line_max": 76, "alpha_frac": 0.6021867115, "autogenerated": false, "ratio": 3.6925465838509...
from django.shortcuts import render from django.views.generic import CreateView, TemplateView, DetailView from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.core.mail import send_mail from django.conf import settings from . import default_email_content_template, def...
{ "repo_name": "TheUKDave/secret_santa", "path": "santa/views.py", "copies": "1", "size": "2821", "license": "mit", "hash": 7588946438474096000, "line_mean": 31.0568181818, "line_max": 103, "alpha_frac": 0.6770648706, "autogenerated": false, "ratio": 3.64, "config_test": false, "has_no_keyword...
from django.shortcuts import render from django.views.generic import DetailView, CreateView, ListView, UpdateView, DeleteView, RedirectView from django.contrib.auth.models import User from django.db.models import Avg from forms import * from models import Track, Artist, Album, Lyrics, TrackReview, Review from django.sh...
{ "repo_name": "marcsances/SITW-Project2016", "path": "musicdb/musicapp/views.py", "copies": "1", "size": "5757", "license": "bsd-3-clause", "hash": -8204671110624726000, "line_mean": 35.6687898089, "line_max": 123, "alpha_frac": 0.6803890915, "autogenerated": false, "ratio": 3.634469696969697, ...
from django.shortcuts import render from django.views.generic import DetailView, ListView, CreateView, UpdateView, DeleteView from django.views.generic.edit import DeletionMixin from django.shortcuts import get_object_or_404 from django.contrib.auth.decorators import login_required from django.utils.decorators import m...
{ "repo_name": "Etxea/gestion_eide_web", "path": "cursos/views.py", "copies": "1", "size": "3351", "license": "mit", "hash": -5265718106286036000, "line_mean": 32.1782178218, "line_max": 100, "alpha_frac": 0.678603402, "autogenerated": false, "ratio": 3.5089005235602095, "config_test": false, ...
from django.shortcuts import render from django.views.generic import DetailView, ListView from comaf.apps.base.views import LoginRequiredMixin import comaf.apps.metrics.models as metrics_models from django.contrib.auth import get_user_model User = get_user_model() # Create your views here. class MetricDetailView(Deta...
{ "repo_name": "nanchenchen/lsst-comaf", "path": "comaf/apps/metrics/views.py", "copies": "1", "size": "1771", "license": "mit", "hash": 4409496187422661000, "line_mean": 34.42, "line_max": 85, "alpha_frac": 0.6877470356, "autogenerated": false, "ratio": 3.8668122270742358, "config_test": false,...
from django.shortcuts import render from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from django.contrib import messages from supplier.models import Supplier # Create your views here. class SupplierList(...
{ "repo_name": "borderitsolutions/amadaa", "path": "supplier/views.py", "copies": "1", "size": "1102", "license": "mit", "hash": -3374556293502131700, "line_mean": 29.6111111111, "line_max": 78, "alpha_frac": 0.7087114338, "autogenerated": false, "ratio": 4.021897810218978, "config_test": false,...
from django.shortcuts import render from django.views.generic import DetailView, ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from braces.views import StaffuserRequiredMixin from .models import Product, Type from .forms import ProductCreateForm, ProductUpdateForm class ProductLi...
{ "repo_name": "azul-cloud/serendipity", "path": "products/views.py", "copies": "1", "size": "1627", "license": "mit", "hash": 7935059267257725000, "line_mean": 30.2884615385, "line_max": 87, "alpha_frac": 0.7437000615, "autogenerated": false, "ratio": 4.236979166666667, "config_test": false, ...
from django.shortcuts import render from django.views.generic import DetailView, ListView from .models import * from interactions.models import * from assays.models import AssayResult class CompoundList(ListView): """Lists all Compounds""" model = Compound template_name = 'compounds/compound_list.html' ...
{ "repo_name": "UPDDI/dds-database-server", "path": "compounds/views.py", "copies": "1", "size": "2413", "license": "mit", "hash": -6576661418586967000, "line_mean": 29.1625, "line_max": 93, "alpha_frac": 0.6067136345, "autogenerated": false, "ratio": 4.712890625, "config_test": false, "has_no...
from django.shortcuts import render from django.views.generic import DetailView, ListView from .models import * from interactions.models import * class TargetDetail(DetailView): """Displays information for a given target""" model = Target template_name = 'targets/target_detail.html' def get_context_d...
{ "repo_name": "UPDDI/dds-database-server", "path": "targets/views.py", "copies": "1", "size": "2093", "license": "mit", "hash": -4343830987050053000, "line_mean": 28.9, "line_max": 93, "alpha_frac": 0.6000955566, "autogenerated": false, "ratio": 4.833718244803695, "config_test": false, "has_n...
from django.shortcuts import render from django.views.generic import DetailView, ListView from . import models def player_stats(player, friends=[]): return { 'num_games': player.num_games(friends), 'num_wins': player.num_wins(friends), 'kd_ratio': player.kill_death_ratio(friends), ...
{ "repo_name": "andrijan/csgostats", "path": "cs-stats/stats/views.py", "copies": "1", "size": "1888", "license": "bsd-3-clause", "hash": -5657134501202186000, "line_mean": 27.1791044776, "line_max": 72, "alpha_frac": 0.6292372881, "autogenerated": false, "ratio": 3.783567134268537, "config_test...
from django.shortcuts import render from django.views.generic import DetailView from django.views.generic.list import ListView from django.utils import timezone from django.contrib.auth.models import Group from django.conf import settings from django.templatetags.static import static from ..models import Menu, Organiz...
{ "repo_name": "edilio/tobeawebproperty", "path": "haweb/apps/web/views/html.py", "copies": "1", "size": "5488", "license": "mit", "hash": 5956970186574792000, "line_mean": 29.3259668508, "line_max": 115, "alpha_frac": 0.6381195335, "autogenerated": false, "ratio": 3.6956228956228956, "config_te...
from django.shortcuts import render from django.views.generic import DetailView, TemplateView from models import Provider, Machine from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ImproperlyConfigured class ProviderView(DetailView): model ...
{ "repo_name": "jayfk/cloudbench.io", "path": "cloudbench/benchmarks/views.py", "copies": "1", "size": "1579", "license": "bsd-3-clause", "hash": 7692511678360635000, "line_mean": 25.7627118644, "line_max": 85, "alpha_frac": 0.6453451552, "autogenerated": false, "ratio": 4.155263157894737, "conf...
from django.shortcuts import render from django.views.generic import FormView from django.contrib.auth import get_user_model, login, logout from django.conf import settings from django.core.urlresolvers import reverse_lazy from django.contrib import messages from test_app.forms import LoginForm, LogoutForm class Fr...
{ "repo_name": "truetug/django-admin-helper", "path": "test_proj/test_app/views.py", "copies": "1", "size": "1213", "license": "mit", "hash": 43325952797615290, "line_mean": 30.1282051282, "line_max": 85, "alpha_frac": 0.6166529266, "autogenerated": false, "ratio": 4.316725978647687, "config_tes...
from django.shortcuts import render from django.views.generic import FormView from django.views.generic import TemplateView, ListView from django.views.generic import CreateView, UpdateView from django.db.models import Q from django import forms from .models import Bookmark from taggit.models import Tag from django_co...
{ "repo_name": "tom-henderson/bookmarks", "path": "bookmarks/bookmarks/views.py", "copies": "1", "size": "3642", "license": "mit", "hash": -7628299728404105000, "line_mean": 31.2300884956, "line_max": 82, "alpha_frac": 0.6364634816, "autogenerated": false, "ratio": 3.907725321888412, "config_tes...
from django.shortcuts import render from django.views.generic import FormView, TemplateView from .forms import AssayResultUploadForm from dds.utils import unicode_csv_reader, average, standard_deviation from django.shortcuts import redirect from compounds.models import Compound, CompoundBatch from assays.models import...
{ "repo_name": "UPDDI/dds-database-server", "path": "assays/views.py", "copies": "1", "size": "5193", "license": "mit", "hash": -4829542394899811000, "line_mean": 36.3597122302, "line_max": 101, "alpha_frac": 0.5825149239, "autogenerated": false, "ratio": 3.881165919282511, "config_test": false,...
from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView from braces.views import LoginRequiredMixin from .models import Question, Tag, Answer from .forms import CreateQuestionForm from django.core import serializers from django.http import HttpResponse, Http404 from django....
{ "repo_name": "brapastor/djdiscuss", "path": "discuss/discuss/apps/discuss/views.py", "copies": "1", "size": "3685", "license": "mit", "hash": 5590484585051593000, "line_mean": 36.6020408163, "line_max": 120, "alpha_frac": 0.678697422, "autogenerated": false, "ratio": 3.8146997929606625, "confi...
from django.shortcuts import render from django.views.generic import ListView, CreateView, UpdateView, DeleteView,\ DetailView from .models import Coche, Propietario, ProporcionAsientos ############################################################################### ## Propietarios ...
{ "repo_name": "gabofer82/TallerDeProgramacion", "path": "src/tallerdeprogramacion/apps/flota/views.py", "copies": "1", "size": "1416", "license": "apache-2.0", "hash": 4791514167773581000, "line_mean": 23.8421052632, "line_max": 79, "alpha_frac": 0.5127118644, "autogenerated": false, "ratio": 4.5...
from django.shortcuts import render from django.views.generic import ListView, DetailView, CreateView from django.core.urlresolvers import reverse_lazy from django.http import HttpResponse # Create your views here. from .models import BlogPost, BlogComment from braces.views import LoginRequiredMixin from .forms import...
{ "repo_name": "henryfjordan/django_beginnings", "path": "django_beginnings/blog/views.py", "copies": "1", "size": "1269", "license": "bsd-3-clause", "hash": -4563055402936988700, "line_mean": 31.5384615385, "line_max": 84, "alpha_frac": 0.6895193065, "autogenerated": false, "ratio": 4.05431309904...
from django.shortcuts import render from django.views.generic import ListView, DetailView, FormView, TemplateView from .models import Entry, Speakers, Sponsors from .enum import GOLD, SILVER, BRONZE from .forms import EventoForm from django.http import HttpResponseRedirect from django.core.mail import send_mail class...
{ "repo_name": "jgsjv/treinamento_django", "path": "blog/blogapp/views.py", "copies": "1", "size": "2132", "license": "mit", "hash": 3144315413008343000, "line_mean": 26.3333333333, "line_max": 77, "alpha_frac": 0.6998123827, "autogenerated": false, "ratio": 3.2749615975422426, "config_test": fa...
from django.shortcuts import render from django.views.generic import ListView, DetailView from django.contrib.auth.mixins import PermissionRequiredMixin from osf.models.user import OSFUser from admin.desk.utils import DeskClient, DeskError, DeskCustomerNotFound class DeskCaseList(PermissionRequiredMixin, ListView):...
{ "repo_name": "monikagrabowska/osf.io", "path": "admin/desk/views.py", "copies": "4", "size": "3550", "license": "apache-2.0", "hash": 1923762904990464800, "line_mean": 38.8876404494, "line_max": 118, "alpha_frac": 0.5597183099, "autogenerated": false, "ratio": 4.166666666666667, "config_test":...
from django.shortcuts import render from django.views.generic import ListView, DetailView from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from lending.models import (User, Item, History, Tablet, BugsFeatures, BorrowForm, ReturnForm, BugsFeaturesForm) class UserList(ListVi...
{ "repo_name": "justsostephen/track", "path": "lending/views.py", "copies": "1", "size": "9436", "license": "mit", "hash": -8052884826341334000, "line_mean": 43.7203791469, "line_max": 80, "alpha_frac": 0.6072488343, "autogenerated": false, "ratio": 4.166004415011037, "config_test": false, "ha...
from django.shortcuts import render from django.views.generic import ListView, DetailView from django.utils import timezone from django.http import HttpResponseRedirect from django.core.mail import mail_admins from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from .models impo...
{ "repo_name": "FarmCodeGary/InspirationForge", "path": "blog/views.py", "copies": "1", "size": "5698", "license": "mit", "hash": 6951148855135533000, "line_mean": 31.7471264368, "line_max": 77, "alpha_frac": 0.6137241137, "autogenerated": false, "ratio": 4.162162162162162, "config_test": false,...
from django.shortcuts import render from django.views.generic import ListView, DetailView from django.views.generic.edit import FormView from .models import Campaign, Team, Transaction from .forms import TeamForm from django.db.models import Sum, Max from datetime import datetime class CampaignList(ListView): mode...
{ "repo_name": "toast38coza/FlashGiving", "path": "campaign/views.py", "copies": "1", "size": "2135", "license": "mit", "hash": 3604442687698180600, "line_mean": 32.8888888889, "line_max": 92, "alpha_frac": 0.6454332553, "autogenerated": false, "ratio": 4.393004115226337, "config_test": false, ...
from django.shortcuts import render from django.views.generic import ListView, DetailView from .models import Noticias, InicioTexto from multimedia.models import Videos, Audio, Fotos, Adjuntos from eventos.models import Eventos, Categoria from publicaciones.models import Publicaciones from .forms import ContactForm, Pa...
{ "repo_name": "CARocha/sitioreddes", "path": "noticias/views.py", "copies": "1", "size": "7282", "license": "mit", "hash": 1701835375747651300, "line_mean": 39.0164835165, "line_max": 107, "alpha_frac": 0.6389728097, "autogenerated": false, "ratio": 3.3145197997269005, "config_test": false, "...
from django.shortcuts import render from django.views.generic import ListView, DetailView from .models import Noticias, InicioTexto from multimedia.models import Videos, Audio from eventos.models import Eventos from publicaciones.models import Publicaciones from .forms import ContactForm from django.core.mail import se...
{ "repo_name": "CARocha/cesesma", "path": "noticias/views.py", "copies": "1", "size": "3188", "license": "mit", "hash": -2424594656647706600, "line_mean": 38.8625, "line_max": 85, "alpha_frac": 0.6373902133, "autogenerated": false, "ratio": 3.5032967032967033, "config_test": false, "has_no_key...
from django.shortcuts import render from django.views.generic import ListView, DetailView from product.models import Product, Category class ProductList(ListView): template_name = 'list.html' category = None def get_category(self): if self.category is None: self.category = Category.ob...
{ "repo_name": "MahdiZareie/PyShop", "path": "product/views.py", "copies": "1", "size": "1040", "license": "mit", "hash": -5443412071417701000, "line_mean": 30.5151515152, "line_max": 97, "alpha_frac": 0.6596153846, "autogenerated": false, "ratio": 4.0310077519379846, "config_test": false, "ha...
from django.shortcuts import render from django.views.generic import ListView, DetailView from operator import itemgetter import models # Create your views here. class TopicModelIndexView(ListView): context_object_name = 'topic_models' queryset = models.TopicModel.objects.all() template_name = 'topic_brow...
{ "repo_name": "nanchenchen/script-analysis", "path": "pyanalysis/apps/enhance/views.py", "copies": "1", "size": "4843", "license": "mit", "hash": 6737566880680888000, "line_mean": 34.1014492754, "line_max": 129, "alpha_frac": 0.6512492257, "autogenerated": false, "ratio": 3.9438110749185666, "c...
from django.shortcuts import render from django.views.generic import ListView, DetailView from website.project.model import User from admin.base.utils import OSFAdmin from admin.desk.utils import DeskClient, DeskError, DeskCustomerNotFound class DeskCaseList(OSFAdmin, ListView): template_name = 'desk/cases.html...
{ "repo_name": "alexschiller/osf.io", "path": "admin/desk/views.py", "copies": "3", "size": "3354", "license": "apache-2.0", "hash": -1505177409454867200, "line_mean": 38.4588235294, "line_max": 118, "alpha_frac": 0.5474060823, "autogenerated": false, "ratio": 4.140740740740741, "config_test": f...
from django.shortcuts import render from django.views.generic import ListView, DetailView import models # Create your views here. class TopicModelIndexView(ListView): context_object_name = 'topic_models' queryset = models.TopicModel.objects.all() template_name = 'topic_browser/models.html' class TopicMo...
{ "repo_name": "hds-lab/textvisdrg", "path": "msgvis/apps/enhance/views.py", "copies": "1", "size": "3074", "license": "mit", "hash": 5484031273666567000, "line_mean": 31.3578947368, "line_max": 98, "alpha_frac": 0.634677944, "autogenerated": false, "ratio": 4.013054830287206, "config_test": fal...
from django.shortcuts import render from django.views.generic import ListView from blogengine.models import Category, Post, Tag from django.contrib.syndication.views import Feed from django.template.loader import get_template from django.template import Context, loader from django.http import HttpResponse from django.s...
{ "repo_name": "EricShiGit/personalblog", "path": "blogengine/views.py", "copies": "1", "size": "3531", "license": "mit", "hash": -3311154823022407000, "line_mean": 27.9426229508, "line_max": 84, "alpha_frac": 0.6437269895, "autogenerated": false, "ratio": 3.68580375782881, "config_test": false,...
from django.shortcuts import render from django.views.generic import ListView from challenge.models import GoalInstance, Goal from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from datetime import date from collections import defaultdict import random # Cre...
{ "repo_name": "dpmpolo/anniv", "path": "challenge/views.py", "copies": "1", "size": "2386", "license": "mit", "hash": 5330359056924444000, "line_mean": 34.0882352941, "line_max": 102, "alpha_frac": 0.6316010059, "autogenerated": false, "ratio": 4.030405405405405, "config_test": false, "has_no...
from django.shortcuts import render from django.views.generic import ListView from coopInfo.models import Person, State, Cooperative from coopInfo.serializers import PersonSerializer, StateSerializer, CooperativeSerializer from rest_framework import generics class PersonList(generics.ListCreateAPIView): queryset ...
{ "repo_name": "antoineclaval/ruralpowerproject", "path": "ruralpowerproject/coopInfo/views.py", "copies": "1", "size": "1172", "license": "bsd-3-clause", "hash": -6846313037667116000, "line_mean": 31.5833333333, "line_max": 89, "alpha_frac": 0.8037542662, "autogenerated": false, "ratio": 4.246376...
from django.shortcuts import render from django.views.generic import ListView from django.views.generic.detail import DetailView from datetime import datetime, time, timedelta from django.db.models import Q from forestfire.models import ForestFireIndex, ForestFireCollection, WeatherStation class ForestFireIndexMap(Li...
{ "repo_name": "mboehn/ffc", "path": "forestfire/views.py", "copies": "1", "size": "1347", "license": "mit", "hash": -1776369260250785800, "line_mean": 30.3255813953, "line_max": 83, "alpha_frac": 0.6585003712, "autogenerated": false, "ratio": 4.235849056603773, "config_test": false, "has_no_k...
from django.shortcuts import render from django.views.generic import ListView from django.views.generic.edit import CreateView, UpdateView from image.models import Image from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse fro...
{ "repo_name": "henry808/mod_drops", "path": "image/views.py", "copies": "1", "size": "3399", "license": "mit", "hash": 6316580771205711000, "line_mean": 29.3482142857, "line_max": 61, "alpha_frac": 0.6016475434, "autogenerated": false, "ratio": 3.998823529411765, "config_test": false, "has_no...
from django.shortcuts import render from django.views.generic import ListView from .models import Category, Post, Tag from django.contrib.syndication.views import Feed from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe import markdown2 class CategoryListView(ListView): d...
{ "repo_name": "alcance/blog_ng", "path": "blogengine/views.py", "copies": "1", "size": "1313", "license": "mit", "hash": -4045450913715023000, "line_mean": 27.5434782609, "line_max": 71, "alpha_frac": 0.6481340442, "autogenerated": false, "ratio": 4.115987460815047, "config_test": false, "has...
from django.shortcuts import render from django.views.generic import ListView from .models import CvsHistory, Engineer, Jira from django.http import HttpResponse from django.views.generic import View from django.shortcuts import render_to_response from django.core.paginator import Paginator,InvalidPage,EmptyPage,PageNo...
{ "repo_name": "yaongli/neontool", "path": "cvs_history/views.py", "copies": "1", "size": "5679", "license": "mit", "hash": -595164155332984700, "line_mean": 32.6094674556, "line_max": 101, "alpha_frac": 0.6039795739, "autogenerated": false, "ratio": 3.711764705882353, "config_test": false, "h...
from django.shortcuts import render from django.views.generic import ListView from ..cms.models import Page from ..utils import JsonView from .models import Original, Print class ShopOriginalsView(ListView): context_object_name = 'shop_items' queryset = Original.objects.filter(disable=False).order_by('-order...
{ "repo_name": "rogerhil/flaviabernardes", "path": "flaviabernardes/flaviabernardes/shop/views.py", "copies": "1", "size": "1517", "license": "apache-2.0", "hash": -3989964386069054500, "line_mean": 30.6041666667, "line_max": 75, "alpha_frac": 0.6328279499, "autogenerated": false, "ratio": 3.77363...
from django.shortcuts import render from django.views.generic import ListView from ipware.ip import get_real_ip from geoip2.errors import AddressNotFoundError from django.contrib.gis.geoip2 import GeoIP2 from django.utils.translation import ugettext_lazy as _ from royalfilms.movies.models import Movie from royalfilms...
{ "repo_name": "juliancantillo/royal-films", "path": "royalfilms/core/views.py", "copies": "1", "size": "1043", "license": "mit", "hash": 5718013986269012000, "line_mean": 26.4473684211, "line_max": 66, "alpha_frac": 0.6462128476, "autogenerated": false, "ratio": 3.8917910447761193, "config_test...
from django.shortcuts import render from django.views.generic import ( CreateView, TemplateView, UpdateView, FormView ) from django.core.urlresolvers import reverse_lazy from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.forms import PasswordChangeForm from .models import User from .f...
{ "repo_name": "Renanf68/gir_ecommerce", "path": "accounts/views.py", "copies": "1", "size": "1431", "license": "cc0-1.0", "hash": -200917588710701470, "line_mean": 27.0784313725, "line_max": 60, "alpha_frac": 0.7763801537, "autogenerated": false, "ratio": 3.4733009708737863, "config_test": fals...
from django.shortcuts import render from django.views.generic import ( TemplateView, ListView, CreateView, UpdateView, DeleteView, FormView ) from django.contrib.admin.forms import AdminAuthenticationForm from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse, re...
{ "repo_name": "tuanquanghpvn/bideox", "path": "apps/admin/views.py", "copies": "1", "size": "5722", "license": "mit", "hash": -1627894595029931500, "line_mean": 29.2804232804, "line_max": 67, "alpha_frac": 0.5900034953, "autogenerated": false, "ratio": 4.128427128427129, "config_test": false, ...
from django.shortcuts import render from django.views.generic import ( TemplateView, RedirectView, DetailView, DeleteView) from django.core.urlresolvers import reverse_lazy from models import Passage from datetime import date, timedelta import stathat class PlannerHome(TemplateView): """ The landin...
{ "repo_name": "BilgeCode/bilgecode.com", "path": "bilgecode/apps/passage_planner/views.py", "copies": "1", "size": "2155", "license": "mit", "hash": 550444311375531650, "line_mean": 26.6282051282, "line_max": 77, "alpha_frac": 0.6185614849, "autogenerated": false, "ratio": 3.7609075043630016, "...
from django.shortcuts import render from django.views.generic import TemplateView, CreateView, DeleteView, DetailView from django.core.urlresolvers import reverse_lazy from django.contrib.auth import authenticate, login from django.contrib.auth.mixins import LoginRequiredMixin from rockclimb.forms import * # Create...
{ "repo_name": "djstein/hci_final", "path": "hci/rockclimb/views.py", "copies": "1", "size": "3272", "license": "mit", "hash": 6871194092174341000, "line_mean": 28.2232142857, "line_max": 81, "alpha_frac": 0.674205379, "autogenerated": false, "ratio": 4.014723926380368, "config_test": false, "...
from django.shortcuts import render from django.views.generic import TemplateView, DetailView, CreateView, \ UpdateView from django.core.urlresolvers import reverse from braces.views import LoginRequiredMixin from .models import BlogPost from .forms import BlogPostBaseForm class BlogHomeTemplateView(TemplateVie...
{ "repo_name": "azul-cloud/cityinfo", "path": "blog/views.py", "copies": "1", "size": "1240", "license": "mit", "hash": -7577726669866166000, "line_mean": 22.3962264151, "line_max": 72, "alpha_frac": 0.6975806452, "autogenerated": false, "ratio": 4.105960264900662, "config_test": false, "has_n...
from django.shortcuts import render from django.views.generic import TemplateView, DetailView, ListView, CreateView, UpdateView, View from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.forms import ModelForm, Form import django.forms as forms #fro...
{ "repo_name": "inmagik/pollicino", "path": "pollicino/ui/views.py", "copies": "1", "size": "5208", "license": "mit", "hash": -1235306231772379400, "line_mean": 27.3043478261, "line_max": 97, "alpha_frac": 0.6883640553, "autogenerated": false, "ratio": 4.018518518518518, "config_test": true, "...
from django.shortcuts import render from django.views.generic import TemplateView, FormView, DeleteView, UpdateView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import HttpResponse from django.core.exceptions import PermissionDenied from...
{ "repo_name": "BUPT-OJ-V4/BOJ-V4", "path": "announcement/views.py", "copies": "1", "size": "3647", "license": "mit", "hash": -328046693095965000, "line_mean": 36.5979381443, "line_max": 89, "alpha_frac": 0.7063339731, "autogenerated": false, "ratio": 3.946969696969697, "config_test": false, "...
from django.shortcuts import render from django.views.generic import TemplateView, FormView, DetailView, View, DeleteView from django.views.generic.list import ListView from django.views.generic import CreateView from .models import RegisteredLecture, Lecture, AttendanceRecord from qa.models import Question, ClosedEnde...
{ "repo_name": "thebenwaters/openclickio", "path": "core/views.py", "copies": "1", "size": "6273", "license": "mit", "hash": 7018639436012625000, "line_mean": 35.2601156069, "line_max": 138, "alpha_frac": 0.7785748446, "autogenerated": false, "ratio": 3.3908108108108106, "config_test": false, ...
from django.shortcuts import render from django.views.generic import TemplateView, FormView, UpdateView, ListView from django.contrib import messages from django.core.files.storage import FileSystemStorage from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse from django.db.models im...
{ "repo_name": "dehu4ka/lna", "path": "argus/views.py", "copies": "1", "size": "6864", "license": "mit", "hash": 6267418239680436000, "line_mean": 40.3680981595, "line_max": 109, "alpha_frac": 0.5940975827, "autogenerated": false, "ratio": 3.853142857142857, "config_test": false, "has_no_keywo...
# from django.shortcuts import render # from django.views.generic import TemplateView # Create your views here. # Needed to get yur first page up and running # class SplashView(TemplateView): # template_name = "index.html" # Used for App from django.shortcuts import render from django.views.generic.base import Templ...
{ "repo_name": "georgebcservices/coffeedapp", "path": "core/views.py", "copies": "1", "size": "3101", "license": "mit", "hash": -3485348496954231000, "line_mean": 35.0581395349, "line_max": 194, "alpha_frac": 0.7213801999, "autogenerated": false, "ratio": 3.7316486161251503, "config_test": false...
from django.shortcuts import render from django.views.generic import TemplateView from courses.models import Courses from django.core.mail import EmailMessage from cms.models import Cms # Create your views here. class DefaultPage(TemplateView): template_name = 'default/index.html' # course_id = request.P...
{ "repo_name": "atulmishra-one/repose-academy", "path": "default/views.py", "copies": "1", "size": "1730", "license": "apache-2.0", "hash": 6073841856564819000, "line_mean": 34.306122449, "line_max": 116, "alpha_frac": 0.5520231214, "autogenerated": false, "ratio": 3.642105263157895, "config_tes...
from django.shortcuts import render from django.views.generic import TemplateView from django.conf import settings from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator # Create your views here. class HomeView(TemplateView): template_name = "web/home.html" ...
{ "repo_name": "hds-lab/dsechatweb", "path": "dsechat/apps/web/views.py", "copies": "1", "size": "2132", "license": "mit", "hash": -8529677180523775000, "line_mean": 32.3125, "line_max": 69, "alpha_frac": 0.6955909944, "autogenerated": false, "ratio": 3.6258503401360542, "config_test": false, ...
from django.shortcuts import render from django.views.generic import TemplateView from django.conf import settings from django.http import HttpResponseRedirect, HttpResponse from home.models import Saying, Author import os import random WORD_LIMIT = 100 class IndexView(TemplateView): template_name = os.path.j...
{ "repo_name": "ritashugisha/WiseSayingsSite", "path": "WiseSayingsSite/home/views.py", "copies": "1", "size": "1275", "license": "mit", "hash": 6724128278587051000, "line_mean": 25.5625, "line_max": 77, "alpha_frac": 0.6047058824, "autogenerated": false, "ratio": 4.009433962264151, "config_test...