text stringlengths 0 1.05M | meta dict |
|---|---|
from django.shortcuts import render
from django.views.generic import TemplateView
from django.core.mail import EmailMessage
# Create your views here.
class ContactUsPage(TemplateView):
template_name = 'contactus/index.html'
def get(self, request, *args, **kwargs):
return render(request, self.template... | {
"repo_name": "atulmishra-one/repose-academy",
"path": "contactus/views.py",
"copies": "1",
"size": "1675",
"license": "apache-2.0",
"hash": 8372878314650158000,
"line_mean": 33.9166666667,
"line_max": 116,
"alpha_frac": 0.5701492537,
"autogenerated": false,
"ratio": 3.931924882629108,
"config_... |
from django.shortcuts import render
from django.views.generic import TemplateView
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
import smtplib
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text ... | {
"repo_name": "siddver007/throttlr",
"path": "restServer/views.py",
"copies": "2",
"size": "6855",
"license": "mit",
"hash": 3980417268343087000,
"line_mean": 34.7083333333,
"line_max": 165,
"alpha_frac": 0.667979577,
"autogenerated": false,
"ratio": 3.2799043062200957,
"config_test": false,
... |
from django.shortcuts import render
from django.views.generic import TemplateView
from django.http import HttpResponse, JsonResponse, HttpResponseRedirect, Http404
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from djan... | {
"repo_name": "siddver007/project_django_allauth_slate_razorpay",
"path": "registerApp/views.py",
"copies": "1",
"size": "3436",
"license": "mit",
"hash": 8807875474566266000,
"line_mean": 33.36,
"line_max": 114,
"alpha_frac": 0.6260186263,
"autogenerated": false,
"ratio": 3.931350114416476,
"c... |
from django.shortcuts import render
from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from chef_profile.models import ChefProfile
from .forms import UserForm, ChefProfileForm
class ProfileView(TemplateView):
template_name = 'chef_profile/profile.html'
def edit_profile(r... | {
"repo_name": "TeamReciprocity/reciprocity",
"path": "reciprocity/chef_profile/views.py",
"copies": "1",
"size": "1036",
"license": "mit",
"hash": -580202757948788900,
"line_mean": 36,
"line_max": 77,
"alpha_frac": 0.7133204633,
"autogenerated": false,
"ratio": 3.8947368421052633,
"config_test"... |
from django.shortcuts import render
from django.views.generic import TemplateView
from django.shortcuts import redirect
from ..evaluation.models import Evaluation, Group_User
class showProfessorReport(TemplateView):
template_name= "report/professorReport.html"
def get(self, request, *args, **kwargs):
if not req... | {
"repo_name": "carlosa54/evaluation_system",
"path": "evaluation_system/reports/views.py",
"copies": "1",
"size": "1174",
"license": "mit",
"hash": 2627429588970180600,
"line_mean": 27.6341463415,
"line_max": 116,
"alpha_frac": 0.730834753,
"autogenerated": false,
"ratio": 3.4327485380116958,
"... |
from django.shortcuts import render
from django.views.generic import TemplateView
from django.shortcuts import redirect
from .forms import ProfessorEvaluateForm, AddGroupForm, AddAnswerForm
from ..course.models import Course
from .models import Group_User, Group, Evaluation
from ..users.models import User
from ..questi... | {
"repo_name": "carlosa54/evaluation_system",
"path": "evaluation_system/evaluation/views.py",
"copies": "1",
"size": "4360",
"license": "mit",
"hash": 4233491649365233000,
"line_mean": 32.5461538462,
"line_max": 143,
"alpha_frac": 0.7142201835,
"autogenerated": false,
"ratio": 3.441199684293607,
... |
from django.shortcuts import render
from django.views.generic import TemplateView
from django.views.generic.edit import CreateView
from jd_projects.models import Project, ProjectIncomeExpenses
from jd_projects.forms import ProjectRequestForm, ExpenseIncomeFormSet
from jd_projects.utils import send_project_request_emai... | {
"repo_name": "jonge-democraten/project-req",
"path": "jd_projects/views.py",
"copies": "1",
"size": "4604",
"license": "mit",
"hash": 4951638173242430000,
"line_mean": 43.6990291262,
"line_max": 97,
"alpha_frac": 0.6044743701,
"autogenerated": false,
"ratio": 4.500488758553275,
"config_test": ... |
from django.shortcuts import render
from django.views.generic import TemplateView
from .models import Biblioteca
from django.db.models import Q
from forms import *
# Create your views here.
class IndexView(TemplateView):
template_name = "biblioteca/index.html"
def get_context_data(self, **kwargs):
con... | {
"repo_name": "CARocha/ciat_plataforma",
"path": "biblioteca/views.py",
"copies": "3",
"size": "1791",
"license": "mit",
"hash": 2544936098867558000,
"line_mean": 37.1063829787,
"line_max": 91,
"alpha_frac": 0.6152987158,
"autogenerated": false,
"ratio": 3.6625766871165646,
"config_test": false... |
from django.shortcuts import render
from django.views.generic import TemplateView
from rest_framework import viewsets, filters
from rest_framework.decorators import detail_route, list_route
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from books.models import B... | {
"repo_name": "wlainer/react-redux-tutorial",
"path": "books/views.py",
"copies": "2",
"size": "2205",
"license": "unlicense",
"hash": 2886454949543246000,
"line_mean": 37.0344827586,
"line_max": 105,
"alpha_frac": 0.7283446712,
"autogenerated": false,
"ratio": 4.160377358490566,
"config_test":... |
from django.shortcuts import render
from django.views.generic import TemplateView
from rest_framework import viewsets, filters
from rest_framework.pagination import PageNumberPagination
from books.models import Book, Category, SubCategory, Author
from books.serializers import BookSerializer, CategorySerializer, SubCate... | {
"repo_name": "d0ntg0m0ng/react-tutorial-1",
"path": "books/views.py",
"copies": "2",
"size": "1872",
"license": "unlicense",
"hash": -3722802747465636400,
"line_mean": 37.2244897959,
"line_max": 105,
"alpha_frac": 0.7371794872,
"autogenerated": false,
"ratio": 4.1879194630872485,
"config_test"... |
from django.shortcuts import render
from django.views.generic import TemplateView
from .. import apis
from .mixins import LoginRequiredMixin
class BaseUpdateView(LoginRequiredMixin, TemplateView):
template_name = 'portfolio/index.html'
def post(self, request, *args, **kwargs):
context = self.get_con... | {
"repo_name": "mcouthon/mcrypto",
"path": "mcrypto/mcrypto_project/portfolio/views/api_views.py",
"copies": "1",
"size": "1104",
"license": "bsd-3-clause",
"hash": 8623516918052388000,
"line_mean": 31.4705882353,
"line_max": 76,
"alpha_frac": 0.7101449275,
"autogenerated": false,
"ratio": 4.01454... |
from django.shortcuts import render
from django.views.generic import TemplateView
import icusync.models
def get_button_class(sold, initial):
btn_class = 'info'
danger_max = initial * 0.2
warning_max = initial * 0.4
success_max = initial * 0.75
if sold < danger_max:
btn_class = 'danger'
... | {
"repo_name": "icucinema/inventory",
"path": "sitewide/views.py",
"copies": "1",
"size": "2755",
"license": "mit",
"hash": 1816727367991411500,
"line_mean": 32.5975609756,
"line_max": 127,
"alpha_frac": 0.5462794918,
"autogenerated": false,
"ratio": 3.9583333333333335,
"config_test": false,
"... |
from django.shortcuts import render
from django.views.generic import TemplateView
import pandas as pd
from .utils import clean_html
from form_submissions.models import FormResponse
from typeforms.models import Typeform
class DashboardView(TemplateView):
template_name = 'dashboard.html'
def get(self, reques... | {
"repo_name": "zkan/intage-dash",
"path": "intage_dash/dashboards/views.py",
"copies": "1",
"size": "5761",
"license": "mit",
"hash": 1409392727869662500,
"line_mean": 33.9151515152,
"line_max": 77,
"alpha_frac": 0.5085922583,
"autogenerated": false,
"ratio": 4.36109008327025,
"config_test": fa... |
from django.shortcuts import render
from django.views.generic import TemplateView, View, ListView, DetailView
from league.models import Schedule, Standings, Season, Player, Team, STANDINGS_ORDER
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
class StandingsFull(ListView):
... | {
"repo_name": "mgawrys1/django-league",
"path": "views.py",
"copies": "1",
"size": "5986",
"license": "mit",
"hash": 3491595343282816500,
"line_mean": 36.6477987421,
"line_max": 130,
"alpha_frac": 0.5932175075,
"autogenerated": false,
"ratio": 3.7576898932831138,
"config_test": false,
"has_no... |
from django.shortcuts import render
from django.views.generic import TemplateView, View
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from django.views.decorators.csrf import csrf_exempt
from django.conf import settings
from django.db.models import Count, Q, Prefetch
from c... | {
"repo_name": "protwis/protwis",
"path": "construct/views.py",
"copies": "1",
"size": "133974",
"license": "apache-2.0",
"hash": 3559478181824264700,
"line_mean": 51.7872340426,
"line_max": 395,
"alpha_frac": 0.535872632,
"autogenerated": false,
"ratio": 3.681211188657471,
"config_test": false,... |
from django.shortcuts import render
from django.views.generic import View, CreateView, UpdateView
from django.utils.decorators import method_decorator
from django_twilio.decorators import twilio_view
from twilio.twiml import Response
import datetime
from ehs_esports.home.models import Meeting
from ehs_esports.users.mo... | {
"repo_name": "ReilySiegel/ehs_esports",
"path": "ehs_esports/sms/views.py",
"copies": "1",
"size": "3447",
"license": "mit",
"hash": -8088338864586129000,
"line_mean": 40.5301204819,
"line_max": 154,
"alpha_frac": 0.5308964317,
"autogenerated": false,
"ratio": 4.48828125,
"config_test": false,... |
from django.shortcuts import render
from django.views.generic import View, ListView, CreateView, UpdateView
from django.http import HttpResponseRedirect
from django.utils.decorators import method_decorator
from django.contrib.auth import authenticate, login, logout
from django.views.decorators.cache import never_cache
... | {
"repo_name": "itpubs/OneStack",
"path": "apps/account/views.py",
"copies": "1",
"size": "2236",
"license": "mit",
"hash": -3953026500431558000,
"line_mean": 30.4084507042,
"line_max": 71,
"alpha_frac": 0.6955156951,
"autogenerated": false,
"ratio": 4.121996303142329,
"config_test": false,
"h... |
from django.shortcuts import render
from django.views.generic import View, ListView, DetailView
from django.shortcuts import render_to_response
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from models import Case, Category
class CaseListView(View):
def get(self, request, *args, **kwarg... | {
"repo_name": "wrongerror/landsite",
"path": "apps/case/views.py",
"copies": "1",
"size": "1577",
"license": "mit",
"hash": -4743758839098726000,
"line_mean": 39.4615384615,
"line_max": 80,
"alpha_frac": 0.5681674065,
"autogenerated": false,
"ratio": 4.417366946778712,
"config_test": false,
"... |
from django.shortcuts import render
from django.views.generic import View, ListView
from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators import method_decorator
from django.http import HttpResponse, HttpResponseForbidden
from .models import JsonEndpoint, AuthEndpoint, MockObjectClass, MockO... | {
"repo_name": "timbroder/JsonEndpoint",
"path": "djangosite/endpoint/views.py",
"copies": "2",
"size": "4193",
"license": "mit",
"hash": 185517680848657570,
"line_mean": 29.384057971,
"line_max": 138,
"alpha_frac": 0.6296207966,
"autogenerated": false,
"ratio": 4.345077720207254,
"config_test":... |
from django.shortcuts import render
from django.views.generic import View
from ..api.api import MarksApi,studentApi,StudentContactDetailsApi
import json
from django.http import JsonResponse
from django.http import HttpResponse
class MarksView(View):
http_method_names = ['get', 'put', 'post', 'delete']
def get... | {
"repo_name": "meranamvarun/restapi",
"path": "student_database/views/views.py",
"copies": "1",
"size": "5502",
"license": "mit",
"hash": 2202702173110362400,
"line_mean": 31.3705882353,
"line_max": 115,
"alpha_frac": 0.5216284987,
"autogenerated": false,
"ratio": 4.5283950617283955,
"config_te... |
from django.shortcuts import render
from django.views.generic import View
from baseapp.models import *
from students.models import Child_detail
from django.template.loader import get_template
from django.template import Context
import cStringIO as StringIO
import xhtml2pdf.pisa as pisa
from django.http import HttpR... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "reports/views.py",
"copies": "3",
"size": "12125",
"license": "mit",
"hash": -5257416368314458000,
"line_mean": 61.1794871795,
"line_max": 421,
"alpha_frac": 0.6367010309,
"autogenerated": false,
"ratio": 3.75968992248062,
"config_test": false,
"... |
from django.shortcuts import render
from django.views.generic import View
from baseapp.models import School,Block,Class_Studying,Academic_Year,District
from students.models import Child_detail
from django.template.loader import get_template
from django.template import Context
import cStringIO as StringIO
import xhtml2... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "reports_basic/views.py",
"copies": "3",
"size": "10027",
"license": "mit",
"hash": 535483344508277800,
"line_mean": 79.216,
"line_max": 337,
"alpha_frac": 0.675177022,
"autogenerated": false,
"ratio": 3.5381086803105153,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.views.generic import View
from braces.views import MultiplePermissionsRequiredMixin
from questionnaire.models import Questionnaire, Country
from questionnaire.services.users import UserQuestionnaireService
class PreviewQuestionnaire(MultiplePermissionsRequiredMixin, Vi... | {
"repo_name": "eJRF/ejrf",
"path": "questionnaire/views/questionnaire_preview.py",
"copies": "1",
"size": "1965",
"license": "bsd-3-clause",
"hash": 4385679980398731000,
"line_mean": 53.6111111111,
"line_max": 119,
"alpha_frac": 0.7165394402,
"autogenerated": false,
"ratio": 3.891089108910891,
... |
from django.shortcuts import render
from django.views.generic import View
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, JsonResponse
from django.utils import timezone
from .forms import PhotoForm, DeleteForm
from .mod... | {
"repo_name": "andela-tadesanya/django-photo-application",
"path": "django_photo/photo/views.py",
"copies": "1",
"size": "5672",
"license": "mit",
"hash": 4134950528429443000,
"line_mean": 33.1686746988,
"line_max": 140,
"alpha_frac": 0.6406911142,
"autogenerated": false,
"ratio": 3.9915552427867... |
from django.shortcuts import render
from django.views.generic import View
from django.contrib.auth import authenticate, login
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect
from accounts.forms import SignUpForm, SignInFo... | {
"repo_name": "shanghaionline/wujing",
"path": "accounts/views.py",
"copies": "1",
"size": "1065",
"license": "mit",
"hash": 6140873872979328000,
"line_mean": 38.4444444444,
"line_max": 81,
"alpha_frac": 0.7117370892,
"autogenerated": false,
"ratio": 4.0494296577946765,
"config_test": false,
... |
from django.shortcuts import render
from django.views.generic import View
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseNotFound
from django.views.generic.edit import FormView
from django.contrib.auth.mo... | {
"repo_name": "okfn/opd-brand-manager",
"path": "manager/apps/brand/views.py",
"copies": "2",
"size": "5081",
"license": "mit",
"hash": 7763413551975256000,
"line_mean": 32.4276315789,
"line_max": 74,
"alpha_frac": 0.579019878,
"autogenerated": false,
"ratio": 3.947940947940948,
"config_test": ... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.template import RequestContext, loader
from django.utils import timezone
from imagr.models import Imagr_User, Photo, Album
from forms import UploadFileForm, CreateAlb... | {
"repo_name": "markableidinger/django_imagr",
"path": "imagr/views.py",
"copies": "1",
"size": "8431",
"license": "mit",
"hash": 85831251632563680,
"line_mean": 38.5821596244,
"line_max": 160,
"alpha_frac": 0.6242438619,
"autogenerated": false,
"ratio": 3.999525616698292,
"config_test": false,
... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse, Http404
from backlogs.models import Backlog
from models import BacklogItem
from django.contrib.auth.models import User
from django.shortcuts import render_to_response
from django.template import RequestContex... | {
"repo_name": "anoncb1754/backlogr_py",
"path": "backlogr/backlog_items/views.py",
"copies": "1",
"size": "5647",
"license": "unlicense",
"hash": 2183425304854713600,
"line_mean": 41.1417910448,
"line_max": 122,
"alpha_frac": 0.69151762,
"autogenerated": false,
"ratio": 3.867808219178082,
"conf... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse, HttpResponseRedirect
from blog.models import Blog, Entry, Category, EntryComment
from nonhumanuser.utils import *
from .forms import EntryCommentForm
import datetime
# Create your views here.
class IndexView... | {
"repo_name": "bane138/nonhumanuser",
"path": "blog/views.py",
"copies": "1",
"size": "9450",
"license": "mit",
"hash": 7150499722606204000,
"line_mean": 37.418699187,
"line_max": 104,
"alpha_frac": 0.6828571429,
"autogenerated": false,
"ratio": 3.1343283582089554,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import timezone
from actual_play.models import GameGroup, Game, GameType
from actual_play.forms import GameCommentForm
from nonhumanuser.utils import *
from nonhumanuser... | {
"repo_name": "bane138/nonhumanuser",
"path": "actual_play/views.py",
"copies": "1",
"size": "13181",
"license": "mit",
"hash": 2143840941684505300,
"line_mean": 51.9357429719,
"line_max": 164,
"alpha_frac": 0.4760640316,
"autogenerated": false,
"ratio": 4.6135806790339515,
"config_test": false... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse
from models import Backlog
from django.contrib.auth.models import User
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.core.paginator import Paginator, Em... | {
"repo_name": "anoncb1754/backlogr_py",
"path": "backlogr/backlogs/views.py",
"copies": "1",
"size": "3990",
"license": "unlicense",
"hash": 6414880184959865000,
"line_mean": 40.5625,
"line_max": 203,
"alpha_frac": 0.654887218,
"autogenerated": false,
"ratio": 4.318181818181818,
"config_test": ... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse
import socket
# Haberleşme IP Belirlenmesi :
haberlesme_ip = "127.0.0.1"
# Haberleşme Portunun Belirlenmesi :
haberlesme_port = 12000
# Haberleşme Protokollerinin Belirlenmesi :
socket_server = socket.socket... | {
"repo_name": "ardamavi/Web-Satranc",
"path": "web_satranc/satranc/views.py",
"copies": "1",
"size": "5656",
"license": "apache-2.0",
"hash": 1073621329022281300,
"line_mean": 29.6793478261,
"line_max": 141,
"alpha_frac": 0.4552701506,
"autogenerated": false,
"ratio": 3.382264829239065,
"config... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponseRedirect
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth import login as auth_login
from users.forms import RegistrationForm, LoginForm
from django.contrib.auth.models import U... | {
"repo_name": "Heteroskedastic/Dr-referral-tracker",
"path": "users/views.py",
"copies": "1",
"size": "1973",
"license": "mit",
"hash": 5460653319756300000,
"line_mean": 34.2321428571,
"line_max": 75,
"alpha_frac": 0.6320324379,
"autogenerated": false,
"ratio": 4.326754385964913,
"config_test":... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponseRedirect
from forms import RegisterForm , LoginForm
from django.contrib.auth.models import User
from django.db import IntegrityError
from django.contrib.auth import authenticate , login , logout
class Registe... | {
"repo_name": "abhishek97/arena",
"path": "account/views.py",
"copies": "1",
"size": "2268",
"license": "mit",
"hash": 8155227415723710000,
"line_mean": 31.8695652174,
"line_max": 119,
"alpha_frac": 0.6710758377,
"autogenerated": false,
"ratio": 3.2821997105643996,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from data_storage_management.models import HardDisk, Directory, DirectoryImportLog
from django.views.decorators.csrf import csrf_exempt
import json
# This file is part of https://github.com/cpina/science-crui... | {
"repo_name": "cpina/science-cruise-data-management",
"path": "ScienceCruiseDataManagement/data_storage_management/views.py",
"copies": "1",
"size": "3708",
"license": "mit",
"hash": -9194524975988301000,
"line_mean": 35.362745098,
"line_max": 105,
"alpha_frac": 0.6607335491,
"autogenerated": false... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from django.db import connection
from django.db.models.query import Prefetch
from django.utils import timezone, dateparse
from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators impo... | {
"repo_name": "SmartcitySantiagoChile/onlineGPS",
"path": "beacon/views.py",
"copies": "1",
"size": "7095",
"license": "mit",
"hash": 1018974010283401000,
"line_mean": 29.4506437768,
"line_max": 85,
"alpha_frac": 0.5656095842,
"autogenerated": false,
"ratio": 4.125,
"config_test": false,
"has... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from django.db import connection
from timeperstreet.models import Tramos15Min, OrigenYDestinoEjes15Min, EjesMacro, VelocidadGlobal
# Create your views here.
class GetStreetData(View):
'''This class reque... | {
"repo_name": "SmartcitySantiagoChile/onlineGPS",
"path": "timeperstreet/views.py",
"copies": "1",
"size": "7412",
"license": "mit",
"hash": -5740948632097430000,
"line_mean": 35.8756218905,
"line_max": 116,
"alpha_frac": 0.5887749595,
"autogenerated": false,
"ratio": 3.8684759916492695,
"confi... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from django.db import connection
from velocityperstreet.models import Tramos15Min, OrigenYDestinoEjes15Min
# Create your views here.
class GetStreetData(View):
'''This class requests to the database the ... | {
"repo_name": "SmartcitySantiagoChile/onlineGPS",
"path": "velocityperstreet/views.py",
"copies": "1",
"size": "4427",
"license": "mit",
"hash": 1211882055951874300,
"line_mean": 38.1769911504,
"line_max": 108,
"alpha_frac": 0.5949853174,
"autogenerated": false,
"ratio": 3.977538185085355,
"con... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from django.db import connection
import requests
import json
import os
# Create your views here.
class AlertTableHandler(View):
''' '''
def __init__(self):
"""the contructor, context are the... | {
"repo_name": "SmartcitySantiagoChile/onlineGPS",
"path": "alerts/views.py",
"copies": "1",
"size": "1172",
"license": "mit",
"hash": 4506713401781843000,
"line_mean": 25.6363636364,
"line_max": 82,
"alpha_frac": 0.6322525597,
"autogenerated": false,
"ratio": 4.069444444444445,
"config_test": f... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from esperaparaderos.models import InfoParadas
from datetime import datetime
# Create your views here.
class GetWaitingUsersByBusStop(View):
'''This class requests to the database the number of users ar... | {
"repo_name": "SmartcitySantiagoChile/onlineGPS",
"path": "esperaparaderos/views.py",
"copies": "1",
"size": "2240",
"license": "mit",
"hash": -8268961159407611000,
"line_mean": 34.5555555556,
"line_max": 99,
"alpha_frac": 0.6714285714,
"autogenerated": false,
"ratio": 3.902439024390244,
"confi... |
from django.shortcuts import render
from django.views.generic import View
from django.http import JsonResponse
from wquests import common_functions
from wqengine.models import WebQuest, WebQuestVersion, WebQuestVersionSection
def wrap_json(container_type, content):
wrapper = {}
wrapper["$schema"] = "http://js... | {
"repo_name": "priakni/wquests",
"path": "wquests/webapi/views.py",
"copies": "1",
"size": "3803",
"license": "mit",
"hash": 5100542563311069000,
"line_mean": 47.1518987342,
"line_max": 132,
"alpha_frac": 0.648698396,
"autogenerated": false,
"ratio": 3.8845760980592443,
"config_test": false,
... |
from django.shortcuts import render
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from .forms import UploadRefDbForm
from .tasks import loadRefDb
from .models import Sequence
fro... | {
"repo_name": "mstrehse/geneclust-server",
"path": "app/sequence/views.py",
"copies": "1",
"size": "1360",
"license": "mit",
"hash": -7185108549958280000,
"line_mean": 27.3333333333,
"line_max": 66,
"alpha_frac": 0.675,
"autogenerated": false,
"ratio": 4.121212121212121,
"config_test": false,
... |
from django.shortcuts import render
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.contrib import messages
from account.forms import PasswordChangeForm, EmailChangeForm
from prosodyauth.mixins import LoginRequiredMixin
from prosodyauth.models import Prosody
from... | {
"repo_name": "Kromey/fbxnano",
"path": "account/views.py",
"copies": "2",
"size": "2851",
"license": "mit",
"hash": 1246319093454613200,
"line_mean": 34.6375,
"line_max": 104,
"alpha_frac": 0.6338126973,
"autogenerated": false,
"ratio": 4.496845425867508,
"config_test": false,
"has_no_keywor... |
from django.shortcuts import render
from django.views.generic import View
from django.views.generic.base import RedirectView
from django.views.generic.edit import FormMixin
from django.views.generic.list import ListView
from django.shortcuts import get_object_or_404
from billing.models import Order
from .mixins import... | {
"repo_name": "Maelstroms38/ecommerce",
"path": "src/answers/views.py",
"copies": "1",
"size": "2545",
"license": "mit",
"hash": -4558079528012644400,
"line_mean": 30.0487804878,
"line_max": 70,
"alpha_frac": 0.6436149312,
"autogenerated": false,
"ratio": 4.072,
"config_test": false,
"has_no_... |
from django.shortcuts import render
from django.views.generic import View
from game_info.models import Player
import time
def index(request):
current_players = get_current_players()
return render(request, 'gmod/gmod.html', {'current_players' : current_players})
def get_current_players():
try:
# q... | {
"repo_name": "aldenjenkins/foobargamingwebsite",
"path": "gmod/views.py",
"copies": "1",
"size": "1369",
"license": "bsd-3-clause",
"hash": -2502738871187107000,
"line_mean": 39.2941176471,
"line_max": 116,
"alpha_frac": 0.5471146822,
"autogenerated": false,
"ratio": 4.002923976608187,
"config... |
from django.shortcuts import render
from django.views.generic import View
from github import Github
from web.utils.pullrequest_utils import (
get_mentions_from_body_and_issue_comments,
get_reviewers
)
class PullRequestView(View):
template_name = 'pullrequest/pull_request.html'
def get(self, request):... | {
"repo_name": "Qubad786/pr-code-review",
"path": "web/pullrequest/views.py",
"copies": "1",
"size": "1874",
"license": "mit",
"hash": 7543433480966366000,
"line_mean": 35.0384615385,
"line_max": 102,
"alpha_frac": 0.5805763074,
"autogenerated": false,
"ratio": 4.109649122807017,
"config_test": ... |
from django.shortcuts import render
from django.views.generic import View
from library.models import Item, Stack, ItemComment
from library.forms import ItemCommentForm
from nonhumanuser import settings
import os
import mimetypes
from django.http import HttpResponse, HttpResponseRedirect
from wsgiref.util import FileWra... | {
"repo_name": "bane138/nonhumanuser",
"path": "library/views.py",
"copies": "1",
"size": "6053",
"license": "mit",
"hash": -4597575843376737300,
"line_mean": 36.3703703704,
"line_max": 96,
"alpha_frac": 0.676689245,
"autogenerated": false,
"ratio": 3.120103092783505,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.views.generic import View
from .models import Categoria, Articulo
class Que_es(View):
def get(self,request):
template_name="que-es.html"
return render(request,template_name)
class Categorias(View):
def get(self,request):
template_name = 'categorias.html'... | {
"repo_name": "SurielRuano/Orientador-Legal",
"path": "plataforma/views.py",
"copies": "1",
"size": "1435",
"license": "mit",
"hash": -1354664854194522600,
"line_mean": 24.1929824561,
"line_max": 64,
"alpha_frac": 0.7282229965,
"autogenerated": false,
"ratio": 2.887323943661972,
"config_test": ... |
from django.shortcuts import render
from django.views.generic import View
from .models import Tweet, HashTag
from user_profile.models import User
from .forms import TweetForm
from django.http import HttpResponseRedirect
class Index(View):
def get(self, request):
params = {}
params["name"] = "Karol"... | {
"repo_name": "pananormalny/mytweeter",
"path": "tweets/views.py",
"copies": "1",
"size": "1697",
"license": "apache-2.0",
"hash": 1731799732154432800,
"line_mean": 34.3541666667,
"line_max": 104,
"alpha_frac": 0.5886859163,
"autogenerated": false,
"ratio": 4.099033816425121,
"config_test": fal... |
from django.shortcuts import render
from django.views.generic import View
from .models import Tweet, Statistics
from tweet_processing import utility
from user_handle import utility as user_util
from datetime import datetime, timedelta
import pytz
import forms
class TweetsFilter(View):
def get(self, request, entit... | {
"repo_name": "vincentfung13/TwitterRepManagement",
"path": "twitter_services/views.py",
"copies": "1",
"size": "4305",
"license": "mit",
"hash": 5093214054394194000,
"line_mean": 44.3263157895,
"line_max": 117,
"alpha_frac": 0.5665505226,
"autogenerated": false,
"ratio": 4.366125760649087,
"co... |
from django.shortcuts import render
from django.views.generic import View
from questionnaire.models import Questionnaire
from questionnaire.services.users import UserQuestionnaireService
from braces.views import PermissionRequiredMixin, MultiplePermissionsRequiredMixin
class PreviewQuestionnaire(MultiplePermissionsRe... | {
"repo_name": "testvidya11/ejrf",
"path": "questionnaire/views/questionnaire_preview.py",
"copies": "1",
"size": "1124",
"license": "bsd-3-clause",
"hash": 5427153849586760000,
"line_mean": 47.8695652174,
"line_max": 107,
"alpha_frac": 0.7419928826,
"autogenerated": false,
"ratio": 3.971731448763... |
from django.shortcuts import render
from django.views.generic import View
from data_interrogator import forms
from data_interrogator.interrogators import PivotInterrogator
class PivotTableView(View):
form_class = forms.PivotTableForm
template_name = 'data_interrogator/pivot.html'
def get(self, reque... | {
"repo_name": "LegoStormtroopr/django-data-interrogator",
"path": "data_interrogator/views/pivot.py",
"copies": "1",
"size": "1123",
"license": "mit",
"hash": -2405049748430270500,
"line_mean": 39.1071428571,
"line_max": 123,
"alpha_frac": 0.6669634907,
"autogenerated": false,
"ratio": 3.88581314... |
from django.shortcuts import render
from django.views.generic import View
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
import json
import graphAnalyzer
#Load the full graph over here
analyzerObj = graphAnalyzer.graphAnalyze("program.dot")
def ex... | {
"repo_name": "hdwiv/swviz",
"path": "views.py",
"copies": "1",
"size": "2993",
"license": "bsd-3-clause",
"hash": -8884908579888165000,
"line_mean": 43.671641791,
"line_max": 128,
"alpha_frac": 0.6839291681,
"autogenerated": false,
"ratio": 4.145429362880886,
"config_test": false,
"has_no_ke... |
from django.shortcuts import render
from django.views.generic import View, TemplateView, ListView,DetailView
from django.views.generic.edit import FormMixin
from django.http import HttpResponseRedirect, Http404, HttpResponseForbidden, JsonResponse
from django.core.urlresolvers import reverse, reverse_lazy
from django.c... | {
"repo_name": "ClovisDj/Playconnect4",
"path": "userprofile/views.py",
"copies": "1",
"size": "10505",
"license": "mit",
"hash": 4955654331181483000,
"line_mean": 39.7170542636,
"line_max": 165,
"alpha_frac": 0.612184674,
"autogenerated": false,
"ratio": 4.1456195737963695,
"config_test": false... |
from django.shortcuts import render
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.base import TemplateView
from game.models import Location
class LocationListView(ListView):
template_name = 'game/location_list.html'
context_object_na... | {
"repo_name": "Javid-Izadfar/TaOonja",
"path": "taOonja/game/views.py",
"copies": "1",
"size": "1044",
"license": "mit",
"hash": -5258108029225016000,
"line_mean": 25.7692307692,
"line_max": 76,
"alpha_frac": 0.714559387,
"autogenerated": false,
"ratio": 3.96958174904943,
"config_test": false,
... |
from django.shortcuts import render
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
from .models import Contact
def index(request):
"""Old ... | {
"repo_name": "cyberj/djanglavel",
"path": "djanglavel/notebook/views.py",
"copies": "1",
"size": "1376",
"license": "mit",
"hash": -1332767422159654000,
"line_mean": 24.0181818182,
"line_max": 75,
"alpha_frac": 0.7042151163,
"autogenerated": false,
"ratio": 4.083086053412463,
"config_test": fa... |
from django.shortcuts import render
from django.views import generic
# Create your views here.
from .models import Book, Author, BookInstance, Genre
def index(request):
"""
View function for home page of site.
"""
# Generate counts of some of the main objects
num_books=Book.objects.all().cou... | {
"repo_name": "amit-sgwn/Local-Library",
"path": "catalog/views.py",
"copies": "1",
"size": "1340",
"license": "apache-2.0",
"hash": -3175499435531860000,
"line_mean": 44.3103448276,
"line_max": 168,
"alpha_frac": 0.6895522388,
"autogenerated": false,
"ratio": 3.929618768328446,
"config_test": ... |
from django.shortcuts import render
from django.views import generic
from agreement.models import *
from home.models import *
from django.http import Http404
class AgreeViews(generic.View):
templates_file = 'agreement.html'
def get(self, request):
lang = request.LANGUAGE_CODE
languages = li... | {
"repo_name": "CooloiStudio/Django_deskxd.com",
"path": "agreement/views.py",
"copies": "1",
"size": "7568",
"license": "mit",
"hash": 2832067722179577300,
"line_mean": 32.1973684211,
"line_max": 114,
"alpha_frac": 0.4320824524,
"autogenerated": false,
"ratio": 4.246913580246914,
"config_test":... |
from django.shortcuts import render
from django.views import generic
from album.models import Album
from django.utils import timezone
from django.utils.translation import ugettext as _
from django.conf import settings
from song.models import Song
from artist.models import Artist
from pure_pagination.mixins import Pagin... | {
"repo_name": "contactr2m/remote_repo",
"path": "src/album/views.py",
"copies": "1",
"size": "5162",
"license": "mit",
"hash": -4365521830714275300,
"line_mean": 31.465408805,
"line_max": 97,
"alpha_frac": 0.5761332817,
"autogenerated": false,
"ratio": 3.7378711078928313,
"config_test": false,
... |
from django.shortcuts import render
from django.views import generic
from catalogue.models import Post
from django.contrib.postgres.search import SearchVector
from django.http import HttpResponse
from member.models import Member
import requests
import json
import re
import xml.etree.ElementTree as ET
import urllib
from... | {
"repo_name": "R-Wolf/CFD_A_library",
"path": "catalogue/views.py",
"copies": "1",
"size": "1270",
"license": "mit",
"hash": -2879707700831424500,
"line_mean": 31.5897435897,
"line_max": 67,
"alpha_frac": 0.7409448819,
"autogenerated": false,
"ratio": 3.4048257372654156,
"config_test": false,
... |
from django.shortcuts import render
from django.views import generic
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from .models import Blat
#def home(request):
# return render(request, 'blat/home.html',
# {'message': 'Hello world!'})
class IndexView(... | {
"repo_name": "philmui/blather",
"path": "blat/views.py",
"copies": "1",
"size": "1523",
"license": "mit",
"hash": 6046400778298352000,
"line_mean": 26.6909090909,
"line_max": 79,
"alpha_frac": 0.7281680893,
"autogenerated": false,
"ratio": 2.9921414538310414,
"config_test": false,
"has_no_ke... |
from django.shortcuts import render
from django.views import generic
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.contrib.auth.decorators import permission_required
from django.shortcuts import get_object_or_404
from django.http im... | {
"repo_name": "escottgoodwin/djangolocallibrary",
"path": "catalog/views.py",
"copies": "1",
"size": "5348",
"license": "mit",
"hash": 1840633728527667000,
"line_mean": 36.1388888889,
"line_max": 210,
"alpha_frac": 0.7157816006,
"autogenerated": false,
"ratio": 3.8391959798994977,
"config_test"... |
from django.shortcuts import render
from django.views import generic
from django.core.urlresolvers import reverse_lazy
from .models import Comment
class IndexView(generic.ListView):
template_name = 'comments/index.html'
context_object_name = 'comment_list'
def get_queryset(self):
"""Return a lis... | {
"repo_name": "MrCrawdaddy/humans",
"path": "comments/views.py",
"copies": "1",
"size": "1458",
"license": "mit",
"hash": 7804837745326715000,
"line_mean": 24.1379310345,
"line_max": 58,
"alpha_frac": 0.6262002743,
"autogenerated": false,
"ratio": 4.142045454545454,
"config_test": false,
"has... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, logout
from django.core.urlresolvers import reverse
def sign_in(request):
if 'username' in request.POST and request.POST['username']... | {
"repo_name": "biansetuliao/ArtWorkManager",
"path": "login/views.py",
"copies": "1",
"size": "1424",
"license": "mit",
"hash": -8910489893467441000,
"line_mean": 27.5,
"line_max": 109,
"alpha_frac": 0.6530898876,
"autogenerated": false,
"ratio": 4.535031847133758,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from game.models import *
from home.models import *
from django.utils.translation import ugettext
class IndexViews(generic.View):
templates_file = 'GameInd... | {
"repo_name": "CooloiStudio/Django_deskxd.com",
"path": "game/views.py",
"copies": "1",
"size": "4533",
"license": "mit",
"hash": 5197194995637447000,
"line_mean": 33.8769230769,
"line_max": 114,
"alpha_frac": 0.4438561659,
"autogenerated": false,
"ratio": 4.166360294117647,
"config_test": fals... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
# from django.views.decorators.csrf import csrf_exempt
import time
import json
import codecs
class IndexViews(generic.View):
templates_file = 'turanga.html'
def get(self, request)... | {
"repo_name": "CooloiStudio/Report_deskxd_com",
"path": "turanga/views.py",
"copies": "1",
"size": "1263",
"license": "mit",
"hash": -8393123568595428000,
"line_mean": 22.8490566038,
"line_max": 91,
"alpha_frac": 0.5985748219,
"autogenerated": false,
"ratio": 4.238255033557047,
"config_test": f... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
from gist.models import *
from django.contrib.auth.models import *
import os
import codecs
class IndexViews(generic.View):
templates_file = 'gist.html'
def get(self, request):
... | {
"repo_name": "CooloiStudio/Django_deskxd.com",
"path": "gist/views.py",
"copies": "1",
"size": "6438",
"license": "mit",
"hash": 6682676469095793000,
"line_mean": 26.75,
"line_max": 113,
"alpha_frac": 0.5402298851,
"autogenerated": false,
"ratio": 4.140192926045016,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
from information.models import *
from home.models import Menu, MenuInfo, Languages, Contact, ContactInfo
from django.http import Http404
class IndexViews(generic.View):
templates_file = '... | {
"repo_name": "CooloiStudio/Django_deskxd.com",
"path": "information/views.py",
"copies": "1",
"size": "5002",
"license": "mit",
"hash": -80449181627123490,
"line_mean": 34.9928057554,
"line_max": 114,
"alpha_frac": 0.4512195122,
"autogenerated": false,
"ratio": 4.221097046413502,
"config_test"... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
from member.models import *
from home.models import *
from django.http import Http404
import re
class IndexViews(generic.View):
templates_file = 'MemberIndex.html'
def get(self, requ... | {
"repo_name": "CooloiStudio/Django_deskxd.com",
"path": "member/views.py",
"copies": "1",
"size": "5179",
"license": "mit",
"hash": -4574254478634349000,
"line_mean": 36,
"line_max": 114,
"alpha_frac": 0.4151380575,
"autogenerated": false,
"ratio": 4.30865224625624,
"config_test": false,
"has... |
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponse, HttpResponseRedirect
from thanks.models import *
from home.models import *
from django.http import Http404
import random
class IndexViews(generic.View):
templates_file = 'thanksIndex.html'
def get(self, ... | {
"repo_name": "CooloiStudio/Django_deskxd.com",
"path": "thanks/views.py",
"copies": "1",
"size": "3899",
"license": "mit",
"hash": -141951436381698180,
"line_mean": 32.3333333333,
"line_max": 114,
"alpha_frac": 0.4449858938,
"autogenerated": false,
"ratio": 4.233441910966341,
"config_test": fa... |
from django.shortcuts import render
from django.views import generic
from django import forms
from crispy_forms.helper import *
from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit
def index(request):
treeform = FractalTreeForm()
params = [4,10,17, 30, [2,-3,4,-5]]
if request.method == ... | {
"repo_name": "nino-c/plerp.org",
"path": "src/fractal_tree/views.py",
"copies": "1",
"size": "2545",
"license": "mit",
"hash": -4668123041496165000,
"line_mean": 27.595505618,
"line_max": 101,
"alpha_frac": 0.5697445972,
"autogenerated": false,
"ratio": 3.579465541490858,
"config_test": false,... |
from django.shortcuts import render
from django.views import generic
from django.urls import reverse
from django.core.exceptions import ValidationError
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import get_object_or_404
from django.contrib.auth.decorators import login_required, use... | {
"repo_name": "ByrdOfAFeather/AlphaTrion",
"path": "Community/views/community_surveys.py",
"copies": "1",
"size": "6161",
"license": "mit",
"hash": 8697233014722105000,
"line_mean": 29.6517412935,
"line_max": 178,
"alpha_frac": 0.7175783152,
"autogenerated": false,
"ratio": 3.3483695652173915,
... |
from django.shortcuts import render
from django.views import generic
from django.utils.decorators import method_decorator
from django.contrib.admin.views.decorators import staff_member_required
from .forms import GPSearchForm
from .models import enquire_google_places, ReCa, Activity, Accomodation, Beach
from .serializ... | {
"repo_name": "popara/jonny-api",
"path": "matching/venues/aviews.py",
"copies": "1",
"size": "1718",
"license": "mit",
"hash": 2911633412184667000,
"line_mean": 26.2698412698,
"line_max": 100,
"alpha_frac": 0.7398137369,
"autogenerated": false,
"ratio": 3.5277207392197125,
"config_test": false... |
from django.shortcuts import render
from django.views import generic
from django.utils import timezone
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Documentary
from comments.models import Comment
class IndexView(generic.ListV... | {
"repo_name": "MrCrawdaddy/humans",
"path": "documentaries/views.py",
"copies": "1",
"size": "2298",
"license": "mit",
"hash": -6085817347007201000,
"line_mean": 28.0886075949,
"line_max": 108,
"alpha_frac": 0.6135770235,
"autogenerated": false,
"ratio": 4.3522727272727275,
"config_test": false... |
from django.shortcuts import render
from django.views import generic
from django.utils.translation import ugettext as _
from django.conf import settings
from . models import Song
from artist.models import Artist
from album.models import Album
from pure_pagination.mixins import PaginationMixin
from core.filter import So... | {
"repo_name": "contactr2m/remote_repo",
"path": "src/song/views.py",
"copies": "1",
"size": "4122",
"license": "mit",
"hash": -788153260631149400,
"line_mean": 29.3088235294,
"line_max": 96,
"alpha_frac": 0.5890344493,
"autogenerated": false,
"ratio": 3.660746003552398,
"config_test": false,
... |
from django.shortcuts import render
from django.views import generic
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.contrib.auth.decorators import permission_required
from django.shortcuts import get... | {
"repo_name": "MSKuzin/django_test",
"path": "catalog/views.py",
"copies": "1",
"size": "4951",
"license": "mit",
"hash": 2749577332275851300,
"line_mean": 32.0066666667,
"line_max": 117,
"alpha_frac": 0.7000605938,
"autogenerated": false,
"ratio": 3.883137254901961,
"config_test": false,
"ha... |
# from django.shortcuts import render
from django.views import generic
from . import forms
from django.shortcuts import redirect
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.contrib.auth import logout
from django.contrib... | {
"repo_name": "ParvJain/edge",
"path": "src/accounts/views.py",
"copies": "4",
"size": "3207",
"license": "mit",
"hash": 381163689940649500,
"line_mean": 40.6493506494,
"line_max": 72,
"alpha_frac": 0.5403804178,
"autogenerated": false,
"ratio": 4.730088495575221,
"config_test": false,
"has_n... |
from django.shortcuts import render
from django.views import generic
from . import models
# Create your views here.
## Games
class GameIndex(generic.ListView):
model = models.Game
template_name = 'games.html'
paginate_by = 10
class GameDetail(generic.DetailView):
template_name = 'game_detail.html'
model = mod... | {
"repo_name": "mekkagodzilla/mycollections",
"path": "shelves/views.py",
"copies": "1",
"size": "2754",
"license": "bsd-3-clause",
"hash": 7760054548752901000,
"line_mean": 21.95,
"line_max": 78,
"alpha_frac": 0.7563543936,
"autogenerated": false,
"ratio": 3.1875,
"config_test": false,
"has_n... |
from django.shortcuts import render
from django.views import generic
from member.models import Member
from django.contrib.postgres.search import SearchVector
from django.http import HttpResponse
class IndexView(generic.ListView):
template_name="member/member.html"
def get_queryset(self):
all_members = Member.objec... | {
"repo_name": "R-Wolf/CFD_A_library",
"path": "member/views.py",
"copies": "1",
"size": "1036",
"license": "mit",
"hash": -6074840084906180000,
"line_mean": 32.4193548387,
"line_max": 80,
"alpha_frac": 0.7258687259,
"autogenerated": false,
"ratio": 3.278481012658228,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.views import generic
from .models import Album
from django.http import Http404
from django.shortcuts import render, get_object_or_404
from .models import Album, Song
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers imp... | {
"repo_name": "rajinderkaur/PythonProjects",
"path": "website/music/views.py",
"copies": "1",
"size": "4561",
"license": "mit",
"hash": -3491426708776419300,
"line_mean": 33.0373134328,
"line_max": 81,
"alpha_frac": 0.652049989,
"autogenerated": false,
"ratio": 3.7232653061224488,
"config_test"... |
from django.shortcuts import render
from django.views import generic
from models import *
from django.http import HttpResponse, HttpResponseRedirect
from home.models import Languages, Menu, MenuInfo
from django.http import Http404
import json, simplejson
import time
class IndexViews(generic.View):
templates_file ... | {
"repo_name": "CooloiStudio/Turanga.deskxd.com",
"path": "thanks/views.py",
"copies": "1",
"size": "2433",
"license": "mit",
"hash": -7942110947825300000,
"line_mean": 28.6707317073,
"line_max": 84,
"alpha_frac": 0.4928072339,
"autogenerated": false,
"ratio": 4.123728813559322,
"config_test": f... |
from django.shortcuts import render
from django.views import generic
from reserva.models import Libro, Reserva
from reserva.forms import CreateReservaForm
from django.shortcuts import render, redirect
from django.views.generic.edit import DeleteView
from django.urls import reverse_lazy
import datetime
from django.http ... | {
"repo_name": "fmoreyra/ReservaLibrosISOO",
"path": "reserva/views.py",
"copies": "1",
"size": "2302",
"license": "mit",
"hash": -798148346716515700,
"line_mean": 30.9722222222,
"line_max": 85,
"alpha_frac": 0.6746307559,
"autogenerated": false,
"ratio": 3.487878787878788,
"config_test": false,... |
from django.shortcuts import render
from django.views import generic
# from rest_framework.authtoken.models import Token
from django.contrib.auth import logout
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import authenticate, login
from django.http import JsonResponse
def note_not_fou... | {
"repo_name": "asommer70/strangway",
"path": "strangway/views.py",
"copies": "1",
"size": "1472",
"license": "mit",
"hash": -5236149903529376000,
"line_mean": 29.6666666667,
"line_max": 103,
"alpha_frac": 0.5862771739,
"autogenerated": false,
"ratio": 3.9148936170212765,
"config_test": false,
... |
from django.shortcuts import render
from django.views import generic
import math
from collections import OrderedDict
from rsvp.models import LifeEvent, WeddingEvent, Logistics
# Create your views here.
class HomePage(generic.View):
template_name = "home.html"
def get(self, request, *args, **kwargs):
... | {
"repo_name": "HandyCodeJob/mikeandzoey-site",
"path": "src/wedding/views.py",
"copies": "1",
"size": "1839",
"license": "mit",
"hash": 647821858532316000,
"line_mean": 30.7068965517,
"line_max": 78,
"alpha_frac": 0.6237085372,
"autogenerated": false,
"ratio": 3.7839506172839505,
"config_test":... |
from django.shortcuts import render
from django.views import generic
from contenidos.models import Novedad, Album, Pagina
from django.conf import settings
from django.views.generic import ListView, DetailView, UpdateView, CreateView, DeleteView
class ExtraContext(object):
extra_context = {}
def get_context... | {
"repo_name": "nunataksoftware/anayluistango",
"path": "contenidos/views.py",
"copies": "1",
"size": "1069",
"license": "mit",
"hash": -4315497016239597600,
"line_mean": 27.8918918919,
"line_max": 90,
"alpha_frac": 0.7118802619,
"autogenerated": false,
"ratio": 4.00374531835206,
"config_test": ... |
from django.shortcuts import render
from django.views import generic
from .models import Actor, Director, Movie
#from .forms import PersonForm
from django.views.generic.edit import CreateView, UpdateView
#from django.views.generic.edit import FormView
def home(request):
return render(request, 'home.html')
class... | {
"repo_name": "jemejones/django-movies",
"path": "movies_app/views.py",
"copies": "1",
"size": "2670",
"license": "mit",
"hash": 1124244514957052900,
"line_mean": 22.8392857143,
"line_max": 60,
"alpha_frac": 0.6142322097,
"autogenerated": false,
"ratio": 3.830703012912482,
"config_test": false,... |
from django.shortcuts import render
from django.views import generic
from .models import Person
from .forms import PersonForm
class IndexView(generic.TemplateView):
template_name = "seedstars/index.html"
class ListView(generic.View):
model = Person
template_name = 'seedstars/list.html'
def get(sel... | {
"repo_name": "yudori/seedstars_challenge",
"path": "django_app/seedstars/views.py",
"copies": "1",
"size": "1169",
"license": "mit",
"hash": -3850242690728003000,
"line_mean": 26.8333333333,
"line_max": 74,
"alpha_frac": 0.6535500428,
"autogenerated": false,
"ratio": 3.807817589576547,
"config... |
from django.shortcuts import render
from django.views import View
from django.http import HttpResponse
from django.contrib.messages import get_messages
from application.views import CheckUserAuthenticatedMixin
class TreeView(CheckUserAuthenticatedMixin, View):
def get(self, request, *args, **kwargs):
retu... | {
"repo_name": "lvhuiyang/TIMS",
"path": "application/views/tree.py",
"copies": "1",
"size": "2895",
"license": "apache-2.0",
"hash": -2496105074362514000,
"line_mean": 36.2361111111,
"line_max": 110,
"alpha_frac": 0.5856023872,
"autogenerated": false,
"ratio": 3.1765402843601898,
"config_test":... |
from django.shortcuts import render
from django.views import View
from django.http import JsonResponse
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.serializers import HyperlinkedIdentityField
from rest_framework.views ... | {
"repo_name": "aminhp93/learning_python",
"path": "src/learning_python/views.py",
"copies": "1",
"size": "1732",
"license": "mit",
"hash": -1539866522166092500,
"line_mean": 29.3859649123,
"line_max": 136,
"alpha_frac": 0.7430715935,
"autogenerated": false,
"ratio": 3.571134020618557,
"config_t... |
from django.shortcuts import render
from django.views import View
from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators import method_decorator
import datetime, requests, json
INVALID_ERROR = {'flag_error':True,
'message':"Invalid url, Please try again" }
LIMIT_EXECEEDED ... | {
"repo_name": "alenthomas/github-issues-tracker",
"path": "openissues/views.py",
"copies": "1",
"size": "4020",
"license": "mit",
"hash": 5577753928231751000,
"line_mean": 35.2162162162,
"line_max": 93,
"alpha_frac": 0.576119403,
"autogenerated": false,
"ratio": 3.84688995215311,
"config_test":... |
from django.shortcuts import render
from django.views import View
from serializers import ContactSerialiser
from .models import Contact_us
from rest_framework.response import Response
from rest_framework.decorators import api_view,permission_classes,authentication_classes
from rest_framework.permissions import IsAuthen... | {
"repo_name": "devrajvlpt/CoachinAcademy",
"path": "webapp/views.py",
"copies": "1",
"size": "2352",
"license": "unlicense",
"hash": -4720428859960068000,
"line_mean": 25.7272727273,
"line_max": 134,
"alpha_frac": 0.7236394558,
"autogenerated": false,
"ratio": 3.5,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.views import View
from command.models import CommandTemplate, get_command_template_names, load_command_templates
from values.forms import value_forms_factory, command_from_dict
import json
class CommandTemplateView(View):
def get(self, request):
return re... | {
"repo_name": "Fakor/congov",
"path": "web/command/views.py",
"copies": "1",
"size": "1113",
"license": "mit",
"hash": 6196645656934320000,
"line_mean": 36.1,
"line_max": 107,
"alpha_frac": 0.7053009883,
"autogenerated": false,
"ratio": 3.975,
"config_test": false,
"has_no_keywords": false,
... |
from django.shortcuts import render
from django.views import View
from fo2.connections import db_cursor_so
from utils.views import group_rowspan
import lotes.forms as forms
import lotes.queries as queries
class PeriodoAlter(View):
Form_class = forms.PeriodoAlterForm
template_name = 'lotes/analise/periodo_a... | {
"repo_name": "anselmobd/fo2",
"path": "src/lotes/views/analise/periodo_alter.py",
"copies": "1",
"size": "3221",
"license": "mit",
"hash": -3514613554275342300,
"line_mean": 36.3488372093,
"line_max": 74,
"alpha_frac": 0.5158779577,
"autogenerated": false,
"ratio": 3.6334841628959276,
"config_... |
from django.shortcuts import render
from django.views import View
from nectr.tutor.models import Tutor
from nectr.users.models import User
class Search(View):
model = Tutor
@staticmethod
def get(request):
search = request.GET.get('search_text', '')
subject = request.GET.get('subject', ''... | {
"repo_name": "nectR-Tutoring/nectr",
"path": "nectr/search/views.py",
"copies": "1",
"size": "1283",
"license": "mit",
"hash": -6375517342062948000,
"line_mean": 44.8214285714,
"line_max": 111,
"alpha_frac": 0.6445830086,
"autogenerated": false,
"ratio": 4.009375,
"config_test": false,
"has_... |
from django.shortcuts import render
from doct.app.models import Task, StatTask
from doct.app.forms import TaskForm, ContributeForm
from django.http import HttpResponseRedirect, HttpResponse
from doct.utils import docker
# to get and parse stat
import requests
from xml.dom import minidom
from datetime import datetime... | {
"repo_name": "dockerparis/Hive",
"path": "doct/app/views.py",
"copies": "1",
"size": "5075",
"license": "mit",
"hash": -5837160697851165000,
"line_mean": 32.8333333333,
"line_max": 157,
"alpha_frac": 0.5702463054,
"autogenerated": false,
"ratio": 4.0632506004803846,
"config_test": false,
"ha... |
from django.shortcuts import render
from dynamicForms import views
from formularios.models import Usuario, Club, Country
from formularios.serializer import UsuarioSerializer, CountrySerializer, ClubSerializer
from rest_framework import generics
from rest_framework import permissions
from rest_framework import status
... | {
"repo_name": "trea-uy/django-survey-sample",
"path": "sampleSurveys/formularios/views.py",
"copies": "1",
"size": "2078",
"license": "apache-2.0",
"hash": -476631065785241150,
"line_mean": 30.9692307692,
"line_max": 87,
"alpha_frac": 0.739653513,
"autogenerated": false,
"ratio": 4.30227743271221... |
from django.shortcuts import render
from easy_response.consts import DEFAULT_STATUS_CODE, BASIC_SERIALIZATION
from easy_response.http import HttpResponse, JsonResponse, FileResponse
from easy_response.utils import is_int, is_tuple, is_float, is_file,\
is_http_response, is_none, is_int, is_str
class MalformedRespo... | {
"repo_name": "laginha/django-easy-response",
"path": "src/easy_response/utils/process.py",
"copies": "1",
"size": "1682",
"license": "mit",
"hash": 5108117329294813000,
"line_mean": 40.0243902439,
"line_max": 100,
"alpha_frac": 0.6771700357,
"autogenerated": false,
"ratio": 4.301790281329923,
... |
from django.shortcuts import render
from elasticsearch import Elasticsearch
from django.http import HttpResponse
def search(request):
if request.method == 'GET':
term = request.GET.get('term_search')
if term == None:
term = ""
response = search_term(term)
pages = []
... | {
"repo_name": "pattyvader/athena",
"path": "web/view_athena/views.py",
"copies": "1",
"size": "1150",
"license": "mit",
"hash": -6226421390119328000,
"line_mean": 37.3333333333,
"line_max": 120,
"alpha_frac": 0.4573913043,
"autogenerated": false,
"ratio": 4.323308270676692,
"config_test": false... |
from django.shortcuts import render
from ElectionSimulation.Models.Campaign import Campaign
from ElectionSimulation.Models.Formula import Formula
from ElectionSimulation.Models.PoliticalParty import PoliticalParty
from django.core.context_processors import csrf
from django.shortcuts import render_to_response
def list... | {
"repo_name": "CSC301H-Fall2013/ElectionSimulation",
"path": "Code/ElectionSimulationInstaller/ElectionSimulation/ElectionSimulation/CampaignMaster/views.py",
"copies": "2",
"size": "2592",
"license": "mit",
"hash": -4949107395099458000,
"line_mean": 38.8923076923,
"line_max": 102,
"alpha_frac": 0.63... |
from django.shortcuts import render
from encoders import Encoder
import models
import time
import sys,os
def home(request):
message = None
if request.method == "POST":
print "POST parameters: ", request.POST
print "Files: ", request.FILES
# Build the form
form = models.Upload... | {
"repo_name": "thethomaseffect/travers-media-tools",
"path": "traversme/encoder/views.py",
"copies": "1",
"size": "1773",
"license": "mit",
"hash": -2379230155048021000,
"line_mean": 31.8333333333,
"line_max": 80,
"alpha_frac": 0.5961646926,
"autogenerated": false,
"ratio": 4.388613861386139,
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.