text
stringlengths
0
1.05M
meta
dict
from django.views.generic.base import TemplateView from django.conf.urls import url, include from rest_framework import routers from rest_framework.authtoken import views as rest_views from rest_framework_swagger.views import get_swagger_view import whatisit.apps.api.views as api_views from whatisit.settings import A...
{ "repo_name": "radinformatics/whatisit", "path": "whatisit/apps/api/urls.py", "copies": "1", "size": "1667", "license": "mit", "hash": -7054272824872132000, "line_mean": 42.8684210526, "line_max": 119, "alpha_frac": 0.7204559088, "autogenerated": false, "ratio": 3.58494623655914, "config_test":...
from django.views.generic.base import TemplateView from django.contrib.admin.views.decorators import staff_member_required from base.util import class_view_decorator from .dashboard import (IndexDashboard, ProblemsDashboard, ContentDashboard, CompetitionDashboard, UserDashboard ) @class_view_decorator(s...
{ "repo_name": "tbabej/roots", "path": "admin_custom/views.py", "copies": "3", "size": "2364", "license": "mit", "hash": -7391593117290511000, "line_mean": 35.9375, "line_max": 79, "alpha_frac": 0.6146362098, "autogenerated": false, "ratio": 4.402234636871508, "config_test": false, "has_no_key...
from django.views.generic.base import TemplateView from django.db.models.aggregates import Avg from django.db.models.expressions import Case, When from Scouting2017.model.reusable_models import TeamCompetesIn, Team, Competition, \ PickList from Scouting2017.model.models2017 import ScoreResult import operator import...
{ "repo_name": "ArcticWarriors/scouting-app-2016", "path": "ScoutingWebsite/Scouting2017/view/standard_views/pick_list.py", "copies": "2", "size": "3041", "license": "mit", "hash": 8687200756550791000, "line_mean": 55.3148148148, "line_max": 205, "alpha_frac": 0.638934561, "autogenerated": false, ...
from django.views.generic.base import TemplateView from django.db.models import Q from django.views.generic.edit import FormView from reviews.models import Review from reports.views import user_review_report from .mixins import AdminMixin from .forms import GenericMessage class HomePageView(TemplateView): temp...
{ "repo_name": "moshthepitt/answers", "path": "core/views.py", "copies": "1", "size": "2108", "license": "mit", "hash": 6517497550730577000, "line_mean": 35.3448275862, "line_max": 104, "alpha_frac": 0.6812144213, "autogenerated": false, "ratio": 3.962406015037594, "config_test": false, "has_n...
from django.views.generic.base import TemplateView from django.http import Http404 from django.template import TemplateDoesNotExist from elasticsearch import TransportError from sheerlike.query import get_document class SheerTemplateView(TemplateView): doc_type = None local_name = 'object' default_templ...
{ "repo_name": "rosskarchner/django-sheerlike", "path": "sheerlike/views/generic.py", "copies": "3", "size": "1985", "license": "cc0-1.0", "hash": -3385564778898146300, "line_mean": 33.8245614035, "line_max": 95, "alpha_frac": 0.6146095718, "autogenerated": false, "ratio": 4.296536796536796, "co...
from django.views.generic.base import TemplateView from django.http import Http404 from regulations.generator import api_reader from regulations.generator.layers.analyses import SectionBySectionLayer from regulations.generator.node_types import label_to_text from regulations.generator.subterp import filter_by_subterp ...
{ "repo_name": "adderall/regulations-site", "path": "regulations/views/sidebar.py", "copies": "7", "size": "2765", "license": "cc0-1.0", "hash": 5663358182493512000, "line_mean": 37.4027777778, "line_max": 78, "alpha_frac": 0.5761301989, "autogenerated": false, "ratio": 4.102373887240356, "confi...
from django.views.generic.base import TemplateView from django.http import HttpResponseRedirect from django.urls import reverse from models import Person import os def load_data(request): """ Loading data from file and saving them to db. """ module_dir = os.path.dirname(__file__) # get current directory ...
{ "repo_name": "mirzadelic/django-social-example", "path": "django_social_example/person/views.py", "copies": "1", "size": "1431", "license": "unlicense", "hash": -6358011805890054000, "line_mean": 31.5227272727, "line_max": 77, "alpha_frac": 0.6107617051, "autogenerated": false, "ratio": 3.765789...
from django.views.generic.base import TemplateView from django.shortcuts import get_object_or_404 from django.db.models import Q class BaseSingleTeamView(TemplateView): def __init__(self, team_model, team_pictures_model, team_comments_model, team_pit_scouting_model, team_competes_in_model, template_name): ...
{ "repo_name": "ArcticWarriors/scouting-app-2016", "path": "ScoutingWebsite/BaseScouting/views/standard_views/base_team.py", "copies": "2", "size": "1834", "license": "mit", "hash": -4094011358174339000, "line_mean": 48.5675675676, "line_max": 175, "alpha_frac": 0.6957470011, "autogenerated": false,...
from django.views.generic.base import TemplateView from django.shortcuts import get_object_or_404 import operator class BaseSingleMatchView(TemplateView): """ This page will display any requested match. This page can be accessed through many places, such as the list of all matches, or when viewing any tea...
{ "repo_name": "ArcticWarriors/scouting-app-2016", "path": "ScoutingWebsite/BaseScouting/views/standard_views/base_match.py", "copies": "2", "size": "2424", "license": "mit", "hash": -7896002791783142000, "line_mean": 41.5263157895, "line_max": 134, "alpha_frac": 0.6547029703, "autogenerated": false...
from django.views.generic.base import TemplateView from django.shortcuts import get_object_or_404 class BaseMatchPredictionView(TemplateView): """ This page is displayed when a match which has not happened yet would be requested the page is useful for upcoming matches, as it can display which defenses eac...
{ "repo_name": "ArcticWarriors/scouting-app", "path": "ScoutingWebsite/BaseScouting/views/standard_views/base_match_prediction.py", "copies": "2", "size": "1535", "license": "mit", "hash": 5287579262733515000, "line_mean": 44.1470588235, "line_max": 112, "alpha_frac": 0.7250814332, "autogenerated": ...
from django.views.generic.base import TemplateView from django.shortcuts import get_object_or_404, render from .models import Kiosk from event_kiosk.presentations.models import Slide from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse import django.utils.timezone as timezone import...
{ "repo_name": "DesjardinsLab/event-kiosk", "path": "backend/event_kiosk/event_kiosk/kiosks/views.py", "copies": "1", "size": "2707", "license": "mit", "hash": -1037077227539867000, "line_mean": 34.6184210526, "line_max": 104, "alpha_frac": 0.6727004064, "autogenerated": false, "ratio": 3.99852289...
from django.views.generic.base import TemplateView from django.shortcuts import redirect from django.shortcuts import render_to_response from django.template import RequestContext from author.forms import UploadTaskForm from author.utils import process_uploaded_task from author.models import UploadedTask class Panel...
{ "repo_name": "stefantsov/blackbox3", "path": "author/views.py", "copies": "1", "size": "1110", "license": "bsd-3-clause", "hash": 6398703910187704000, "line_mean": 32.6363636364, "line_max": 74, "alpha_frac": 0.6684684685, "autogenerated": false, "ratio": 4.204545454545454, "config_test": fals...
from django.views.generic.base import TemplateView from django.shortcuts import redirect from . import celery_client, context_manager class DashboardView(TemplateView): context = None def get_context_data(self, **kwargs): context = super(DashboardView, self).get_context_data( **kwargs) ...
{ "repo_name": "baranbartu/djcelery-admin", "path": "celeryadmin/views.py", "copies": "2", "size": "1034", "license": "mit", "hash": -5109104821710932000, "line_mean": 29.4117647059, "line_max": 62, "alpha_frac": 0.664410058, "autogenerated": false, "ratio": 4.326359832635983, "config_test": fal...
from django.views.generic.base import TemplateView from django.shortcuts import render, redirect from django.contrib.auth import ( authenticate, login, logout, get_user_model ) from django.views import generic from django.views.generic import View from .forms import UserForm class ChatterBotAppView...
{ "repo_name": "maclogan/VirtualPenPal", "path": "examples/django_app/example_app/views.py", "copies": "1", "size": "2273", "license": "bsd-3-clause", "hash": 7980798156631884000, "line_mean": 30.5694444444, "line_max": 71, "alpha_frac": 0.5794104707, "autogenerated": false, "ratio": 3.95304347826...
from django.views.generic.base import TemplateView from django.utils.module_loading import import_string from django.conf import settings from django.http import HttpResponse from django.shortcuts import render from django.views.decorators.cache import never_cache from django.contrib.auth.decorators import login_requir...
{ "repo_name": "alphageek-xyz/site", "path": "landing/views.py", "copies": "1", "size": "1569", "license": "bsd-3-clause", "hash": 2479493381046365000, "line_mean": 37.2682926829, "line_max": 84, "alpha_frac": 0.7068196303, "autogenerated": false, "ratio": 4.2405405405405405, "config_test": fals...
from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from django.shortcuts import get_object_or_404 from courses.forms import CourseForm, TimeForm from courses.models import SemesterEntry, Department, Course, Time def get_time_table(): return zip(*zip(* [iter(Time...
{ "repo_name": "afg984/nthucourses", "path": "courses/views.py", "copies": "1", "size": "3208", "license": "bsd-3-clause", "hash": 520544042872570050, "line_mean": 32.0721649485, "line_max": 86, "alpha_frac": 0.5932044888, "autogenerated": false, "ratio": 3.8099762470308787, "config_test": false...
from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from django.views.generic.list import ListView from paintings.models import Announcement, HomePageImage, Painting, Video, Exhibition, Word class HomeView(TemplateView): template_name = "paintings/index.html" ...
{ "repo_name": "jcaraballo17/secret-webpage", "path": "paintings/views.py", "copies": "1", "size": "2897", "license": "apache-2.0", "hash": 3966959341643662300, "line_mean": 31.5505617978, "line_max": 91, "alpha_frac": 0.7000345185, "autogenerated": false, "ratio": 3.6440251572327043, "config_te...
from django.views.generic.base import TemplateView from django.views.generic.edit import CreateView, FormView from KPS_app import models from datetime import datetime from KPS_app.forms import CityForm, CompanyForm, MailDeliveryForm,\ TransportDiscontinueForm from django.http.response import HttpResponseRedirect fr...
{ "repo_name": "QuasimodoNZ/SWEN301_Group-Project", "path": "KPS/KPS_app/views.py", "copies": "1", "size": "11734", "license": "mit", "hash": -7767118028553716000, "line_mean": 41.8248175182, "line_max": 145, "alpha_frac": 0.5967274587, "autogenerated": false, "ratio": 3.895750332005312, "config...
from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from django.shortcuts import get_object_or_404 from .models import Registration from accounts.models import Student, Instructor from core.models import University from django.shortcuts import redirect # Create your views ...
{ "repo_name": "thebenwaters/openclickio", "path": "registration/views.py", "copies": "1", "size": "1332", "license": "mit", "hash": 8421859922443733000, "line_mean": 30.7142857143, "line_max": 79, "alpha_frac": 0.7717717718, "autogenerated": false, "ratio": 3.5238095238095237, "config_test": fa...
from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from django.views.generic.base import ContextMixin from django.urls import reverse_lazy from django.http import Http404 from accounts.models import ( AccountRequest, Intent, CuLdapUser, CsuLdapUser ) from a...
{ "repo_name": "ResearchComputing/RCAMP", "path": "rcamp/accounts/views.py", "copies": "1", "size": "5392", "license": "mit", "hash": -3853357719984436700, "line_mean": 35.4324324324, "line_max": 107, "alpha_frac": 0.65634273, "autogenerated": false, "ratio": 4.100380228136882, "config_test": fa...
from django.views.generic.base import TemplateView from django.views.generic import DetailView from imager_images.models import Photo, Album from taggit.models import Tag from django.views.generic.edit import CreateView from django.urls import reverse_lazy from django.core.paginator import Paginator, EmptyPage, PageNot...
{ "repo_name": "derekmhewitt/django-imager", "path": "imager_images/views.py", "copies": "1", "size": "3923", "license": "mit", "hash": -7324042848980404000, "line_mean": 30.384, "line_max": 74, "alpha_frac": 0.6433851644, "autogenerated": false, "ratio": 3.697455230914232, "config_test": false,...
from django.views.generic.base import TemplateView from django.views.generic import View from django.http import HttpResponse from .forms import TelnetInputForm from .tasks import configure_batch, email_admin from celery import chord import celery import json try: stats = celery.current_app.control.inspect().stat...
{ "repo_name": "mdaif/django-knob", "path": "knob/views.py", "copies": "1", "size": "1572", "license": "apache-2.0", "hash": 5197104865433609000, "line_mean": 34.7272727273, "line_max": 117, "alpha_frac": 0.6507633588, "autogenerated": false, "ratio": 3.949748743718593, "config_test": false, "...
from django.views.generic.base import TemplateView from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.contrib.auth.mixins import LoginRequiredMixin from .models import Client, Dependent, Visit class ClientSummaryView(TemplateView): template_name = "client...
{ "repo_name": "tomp/food_pantry", "path": "clients/views.py", "copies": "1", "size": "1071", "license": "mit", "hash": 2289997477078866700, "line_mean": 34.7, "line_max": 72, "alpha_frac": 0.6582633053, "autogenerated": false, "ratio": 4.167315175097277, "config_test": false, "has_no_keywords...
from django.views.generic.base import TemplateView from requests import get from bs4 import BeautifulSoup from threading import Thread class ComicView(TemplateView): _valid = False _url = "http://imgs.xkcd.com/comics/tape_measure.png" _title = "This sequence was later reproduced in the International Tape-...
{ "repo_name": "DummyDivision/Tsune", "path": "comic/views.py", "copies": "1", "size": "1590", "license": "mit", "hash": -8386293270035710000, "line_mean": 32.8510638298, "line_max": 144, "alpha_frac": 0.6050314465, "autogenerated": false, "ratio": 3.7149532710280373, "config_test": false, "ha...
from django.views.generic.base import TemplateView from Scouting2016.model.reusable_models import TeamCompetesIn, Team import operator class PickListView2016(TemplateView): def __init__(self): self.template_name = 'Scouting2017/pick_list.html' def get_context_data(self, **kwargs): context = s...
{ "repo_name": "ArcticWarriors/scouting-app-2016", "path": "ScoutingWebsite/Scouting2016/view/standard_views/pick_list.py", "copies": "2", "size": "1326", "license": "mit", "hash": 9023590253135920000, "line_mean": 35.8333333333, "line_max": 105, "alpha_frac": 0.6206636501, "autogenerated": false, ...
from django.views.generic.base import TemplateView from vcapp.models import PartialTrip, Trip, Station #from profile_decorator import profile import datetime import logging import math logger = logging.getLogger(__name__) class HomeClass(TemplateView): template_name = "vcapp/home.html" def get(self, reques...
{ "repo_name": "edwinsteele/visual-commute", "path": "vcapp/views.py", "copies": "1", "size": "21841", "license": "cc0-1.0", "hash": 6372298134401037000, "line_mean": 41.9940944882, "line_max": 80, "alpha_frac": 0.5675106451, "autogenerated": false, "ratio": 3.6609118337244384, "config_test": fa...
from django.views.generic.base import TemplateView import operator class BaseMatchListView(TemplateView): def __init__(self, year, match_model, template_name='BaseScouting/match_list.html'): self.match_model = match_model self.template_name = template_name self.year = year def get_co...
{ "repo_name": "ArcticWarriors/scouting-app-2016", "path": "ScoutingWebsite/BaseScouting/views/standard_views/base_match_list.py", "copies": "2", "size": "1617", "license": "mit", "hash": -8530764545226519000, "line_mean": 38.4390243902, "line_max": 101, "alpha_frac": 0.6623376623, "autogenerated": ...
from django.views.generic.base import TemplateView import operator class BaseTeamListView(TemplateView): """ When requested, will show a list of all the teams that have been in a match, or will be in a match. This also shows some average scoring statistics of each team, so it is necessary to obtain th...
{ "repo_name": "ArcticWarriors/scouting-app", "path": "ScoutingWebsite/BaseScouting/views/standard_views/base_team_list.py", "copies": "2", "size": "1480", "license": "mit", "hash": -6586728045579300000, "line_mean": 41.2857142857, "line_max": 113, "alpha_frac": 0.6851351351, "autogenerated": false,...
from django.views.generic.base import TemplateView from apps.muni_scales.api import MscaleResource from apps.mds_auth.api import UserResource class HomeView(TemplateView): template_name = "index.html" def get_context_data(self, **kwargs): context = super(HomeView, self).get_context_data(**kwargs) ...
{ "repo_name": "schocco/mds-web", "path": "mds_website/views.py", "copies": "1", "size": "1418", "license": "mit", "hash": -3382686162410343000, "line_mean": 33.5853658537, "line_max": 87, "alpha_frac": 0.6205923836, "autogenerated": false, "ratio": 3.8221024258760106, "config_test": false, "h...
from django.views.generic.base import TemplateView from lxml import html from .models import Article, Annotation class PreView(TemplateView): template_name = "index.html" def _process_annotations(self, text): text_tree = html.fromstring(text) annotation_links = text_tree.xpath("//a[@data-a...
{ "repo_name": "theatlantic/host", "path": "host/articles/views.py", "copies": "1", "size": "1681", "license": "bsd-2-clause", "hash": 5592193912044324000, "line_mean": 28.4912280702, "line_max": 80, "alpha_frac": 0.6085663296, "autogenerated": false, "ratio": 4.435356200527704, "config_test": f...
from django.views.generic.base import TemplateView from regulations.generator import generator from regulations.generator.node_types import label_to_text, type_from_label from regulations.generator.section_url import SectionUrl from regulations.generator.sidebar.help import Help as HelpSideBar from regulations.generat...
{ "repo_name": "tadhg-ohiggins/regulations-site", "path": "regulations/views/chrome.py", "copies": "2", "size": "8818", "license": "cc0-1.0", "hash": -1699450571200079600, "line_mean": 40.5943396226, "line_max": 78, "alpha_frac": 0.6432297573, "autogenerated": false, "ratio": 4.114792347176855, ...
from django.views.generic.base import TemplateView, View from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django_tables2.views import SingleTableMixin from example.tables import DemoTable, DemoTable2 from django.contrib import messages class IndexView(TemplateView): template_name = 'in...
{ "repo_name": "georgema1982/django-html-sweatshop", "path": "example/views.py", "copies": "1", "size": "2097", "license": "mit", "hash": 8557713201500475000, "line_mean": 34.5593220339, "line_max": 80, "alpha_frac": 0.6738197425, "autogenerated": false, "ratio": 3.7920433996383363, "config_test...
from django.views.generic.base import TemplateView, View from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.utils.crypto import get_random_string from django....
{ "repo_name": "niutool/niuforum", "path": "niuauth/views.py", "copies": "1", "size": "7066", "license": "mit", "hash": 409017491539592960, "line_mean": 35.4226804124, "line_max": 103, "alpha_frac": 0.6045853382, "autogenerated": false, "ratio": 4.248947684906795, "config_test": false, "has_no...
from django.views.generic.base import TemplateView, View, TemplateResponseMixin from .reports import Column, BasicDateGetter from rapidsms.contrib.locations.models import Location import datetime, time from django.shortcuts import get_object_or_404 from django.utils import simplejson from django.http import HttpRespons...
{ "repo_name": "unicefuganda/edtrac", "path": "edtrac_project/rapidsms_generic/generic/reporting/views.py", "copies": "1", "size": "8364", "license": "bsd-3-clause", "hash": 8731821504884906, "line_mean": 33.9958158996, "line_max": 107, "alpha_frac": 0.5675514108, "autogenerated": false, "ratio": ...
from django.views.generic.base import View, classonlymethod, update_wrapper from django.template.loader import add_to_builtins from django.http import Http404 from example.views import * add_to_builtins('example.templatetags.webflow') class FlowView(View): @classonlymethod def as_view(cls, steps, **initkwar...
{ "repo_name": "mattjmorrison/django-webflow", "path": "src/example/flows.py", "copies": "1", "size": "3043", "license": "mit", "hash": -2556263223221645300, "line_mean": 29.43, "line_max": 92, "alpha_frac": 0.5037791653, "autogenerated": false, "ratio": 4.359598853868195, "config_test": false, ...
from django.views.generic.base import View from accounts.forms import CreateWriterForm, CreateSessionForm, DeleteSessionForm from accounts.presentation import user_presentation, session_presentation from utils.response_utils import JSONResponseMixin, JournalSuccessResponse class WriterView(JSONResponseMixin, View): ...
{ "repo_name": "subramaniank/journal", "path": "journal/journal/accounts/views.py", "copies": "1", "size": "1343", "license": "mit", "hash": 5992020621494484000, "line_mean": 37.3714285714, "line_max": 81, "alpha_frac": 0.7155621742, "autogenerated": false, "ratio": 4.3462783171521036, "config_t...
from django.views.generic.base import View from diaries.presentation import diary_presentation from journal import status_codes from accounts.mixins import LoginRequiredMixin from accounts.models import JournalWriter from diaries.forms import CreateDiaryForm from utils.response_utils import JSONResponseMixin, JournalSu...
{ "repo_name": "subramaniank/journal", "path": "journal/journal/diaries/views.py", "copies": "1", "size": "1390", "license": "mit", "hash": 7115652670322332000, "line_mean": 39.9117647059, "line_max": 91, "alpha_frac": 0.7258992806, "autogenerated": false, "ratio": 3.808219178082192, "config_tes...
from django.views.generic.base import View from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from restful.decorators import restful_view_templates from guardian.decorators import permission_required_or_403 from projects.models import Project, User @restfu...
{ "repo_name": "tochev/obshtestvo.bg", "path": "projects/views/user.py", "copies": "1", "size": "1302", "license": "unlicense", "hash": -7944649803539842000, "line_mean": 38.4848484848, "line_max": 103, "alpha_frac": 0.6674347158, "autogenerated": false, "ratio": 3.84070796460177, "config_test":...
from django.views.generic.base import View from django.core.urlresolvers import reverse from django.shortcuts import render, redirect from posts.models import Post from posts.utils import youtube class PostCreateView(View): def get(self, request, *args, **kwargs): return render( request, ...
{ "repo_name": "LeoHeo/fastube", "path": "fastube/posts/views/create.py", "copies": "1", "size": "1897", "license": "mit", "hash": 1681586964389144800, "line_mean": 30.0983606557, "line_max": 109, "alpha_frac": 0.561412757, "autogenerated": false, "ratio": 4.123913043478261, "config_test": false...
from django.views.generic.base import View from django.http import HttpResponse from django.contrib.gis.geos import Point from json import dumps from models import WorldBorder class JSONBaseView(View): def send_error(self, e): return HttpResponse(dumps({ 'error': e, 'status': 'err...
{ "repo_name": "smahs/django-gis-tutorial", "path": "world/views.py", "copies": "1", "size": "1265", "license": "mit", "hash": 1026232852994645000, "line_mean": 32.2894736842, "line_max": 73, "alpha_frac": 0.6, "autogenerated": false, "ratio": 3.91640866873065, "config_test": false, "has_no_ke...
from django.views.generic.base import View from django.http import HttpResponse class BaseGenGraphView(View): def __init__(self, team_model): self.team_model = team_model def get(self, request, **kwargs): fields = kwargs['fields'] team_numbers = kwargs['team_numbers'] """ ...
{ "repo_name": "ArcticWarriors/scouting-app-2016", "path": "ScoutingWebsite/BaseScouting/views/standard_views/base_gen_graph.py", "copies": "2", "size": "1746", "license": "mit", "hash": -3776345901499276300, "line_mean": 30.7454545455, "line_max": 91, "alpha_frac": 0.6111111111, "autogenerated": fa...
from django.views.generic.base import View from django.http.response import HttpResponse, HttpResponseRedirect,\ HttpResponseForbidden from map.forms import MapForm, UserMapForm from lib.utils import MediaFileUtils, FileUtils, JSONUtils, RequestUtils from map.models import Map, UserMap from django.shortcuts import ...
{ "repo_name": "tomaslu/map_editor", "path": "map/views.py", "copies": "1", "size": "3341", "license": "mit", "hash": 5244482670361395000, "line_mean": 43.56, "line_max": 100, "alpha_frac": 0.5755761748, "autogenerated": false, "ratio": 4.478552278820375, "config_test": false, "has_no_keywords...
from django.views.generic.base import View from django.http.response import HttpResponse from django.template.loader import render_to_string from .models import GeoLocatedModel import json class GeoLocatedModelJsonList(View): model = None def get_queryset(self): if issubclass(self.model, GeoLoc...
{ "repo_name": "atiberghien/django-geolocation-helper", "path": "geolocation_helper/views.py", "copies": "1", "size": "1179", "license": "bsd-2-clause", "hash": 832981390474699000, "line_mean": 30.0526315789, "line_max": 72, "alpha_frac": 0.6183206107, "autogenerated": false, "ratio": 4.4659090909...
from django.views.generic.base import View from django.http.response import HttpResponse import re import json class BaseSubmitMatchEdit(View): def __init__(self, competition_model, match_model, team_model, score_result_model, official_match_model): self.competition_model = competition_model sel...
{ "repo_name": "ArcticWarriors/scouting-app", "path": "ScoutingWebsite/BaseScouting/views/submissions/submit_match_edit.py", "copies": "2", "size": "3824", "license": "mit", "hash": -3953324495751549000, "line_mean": 36.8613861386, "line_max": 148, "alpha_frac": 0.5557008368, "autogenerated": false,...
from django.views.generic.base import View from django import http from abc import ABCMeta, abstractproperty, abstractmethod class ServiceView(View): __metaclass__ = ABCMeta content_type = "application/vnd.collection+protobuf" @abstractproperty def _service(self): pass @abstractmethod ...
{ "repo_name": "ericmoritz/python-collection-protobuf", "path": "collection_protobuf/django_view.py", "copies": "1", "size": "3099", "license": "mit", "hash": 3181395327653310500, "line_mean": 27.1727272727, "line_max": 81, "alpha_frac": 0.5385608261, "autogenerated": false, "ratio": 4.55066079295...
from django.views.generic.base import View from django.shortcuts import get_object_or_404, render, redirect from django.core.urlresolvers import reverse from django.db import transaction from date.models import Date from food.models import Food from menu.models import Menu from meal.models import Meal from users.mixin...
{ "repo_name": "jupiny/MIDASChallenge2017", "path": "midas_web_solution/meal/views/create.py", "copies": "1", "size": "2730", "license": "mit", "hash": 8276306463768446000, "line_mean": 29.6741573034, "line_max": 123, "alpha_frac": 0.5575091575, "autogenerated": false, "ratio": 3.6842105263157894,...
from django.views.generic.base import View from django.shortcuts import get_object_or_404, render, redirect from django.core.urlresolvers import reverse from meal.models import Meal from date.models import Date from food.models import Food from menu.models import Menu from users.mixins import AdminRequiredMixin from...
{ "repo_name": "jupiny/MIDASChallenge2017", "path": "midas_web_solution/meal/views/update.py", "copies": "1", "size": "2490", "license": "mit", "hash": -1697629029796923600, "line_mean": 30.9230769231, "line_max": 123, "alpha_frac": 0.5232931727, "autogenerated": false, "ratio": 3.50210970464135, ...
from django.views.generic.base import View from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.http import Http404 from contacts_and_people.models import Entity # a handy class-based view for lists of an Entity's items - news, events, # clinical tr...
{ "repo_name": "bubenkoff/Arkestra", "path": "arkestra_utilities/views.py", "copies": "2", "size": "1841", "license": "bsd-2-clause", "hash": -950173247272171500, "line_mean": 31.298245614, "line_max": 73, "alpha_frac": 0.6197718631, "autogenerated": false, "ratio": 4.010893246187364, "config_te...
from django.views.generic.base import View from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse from django.shortcuts import redirect from django.conf import settings from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from tools ...
{ "repo_name": "sharehub/DBRest", "path": "dbrest/contacts/authen.py", "copies": "1", "size": "1931", "license": "mit", "hash": 2650403177233870000, "line_mean": 31.1833333333, "line_max": 97, "alpha_frac": 0.6126359399, "autogenerated": false, "ratio": 4.686893203883495, "config_test": false, ...
from django.views.generic.base import View from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse, HttpResponse import requests, json import random from models import Meeting class SlackEndpoint (View): @csrf_exempt #allow any website, not just ones in our domain, to access the e...
{ "repo_name": "maxmatthews/Standbot", "path": "standbot/views.py", "copies": "1", "size": "8339", "license": "apache-2.0", "hash": 1271480292458273000, "line_mean": 42.8947368421, "line_max": 114, "alpha_frac": 0.6402446336, "autogenerated": false, "ratio": 4.26984126984127, "config_test": fals...
from django.views.generic.base import View from django.views.generic.detail import DetailView from django.http import HttpResponse from cronitor.models import Project, Log import datetime class CreateLogView(View): model = Log def get(self, request, *args, **kwargs): uid = kwargs.get('uid', '') ...
{ "repo_name": "iambibhas/cronitor", "path": "cronitor/views.py", "copies": "1", "size": "1578", "license": "mit", "hash": 1640560234707312400, "line_mean": 28.7735849057, "line_max": 101, "alpha_frac": 0.566539924, "autogenerated": false, "ratio": 4.141732283464567, "config_test": false, "has...
from django.views.generic.base import View from django.views.generic.detail import SingleObjectMixin from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from Internet_store.products.models import ProductVariation from .models import Cart, CartItem class CartView(SingleO...
{ "repo_name": "maistrovas/Internet-Store", "path": "Internet_store/carts/views.py", "copies": "1", "size": "1665", "license": "mit", "hash": -637218109112288300, "line_mean": 35.1956521739, "line_max": 88, "alpha_frac": 0.5987987988, "autogenerated": false, "ratio": 3.8188073394495414, "config_...
from django.views.generic.base import View from django.views.generic import TemplateView from django.shortcuts import render from apps.establishment_system.models import Establecimiento # Create your views here. class Test(View): def get(self, request): # TODO: GET ACTIONS return render(request,...
{ "repo_name": "camilortte/RecomendadorUD", "path": "apps/main/views.py", "copies": "1", "size": "1223", "license": "mit", "hash": 6655397671276313000, "line_mean": 26.2, "line_max": 62, "alpha_frac": 0.6573998365, "autogenerated": false, "ratio": 3.833855799373041, "config_test": false, "has_...
from django.views.generic.base import View from django.views.generic.list import MultipleObjectMixin from .response import ExcelResponse class ExcelMixin(MultipleObjectMixin): response_class = ExcelResponse header_font = None data_font = None output_filename = None worksheet_name = None force...
{ "repo_name": "tarkatronic/django-excel-response", "path": "excel_response/views.py", "copies": "1", "size": "2042", "license": "apache-2.0", "hash": 183778322658622270, "line_mean": 28.1714285714, "line_max": 78, "alpha_frac": 0.610675808, "autogenerated": false, "ratio": 4.193018480492813, "c...
from django.views.generic.base import View from restful.decorators import restful_view_templates from django.http.response import HttpResponseRedirectBase from social.apps.django_app.views import auth, complete, _do_login as login from django.contrib.auth import logout from django.shortcuts import redirect from social....
{ "repo_name": "tochev/obshtestvo.bg", "path": "auth/views/entry.py", "copies": "1", "size": "2215", "license": "unlicense", "hash": 7661190297275857000, "line_mean": 32.0597014925, "line_max": 83, "alpha_frac": 0.6094808126, "autogenerated": false, "ratio": 4.2110266159695815, "config_test": fa...
from django.views.generic.base import View from restful.decorators import restful_view_templates from django.shortcuts import redirect from django import forms from projects.models import Skill, Member, User, SkillGroup @restful_view_templates class ExtraDataView(View): def get(self, request): details = r...
{ "repo_name": "tochev/obshtestvo.bg", "path": "auth/views/extra_data.py", "copies": "1", "size": "2322", "license": "unlicense", "hash": -7016174815958700000, "line_mean": 33.1470588235, "line_max": 117, "alpha_frac": 0.5521102498, "autogenerated": false, "ratio": 4.307977736549165, "config_tes...
from django.views.generic.base import View, TemplateView from django.http import HttpResponseRedirect, JsonResponse from django.core.urlresolvers import reverse from django.utils import timezone from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from django.core.paginator impor...
{ "repo_name": "TkkrLab/barsystem", "path": "barsystem/src/barsystem/gui/views.py", "copies": "1", "size": "15668", "license": "mit", "hash": -2496459423897101300, "line_mean": 34.0514541387, "line_max": 119, "alpha_frac": 0.5947153434, "autogenerated": false, "ratio": 4.326981496824081, "config...
from django.views.generic.dates import ArchiveIndexView, DateDetailView, DayArchiveView, MonthArchiveView, \ YearArchiveView from django.views.generic.detail import DetailView from django.views.generic.list import ListView from photologue.models import Photo, Gallery from photologue.views import GalleryDateView, Ph...
{ "repo_name": "JoannaKielas/wedding-gallery", "path": "photologue_custom/photologue_custom/views.py", "copies": "1", "size": "2264", "license": "bsd-3-clause", "hash": 3453166871336361000, "line_mean": 25.3255813953, "line_max": 108, "alpha_frac": 0.7981448763, "autogenerated": false, "ratio": 3....
from django.views.generic.dates import ArchiveIndexView from aspc.blog.views import PostArchive from aspc.blog.models import Post from aspc.events.models import EventController from aspc.activityfeed.models import Activity import logging, datetime log = logging.getLogger(__name__) class HomeView(PostArchive): tem...
{ "repo_name": "aspc/mainsite", "path": "aspc/views.py", "copies": "2", "size": "2077", "license": "mit", "hash": 1982244933481532700, "line_mean": 35.4385964912, "line_max": 84, "alpha_frac": 0.5907558979, "autogenerated": false, "ratio": 3.896810506566604, "config_test": false, "has_no_keywo...
from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DayArchiveView, DateDetailView from easyblog import settings from easyblog.models import Post class PostArchiveIndexView(ArchiveIndexView): def get_context_data(self, **kwargs): # Call the base implementation first...
{ "repo_name": "jmcclell/easyblog", "path": "easyblog/views/posts.py", "copies": "1", "size": "2885", "license": "mit", "hash": -6266839348958771000, "line_mean": 35.5316455696, "line_max": 122, "alpha_frac": 0.6748700173, "autogenerated": false, "ratio": 3.7467532467532467, "config_test": false...
from django.views.generic.dates import (ArchiveIndexView, YearArchiveView, DateDetailView) from django.http import Http404 from aspc.folio.models import Page from aspc.folio.views import AttachedPageMixin from aspc.generic import FilteredMonthArchiveView import datetime class MinutesPageMixin(AttachedPageMixin): ...
{ "repo_name": "theworldbright/mainsite", "path": "aspc/minutes/views.py", "copies": "2", "size": "1655", "license": "mit", "hash": 2865170229224653000, "line_mean": 34.2127659574, "line_max": 92, "alpha_frac": 0.6380664653, "autogenerated": false, "ratio": 3.95933014354067, "config_test": false...
from django.views.generic.dates import (DateDetailView, ArchiveIndexView, MonthArchiveView, _date_from_string) from django.http import Http404 from aspc.generic import FilteredMonthArchiveView import datetime from aspc.blog.models import Post from django.http import Http404 class PostDetail(DateDetailView): de...
{ "repo_name": "aspc/mainsite", "path": "aspc/blog/views.py", "copies": "1", "size": "1048", "license": "mit", "hash": 3568736448502930400, "line_mean": 33.9333333333, "line_max": 92, "alpha_frac": 0.6727099237, "autogenerated": false, "ratio": 3.8529411764705883, "config_test": false, "has_no...
from django.views.generic.dates import DateDetailView, YearArchiveView, \ ArchiveIndexView, DayArchiveView, WeekArchiveView, MonthArchiveView, \ TodayArchiveView from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.base import TemplateView, ...
{ "repo_name": "brmc/django-octopus", "path": "octopus/views.py", "copies": "1", "size": "2033", "license": "mit", "hash": -2512239051550392300, "line_mean": 35.9636363636, "line_max": 78, "alpha_frac": 0.7097884899, "autogenerated": false, "ratio": 3.792910447761194, "config_test": false, "ha...
from django.views.generic.dates import MonthArchiveView from django.http import Http404 import datetime class FilteredMonthArchiveView(MonthArchiveView): """ Prevent the month archives from going back past the first post, even when `allow_empty` is True. Adds a context variable `previous_posts_exi...
{ "repo_name": "aspc/mainsite", "path": "aspc/generic.py", "copies": "2", "size": "1534", "license": "mit", "hash": -5286472979475302000, "line_mean": 36.4390243902, "line_max": 83, "alpha_frac": 0.6003911343, "autogenerated": false, "ratio": 4.214285714285714, "config_test": false, "has_no_ke...
from django.views.generic.dates import ( ArchiveIndexView, DateDetailView, DayArchiveView, MonthArchiveView, YearArchiveView, ) from .models import Entry, Event class BlogViewMixin(object): date_field = 'pub_date' paginate_by = 10 def get_allow_future(self): return self.request.user.is_...
{ "repo_name": "khkaminska/djangoproject.com", "path": "blog/views.py", "copies": "10", "size": "1200", "license": "bsd-3-clause", "hash": -1125212388794698800, "line_mean": 22.0769230769, "line_max": 71, "alpha_frac": 0.6966666667, "autogenerated": false, "ratio": 3.9087947882736156, "config_te...
from django.views.generic.detail import DetailView from bib.models import Work, Person, Quote, PartOfQuote, Book, Speaker from words.models import GermanLemma, ForeignLemma from places.models import Place, AlternativeName class GermanLemmaDetailView(DetailView): model = GermanLemma template_name = 'browsing/g...
{ "repo_name": "vanyh/handkeinzungen-app", "path": "browsing/detail_views.py", "copies": "1", "size": "1365", "license": "mit", "hash": -1492714103259772200, "line_mean": 24.2777777778, "line_max": 70, "alpha_frac": 0.7494505495, "autogenerated": false, "ratio": 3.75, "config_test": false, "ha...
from django.views.generic.detail import DetailView from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from users.models import User class UserProfileView(LoginRequiredMixin, DetailView): model = User slug_field = 'username' template_name = 'users/profile.html' ...
{ "repo_name": "yevgnenll/but", "path": "but/users/views/profile.py", "copies": "1", "size": "1078", "license": "mit", "hash": 5055111228246893000, "line_mean": 28.4285714286, "line_max": 75, "alpha_frac": 0.5436893204, "autogenerated": false, "ratio": 3.843283582089552, "config_test": false, ...
from django.views.generic.detail import DetailView from django.core.urlresolvers import reverse_lazy from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.views import generic from django.views.generic.edit import DeleteView, CreateView, UpdateView fr...
{ "repo_name": "acdh-oeaw/vhioe", "path": "entities/views.py", "copies": "1", "size": "5608", "license": "mit", "hash": -4964370528793785000, "line_mean": 24.4909090909, "line_max": 84, "alpha_frac": 0.7043509272, "autogenerated": false, "ratio": 3.7386666666666666, "config_test": false, "has_...
from django.views.generic.detail import DetailView from django.shortcuts import get_object_or_404, redirect from django.http import HttpResponse from django.core.urlresolvers import reverse from .models import Articles from comment.CommentMixin import CommentMixin from tag.TagMixin import TagMixin class ArticleView(...
{ "repo_name": "rudikovrf/django_blog", "path": "article/views.py", "copies": "1", "size": "2191", "license": "mit", "hash": 7972943774852347000, "line_mean": 31.7014925373, "line_max": 88, "alpha_frac": 0.630762209, "autogenerated": false, "ratio": 3.9125, "config_test": false, "has_no_keywor...
from django.views.generic.detail import DetailView from django.shortcuts import render, redirect from django.http import Http404 from aspc.folio.models import Page class AttachedPageMixin(object): def get_page(self): try: return Page.objects.get(slug=self.page_slug) except Page.DoesNotE...
{ "repo_name": "aspc/mainsite", "path": "aspc/folio/views.py", "copies": "2", "size": "1132", "license": "mit", "hash": -749921912507020000, "line_mean": 30.4444444444, "line_max": 75, "alpha_frac": 0.6024734982, "autogenerated": false, "ratio": 3.663430420711974, "config_test": false, "has_no...
from django.views.generic.detail import DetailView from django.views.generic.base import RedirectView from django.http import Http404 from django.shortcuts import redirect, get_object_or_404 from common.views import StaticPageView from django.core.urlresolvers import reverse from models import (User, Organization, Volu...
{ "repo_name": "klpdotorg/dubdubdub", "path": "apps/users/views.py", "copies": "1", "size": "9091", "license": "mit", "hash": -1015410588902181800, "line_mean": 32.9253731343, "line_max": 92, "alpha_frac": 0.575404246, "autogenerated": false, "ratio": 4.071204657411554, "config_test": false, "...
from django.views.generic.detail import DetailView from django.views.generic.base import TemplateView from django.shortcuts import get_object_or_404 from places.models import Province, County, District, Division, Location, SubLocation from places.models import Constituency, SchoolZone from schools.models import School...
{ "repo_name": "moshthepitt/shulezote", "path": "places/views.py", "copies": "1", "size": "6419", "license": "mit", "hash": 3410432153708295000, "line_mean": 46.9029850746, "line_max": 186, "alpha_frac": 0.6773640754, "autogenerated": false, "ratio": 3.4143617021276595, "config_test": false, "...
from django.views.generic.detail import DetailView from django.views.generic.base import TemplateView from django.views.generic.edit import CreateView, UpdateView, DeleteView, \ FormView from django.http import HttpResponseRedirect from django.contrib import messages from django.core.urlresolvers import reverse, re...
{ "repo_name": "ITURO/ituro", "path": "ituro/projects/views.py", "copies": "1", "size": "6408", "license": "mit", "hash": -6392776893481463000, "line_mean": 37.371257485, "line_max": 87, "alpha_frac": 0.6747815231, "autogenerated": false, "ratio": 4.335588633288228, "config_test": false, "has_...
from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView from django.views.generic.edit import UpdateView from django.views.generic.edit import FormMixin from django.core.urlresolvers import reverse_lazy, reverse from django.utils.translation import ugettext as _ from django.u...
{ "repo_name": "moshthepitt/answers", "path": "questions/views.py", "copies": "1", "size": "6326", "license": "mit", "hash": 1613980615378668500, "line_mean": 33.0107526882, "line_max": 119, "alpha_frac": 0.6552323743, "autogenerated": false, "ratio": 3.8385922330097086, "config_test": false, ...
from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView from django.views.generic.list import ListView from qualification.forms import QualificationForm, UnitForm from qualification.models import Qualification, Pathway, Unit class QualificationList(ListView): model = Q...
{ "repo_name": "jmoreman/eTrack", "path": "qualification/views.py", "copies": "1", "size": "1629", "license": "mit", "hash": 6762372227392722000, "line_mean": 26.6101694915, "line_max": 85, "alpha_frac": 0.6998158379, "autogenerated": false, "ratio": 4.032178217821782, "config_test": false, "h...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.http import HttpResponse, Http404, HttpResponseRedirect from django.core.urlresolvers import reverse from django.db.models import Q from .models import Project, Story, Task, Sprint, SprintTasks from .forms imp...
{ "repo_name": "OpenSourceSag/django-dash2013", "path": "scrum/views.py", "copies": "1", "size": "10439", "license": "bsd-3-clause", "hash": 2153922752473392600, "line_mean": 33.003257329, "line_max": 194, "alpha_frac": 0.5818564997, "autogenerated": false, "ratio": 4.035175879396985, "config_te...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.shortcuts import render from django.http import HttpResponse from django.utils import timezone from jawns.models import They, Content class ContentDetailView(DetailView): model = Content def get_cont...
{ "repo_name": "ibtokin/ibtokin", "path": "jawns/views.py", "copies": "1", "size": "1095", "license": "mit", "hash": 8970402834475570000, "line_mean": 28.5945945946, "line_max": 75, "alpha_frac": 0.701369863, "autogenerated": false, "ratio": 4.163498098859316, "config_test": false, "has_no_key...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.template.response import TemplateResponse from django.db.models import Q from .models import Profile from friendship.models import Friend, Follow from django.shortcuts import redirect, get_object_or_404 from dj...
{ "repo_name": "wraithan/rplay", "path": "replayswithfriends/profiles/views.py", "copies": "1", "size": "4396", "license": "mit", "hash": -5494187348041675000, "line_mean": 35.3305785124, "line_max": 148, "alpha_frac": 0.6533212011, "autogenerated": false, "ratio": 3.7863910422049956, "config_te...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.edit import CreateView from django.http import HttpResponse from .models import Match, Player from .forms import MatchUploadForm from django.contrib.auth.decorators import login_required from dja...
{ "repo_name": "wraithan/rplay", "path": "replayswithfriends/sc2match/views.py", "copies": "1", "size": "2420", "license": "mit", "hash": -2536701784759299600, "line_mean": 35.1194029851, "line_max": 125, "alpha_frac": 0.6958677686, "autogenerated": false, "ratio": 3.954248366013072, "config_tes...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.core.urlresolvers import r...
{ "repo_name": "acdh-oeaw/vhioe", "path": "vocabs/views.py", "copies": "2", "size": "5083", "license": "mit", "hash": 5044026580109378000, "line_mean": 28.9, "line_max": 97, "alpha_frac": 0.6986031871, "autogenerated": false, "ratio": 3.813203300825206, "config_test": false, "has_no_keywords":...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.edit import UpdateView from django.http import Http404 from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.contrib import me...
{ "repo_name": "siggame/webserver", "path": "webserver/profiles/views.py", "copies": "1", "size": "3203", "license": "bsd-3-clause", "hash": 8767463007253984000, "line_mean": 33.8152173913, "line_max": 82, "alpha_frac": 0.6831095848, "autogenerated": false, "ratio": 4.186928104575164, "config_te...
from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.simple import direct_to_template from django.contrib.sites.models import get_current_site from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.models import User from djan...
{ "repo_name": "luminousflux/django-luminous-tumblelog", "path": "tumblelog/views.py", "copies": "1", "size": "5411", "license": "mit", "hash": 7194222584634498000, "line_mean": 37.1056338028, "line_max": 170, "alpha_frac": 0.6100535945, "autogenerated": false, "ratio": 3.943877551020408, "confi...
from django.views.generic.detail import DetailView from dictionary.models import Gloss class GlossDetailView(DetailView): model = Gloss context_object_name = 'gloss' ''' def get_context_data(self, **kwargs): # Call the base implementation first to get a context context = super(GlossD...
{ "repo_name": "hujosh/signbank-dictionary", "path": "dictionary/adminviews.py", "copies": "1", "size": "1026", "license": "bsd-3-clause", "hash": 525619688111017800, "line_mean": 37, "line_max": 94, "alpha_frac": 0.6549707602, "autogenerated": false, "ratio": 3.992217898832685, "config_test": f...
from django.views.generic.detail import DetailView from .models import Funday class FundayView(DetailView): model = Funday def get_template_names(self): return ['home.html'] class RandomFundayView(FundayView): def get_queryset(self): return super(RandomFundayView, self).get_queryset()....
{ "repo_name": "wraithan/funday", "path": "anyday/core/views.py", "copies": "1", "size": "1228", "license": "mit", "hash": -6729063989157128000, "line_mean": 26.9090909091, "line_max": 78, "alpha_frac": 0.588762215, "autogenerated": false, "ratio": 3.7901234567901234, "config_test": false, "ha...
from django.views.generic.detail import SingleObjectMixin from django.views.generic.edit import FormView, DeleteView, UpdateView from django.core.urlresolvers import reverse, reverse_lazy from django.core.exceptions import PermissionDenied from django.http import HttpResponse, HttpResponseRedirect from django.conf impo...
{ "repo_name": "vuonghv/brs", "path": "apps/comments/views.py", "copies": "1", "size": "3318", "license": "mit", "hash": 953887367243525500, "line_mean": 37.5813953488, "line_max": 103, "alpha_frac": 0.6449668475, "autogenerated": false, "ratio": 4.111524163568773, "config_test": false, "has_n...
from django.views.generic.detail import SingleObjectMixin, SingleObjectTemplateResponseMixin from django.views.generic.edit import ModelFormMixin, ProcessFormView, BaseDeleteView from django.utils.translation import get_language from hvad.forms import translatable_modelform_factory from hvad.utils import collect_contex...
{ "repo_name": "hds/django-hvad", "path": "hvad/views.py", "copies": "1", "size": "7444", "license": "bsd-3-clause", "hash": 2074445141873696800, "line_mean": 42.5321637427, "line_max": 108, "alpha_frac": 0.5983342289, "autogenerated": false, "ratio": 4.506053268765133, "config_test": false, "...
from django.views.generic.detail import SingleObjectTemplateResponseMixin from django.views.generic.edit import ModelFormMixin, ProcessFormView from .edit import BackendFormViewMixin from .mixins import SaveInlineDoneMixin class SaneCreateView(SingleObjectTemplateResponseMixin, ModelFormMixin, ProcessFormView): ...
{ "repo_name": "team23/django_backend", "path": "django_backend/backend/base/views/create.py", "copies": "1", "size": "1729", "license": "bsd-3-clause", "hash": -5924220817151018000, "line_mean": 35.7872340426, "line_max": 89, "alpha_frac": 0.7044534413, "autogenerated": false, "ratio": 3.86800894...
from django.views.generic.detail import SingleObjectTemplateResponseMixin from django.views.generic.edit import ModelFormMixin, ProcessFormView class OrganizationFilterMixin(object): """ Mixin for SingleObjectMixin and MultipleObjectMixin to select only objects belonging to the current organization. "...
{ "repo_name": "Inter-Actief/alexia", "path": "alexia/views/mixins.py", "copies": "1", "size": "2751", "license": "bsd-3-clause", "hash": -5689370175835592000, "line_mean": 31.3647058824, "line_max": 119, "alpha_frac": 0.723736823, "autogenerated": false, "ratio": 4.577371048252912, "config_test...
from django.views.generic.edit import BaseDetailView from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from mapentity.decorators import view_cache_response_content from mapentity.views import JSONResponseMixin, LastModifi...
{ "repo_name": "camillemonchicourt/Geotrek", "path": "geotrek/altimetry/views.py", "copies": "1", "size": "2477", "license": "bsd-2-clause", "hash": -8048446292914583000, "line_mean": 33.8873239437, "line_max": 77, "alpha_frac": 0.6653209528, "autogenerated": false, "ratio": 4.021103896103896, "...
from django.views.generic.edit import CreateView, FormView from django.views.generic.base import View, TemplateResponse from django.views.decorators.csrf import csrf_exempt from . models import Meal from . forms import MealCreateForm, MealCreateFormAPI from . sendfile import send from . import styles from . settings i...
{ "repo_name": "ntrrgc/lasana", "path": "views.py", "copies": "1", "size": "4462", "license": "mit", "hash": 4396426937139121000, "line_mean": 32.0518518519, "line_max": 87, "alpha_frac": 0.6378305693, "autogenerated": false, "ratio": 3.8267581475128645, "config_test": false, "has_no_keywords"...
from django.views.generic.edit import CreateView,FormView from .models import CSVInput from .forms import CSVForm from django.core.urlresolvers import reverse_lazy from django.http import HttpResponseRedirect, HttpResponse from django.contrib import messages from django.shortcuts import render, get_object_or_404 from d...
{ "repo_name": "bkawan/journal-automation", "path": "saasuweb/saasu/views.py", "copies": "1", "size": "1291", "license": "mit", "hash": -5252225334399077000, "line_mean": 29.023255814, "line_max": 70, "alpha_frac": 0.6692486445, "autogenerated": false, "ratio": 4.232786885245901, "config_test": ...
from django.views.generic.edit import CreateView from django.core.urlresolvers import reverse from django.http import Http404 from django.contrib.contenttypes.models import ContentType from django.contrib import messages from ..forms import ClaimRequestForm from ..models import ClaimRequest from .mixins import WaffleSw...
{ "repo_name": "nikdoof/vapemap", "path": "app/stores/views/claims.py", "copies": "1", "size": "1941", "license": "bsd-3-clause", "hash": -8924453317806805000, "line_mean": 35.641509434, "line_max": 129, "alpha_frac": 0.6718186502, "autogenerated": false, "ratio": 3.7762645914396886, "config_tes...
from django.views.generic.edit import CreateView from django.core.urlresolvers import reverse from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from .forms import ItemForm from .models import Item class ItemErrorFlashView(CreateView): """エラーがあるときにフラッシュメッセージを表示するVi...
{ "repo_name": "thinkAmi-sandbox/Django_messages_framework_sample", "path": "myapp/views.py", "copies": "1", "size": "3091", "license": "unlicense", "hash": -8943942355326645000, "line_mean": 29.7108433735, "line_max": 65, "alpha_frac": 0.6571204394, "autogenerated": false, "ratio": 2.585192697768...
from django.views.generic.edit import CreateView from django.http import HttpResponse, HttpResponseRedirect from iiits.config import templates, urls from iiits.mixins import AjaxableResponseMixin from iiits.models import * from iiits.forms import * # Notice Board class AddNotice(AjaxableResponseMixin, CreateView): mo...
{ "repo_name": "IIITS/iiits.ac.in", "path": "iiits/create.py", "copies": "1", "size": "1040", "license": "mit", "hash": -567289811091908500, "line_mean": 32.5806451613, "line_max": 68, "alpha_frac": 0.7778846154, "autogenerated": false, "ratio": 3.5986159169550174, "config_test": false, "has_n...
from django.views.generic.edit import CreateView from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.http import HttpResponse from . import models def all(request): """View of all submitted entries""" entries = models.Entry.objects.all() scores = map(lamb...
{ "repo_name": "lewfish/django-social-news", "path": "social_news/views.py", "copies": "1", "size": "1858", "license": "mit", "hash": 6622186088469338000, "line_mean": 31.5964912281, "line_max": 78, "alpha_frac": 0.6329386437, "autogenerated": false, "ratio": 3.870833333333333, "config_test": fa...
from django.views.generic.edit import CreateView from django.views.generic.edit import UpdateView from django.core.urlresolvers import reverse_lazy, reverse from django.utils.translation import ugettext as _ from django.utils.html import format_html from datatableview.views import DatatableView from core.mixins import...
{ "repo_name": "moshthepitt/answers", "path": "answers/views.py", "copies": "1", "size": "1455", "license": "mit", "hash": -207171114962034100, "line_mean": 28.693877551, "line_max": 71, "alpha_frac": 0.6742268041, "autogenerated": false, "ratio": 3.730769230769231, "config_test": false, "has_...
from django.views.generic.edit import CreateView from django.views.generic.edit import UpdateView from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.views.generic.edit import DeleteView from django.core.urlresolvers import reverse_lazy from django.utils.transla...
{ "repo_name": "moshthepitt/product.co.ke", "path": "links/views.py", "copies": "1", "size": "2020", "license": "mit", "hash": 6396668013659265000, "line_mean": 31.0634920635, "line_max": 113, "alpha_frac": 0.7217821782, "autogenerated": false, "ratio": 3.8041431261770247, "config_test": false, ...
from django.views.generic.edit import CreateView from django.views.generic import DetailView, ListView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.shortcuts import reverse, get_object_or_404 from django.db.models import Q, Max from django.ht...
{ "repo_name": "avinassh/della", "path": "della/inbox/views.py", "copies": "1", "size": "6446", "license": "mit", "hash": -6590046652661474000, "line_mean": 34.8111111111, "line_max": 74, "alpha_frac": 0.623952839, "autogenerated": false, "ratio": 3.8668266346730653, "config_test": false, "has...
from django.views.generic.edit import CreateView from django.views.generic import FormView, View from django.core.urlresolvers import reverse_lazy from django.utils.decorators import method_decorator from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from django.contrib.auth import login as au...
{ "repo_name": "ryanroser/ecliptic", "path": "ecliptic/researchers/views.py", "copies": "1", "size": "1571", "license": "mit", "hash": 2291185646573427200, "line_mean": 34.7045454545, "line_max": 75, "alpha_frac": 0.7326543603, "autogenerated": false, "ratio": 4.00765306122449, "config_test": fa...
from django.views.generic.edit import CreateView from django.views.generic.list import ListView from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.contrib import messages #from product.models import Rep from core.forms import SearchForm from core....
{ "repo_name": "boyombo/pharmrep", "path": "pharmrep/core/views.py", "copies": "1", "size": "2761", "license": "mit", "hash": 4089624482952638500, "line_mean": 34.8571428571, "line_max": 78, "alpha_frac": 0.6247736327, "autogenerated": false, "ratio": 3.7925824175824174, "config_test": false, ...