text stringlengths 0 1.05M | meta dict |
|---|---|
from django.views.generic import TemplateView
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseServerError, Http404
import simplejson as json
from django.views.decorators.cache import cache_page
from django.utils.decorators import method_decorator
from django_bootstra386view_app.utils.render im... | {
"repo_name": "bossiernesto/django-bootstra.386-classview",
"path": "django_bootstra386view/django_bootstra386view_app/views/base.py",
"copies": "1",
"size": "3672",
"license": "bsd-3-clause",
"hash": -3606658210704310300,
"line_mean": 24.1575342466,
"line_max": 116,
"alpha_frac": 0.6587690632,
"au... |
from django.views.generic import TemplateView
from django.http import HttpResponse
from django.utils.translation import ugettext as _
from needtovisit_app import models
from allauth.account.decorators import verified_email_required
from django.utils.decorators import method_decorator
from django.db.models import Q
impo... | {
"repo_name": "marcin-pwr/needtovisit",
"path": "needtovisit_app/views.py",
"copies": "1",
"size": "7112",
"license": "mit",
"hash": 1996769747797803800,
"line_mean": 34.9191919192,
"line_max": 165,
"alpha_frac": 0.5061867267,
"autogenerated": false,
"ratio": 4.456140350877193,
"config_test": f... |
from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.contrib.auth import logout
from django.conf import settings
from flexdb.utils import get_config
class Index(TemplateView):
template_name = "flexdb/index.html"
def get_context_data(self, **kwargs):
c... | {
"repo_name": "EE/flexdb",
"path": "main_page/views.py",
"copies": "1",
"size": "1144",
"license": "mit",
"hash": 3472563792315200000,
"line_mean": 30.7777777778,
"line_max": 70,
"alpha_frac": 0.618006993,
"autogenerated": false,
"ratio": 4.129963898916968,
"config_test": true,
"has_no_keywor... |
from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from django.contrib.auth.models import User
# import uuid
from wye.organisations.models import Organisation
from wye.profiles.models import Profile
from wye.workshops.models import Workshop
from .constants import WorkshopStatus
... | {
"repo_name": "pythonindia/wye",
"path": "wye/base/views.py",
"copies": "1",
"size": "2812",
"license": "mit",
"hash": -2020431864169484500,
"line_mean": 34.5949367089,
"line_max": 74,
"alpha_frac": 0.6618065434,
"autogenerated": false,
"ratio": 3.921896792189679,
"config_test": false,
"has_n... |
from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from models import SocialFriendList
from utils import setting
if setting("SOCIAL_FRIENDS_USING_ALLAUTH", False):
USING_ALLAUTH = True
else:
USING_ALLAUTH = False
REDIRECT_IF_NO_ACCOUNT = setting('SF_REDIRECT_IF_NO_SOCI... | {
"repo_name": "laplacesdemon/django-social-friends-finder",
"path": "social_friends_finder/views.py",
"copies": "1",
"size": "2199",
"license": "bsd-3-clause",
"hash": 5898029136639531000,
"line_mean": 32.8307692308,
"line_max": 110,
"alpha_frac": 0.6471123238,
"autogenerated": false,
"ratio": 4.... |
from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from models import SocialFriendList
from utils import setting
REDIRECT_IF_NO_ACCOUNT = setting('SF_REDIRECT_IF_NO_SOCIAL_ACCOUNT_FOUND', False)
REDIRECT_URL = setting('SF_REDIRECT_URL', "/")
class FriendListView(TemplateView):... | {
"repo_name": "mastak/python-social-friends-finder",
"path": "social_friends/views.py",
"copies": "1",
"size": "1959",
"license": "bsd-3-clause",
"hash": -3145202782945601000,
"line_mean": 33.9821428571,
"line_max": 110,
"alpha_frac": 0.6533945891,
"autogenerated": false,
"ratio": 4.2038626609442... |
from django.views.generic import TemplateView
from django.http import HttpResponseRedirect
from wye.organisations.models import Organisation
from wye.profiles.models import Profile
from wye.workshops.models import Workshop
from .constants import WorkshopStatus
class HomePageView(TemplateView):
template_name = 'i... | {
"repo_name": "shankig/wye",
"path": "wye/base/views.py",
"copies": "2",
"size": "1440",
"license": "mit",
"hash": -7232874422716274000,
"line_mean": 37.9189189189,
"line_max": 74,
"alpha_frac": 0.6916666667,
"autogenerated": false,
"ratio": 4.056338028169014,
"config_test": false,
"has_no_ke... |
from django.views.generic import TemplateView
from django.http import JsonResponse
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import (csrf_protect)
from mail.forms import PublicMessageForm
from base.apputil import App_Render
def aboutus(request):
data = {'title': 'Abou... | {
"repo_name": "amitdhiman000/MyOffers",
"path": "public/views.py",
"copies": "1",
"size": "1575",
"license": "apache-2.0",
"hash": 1790317300929053200,
"line_mean": 34.7954545455,
"line_max": 86,
"alpha_frac": 0.6095238095,
"autogenerated": false,
"ratio": 4.1015625,
"config_test": false,
"ha... |
from django.views.generic import TemplateView
from django import template
from django import http
from django import forms
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.shortcuts import render
from google.appengine.ext impor... | {
"repo_name": "kariefury/pyDev-Django-GAE",
"path": "hello/views.py",
"copies": "1",
"size": "3020",
"license": "epl-1.0",
"hash": 8483856358421753000,
"line_mean": 28.6078431373,
"line_max": 82,
"alpha_frac": 0.6433774834,
"autogenerated": false,
"ratio": 3.742255266418835,
"config_test": fals... |
from django.views.generic import TemplateView
from django.shortcuts import HttpResponse,Http404
from django.contrib.admin.views.decorators import staff_member_required
from django.utils.decorators import method_decorator
class Upload(TemplateView):
template_name = None
#@TODO: check perm for model
@method... | {
"repo_name": "xacce/django_ffiler",
"path": "views.py",
"copies": "1",
"size": "1714",
"license": "mit",
"hash": 2251298168433746200,
"line_mean": 31.9615384615,
"line_max": 98,
"alpha_frac": 0.5962660443,
"autogenerated": false,
"ratio": 4.090692124105012,
"config_test": false,
"has_no_keyw... |
from django.views.generic import TemplateView
from django.shortcuts import redirect
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from django.views.decorators.http import require_POST
class LoginView(TemplateView):
template_name = 'authentication/login.htm... | {
"repo_name": "cloudcomputinghust/CAL_Appliances",
"path": "MCS/mcs/apps/authentication/views.py",
"copies": "1",
"size": "1835",
"license": "mit",
"hash": -61641640926895340,
"line_mean": 28.126984127,
"line_max": 62,
"alpha_frac": 0.6190735695,
"autogenerated": false,
"ratio": 4.307511737089202... |
from django.views.generic import TemplateView
from django.shortcuts import redirect
from .forms import AddQuestionForm
from ..evaluation.models import Evaluation, Evaluation_Question
from ..course.models import Course
from django import forms
# Create your views here.
class AddQuestionView(TemplateView):
template_nam... | {
"repo_name": "carlosa54/evaluation_system",
"path": "evaluation_system/questions/views.py",
"copies": "1",
"size": "1762",
"license": "mit",
"hash": 4265156343530590000,
"line_mean": 35.7291666667,
"line_max": 132,
"alpha_frac": 0.7287173666,
"autogenerated": false,
"ratio": 3.595918367346939,
... |
from django.views.generic import TemplateView
from django.shortcuts import redirect
from .forms import CourseForm
from models import Course_User, Course
# Create your views here.
class AddCourseView(TemplateView):
template_name = 'dashboard/addcourse.html'
def post(self, request, *args, **kwargs):
if not request.... | {
"repo_name": "carlosa54/evaluation_system",
"path": "evaluation_system/course/views.py",
"copies": "1",
"size": "1203",
"license": "mit",
"hash": -4926218616170868000,
"line_mean": 28.3658536585,
"line_max": 80,
"alpha_frac": 0.7098919368,
"autogenerated": false,
"ratio": 3.3603351955307263,
"... |
from django.views.generic import TemplateView
from django.shortcuts import render, get_object_or_404
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.core.mail import send_mail
from django.http import HttpRequest, HttpResponseRedirect
from datetime import datetime
from .models impor... | {
"repo_name": "pyladieshre/pyladies",
"path": "pyladies_harare/views.py",
"copies": "1",
"size": "8618",
"license": "mit",
"hash": 3002085640022339000,
"line_mean": 34.3196721311,
"line_max": 93,
"alpha_frac": 0.6102343931,
"autogenerated": false,
"ratio": 3.781483106625713,
"config_test": fals... |
from django.views.generic import TemplateView
from django.shortcuts import render, get_object_or_404
from django.utils import timezone
from datetime import datetime
from .models import Post, Meetup, Page, Contact, Category
from .forms import ContactForm, CommentForm
def get_meetup():
meetups = Meetup.objects.fil... | {
"repo_name": "hbutau/pyladies",
"path": "pyladies_harare/views.py",
"copies": "1",
"size": "4848",
"license": "mit",
"hash": 1972142045911319000,
"line_mean": 32.4344827586,
"line_max": 86,
"alpha_frac": 0.6398514851,
"autogenerated": false,
"ratio": 3.7092578423871463,
"config_test": false,
... |
from django.views.generic import TemplateView
from django.shortcuts import render
from api.models.protocols import Protocol
from brp_admin.forms import ProtocolForm, UserForm
from django.core import management
from .base import JenkinsJob
import logging
log = logging.getLogger(__name__)
class CacheSubjects(Templat... | {
"repo_name": "chop-dbhi/biorepo-portal",
"path": "brp_admin/views/brp_commands.py",
"copies": "1",
"size": "5281",
"license": "bsd-2-clause",
"hash": -7775175312533311000,
"line_mean": 40.2578125,
"line_max": 174,
"alpha_frac": 0.5904184813,
"autogenerated": false,
"ratio": 4.533047210300429,
... |
from django.views.generic import TemplateView
from django.shortcuts import render
from django.contrib.auth.models import User
from rest_framework.permissions import IsAuthenticatedOrReadOnly, DjangoModelPermissions
from rest_framework import viewsets
import django_filters
# Create your views here.
from .models imp... | {
"repo_name": "dsclementsen/django-notes",
"path": "django_notes/notes/views.py",
"copies": "1",
"size": "1438",
"license": "bsd-2-clause",
"hash": -8958565874761776000,
"line_mean": 26.6538461538,
"line_max": 88,
"alpha_frac": 0.7364394993,
"autogenerated": false,
"ratio": 4.168115942028986,
"... |
from django.views.generic import TemplateView
from django.shortcuts import render
from django.views import View
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.conf import settings
from django.urls import reverse
from django.http import JsonResp... | {
"repo_name": "Secured-Pi/Secured-Pi",
"path": "securedpi_facerec/views.py",
"copies": "1",
"size": "1191",
"license": "mit",
"hash": -6834608056605266000,
"line_mean": 37.4193548387,
"line_max": 69,
"alpha_frac": 0.6926952141,
"autogenerated": false,
"ratio": 4.01010101010101,
"config_test": f... |
from django.views.generic import TemplateView
from django.shortcuts import render
from rest_framework import generics
from recipes.models import Recipe, Step, RecipeIngredient
from recipes.serializers import RecipeSerializer, StepSerializer, RecipeIngredientSerializer
from django.shortcuts import get_object_or_404
cl... | {
"repo_name": "kimond/miamm",
"path": "miamm/recipes/views.py",
"copies": "1",
"size": "2596",
"license": "bsd-3-clause",
"hash": 156435995698764200,
"line_mean": 29.5411764706,
"line_max": 92,
"alpha_frac": 0.6929892142,
"autogenerated": false,
"ratio": 3.993846153846154,
"config_test": false,... |
from django.views.generic import TemplateView
from django.shortcuts import render
from .serializer import *
from django import forms
from rest_framework import generics, permissions
from partage.models import *
from authentification.models import *
class Partage(TemplateView):
template_name = 'partage/partage.htm... | {
"repo_name": "Hastu/educ_plateform",
"path": "educ/partage/views.py",
"copies": "1",
"size": "2026",
"license": "mit",
"hash": -1368873552093714200,
"line_mean": 27.9571428571,
"line_max": 73,
"alpha_frac": 0.6712734452,
"autogenerated": false,
"ratio": 3.7657992565055762,
"config_test": false... |
from django.views.generic import TemplateView
from django.shortcuts import render_to_response, render, redirect
from django.core.mail import send_mail
from django.http import HttpResponse
from django.template import RequestContext
# from django.http import HttpResponseRedirect
# from pangolin.forms import *
from django... | {
"repo_name": "skylifewww/pangolin_new",
"path": "pangolin/views.py",
"copies": "1",
"size": "1294",
"license": "mit",
"hash": 794783069687854500,
"line_mean": 26.5319148936,
"line_max": 71,
"alpha_frac": 0.771251932,
"autogenerated": false,
"ratio": 3.729106628242075,
"config_test": false,
"... |
from django.views.generic import TemplateView
from django.template.response import TemplateResponse
from django.http import HttpResponse
from django.conf import settings
from django.db.models import Model
from django.db.models.query import QuerySet
from django.core.urlresolvers import reverse
from django.utils.safestri... | {
"repo_name": "vistacan/django-rt",
"path": "django_rt/views.py",
"copies": "1",
"size": "18306",
"license": "mit",
"hash": 7866766209259438000,
"line_mean": 32.5908256881,
"line_max": 77,
"alpha_frac": 0.5336501693,
"autogenerated": false,
"ratio": 4.506646971935007,
"config_test": false,
"h... |
from django.views.generic import TemplateView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404
from django.http import JsonResponse
from Hindlebook.models import Author
class FriendsView(TemplateView):
te... | {
"repo_name": "Roshack/cmput410-project",
"path": "DistributedSocialNetworking/Hindlebook/views/friends_view.py",
"copies": "2",
"size": "1280",
"license": "apache-2.0",
"hash": -9186427538470341000,
"line_mean": 34.5555555556,
"line_max": 75,
"alpha_frac": 0.7109375,
"autogenerated": false,
"rat... |
from django.views.generic import TemplateView
from django.utils.translation import ugettext as _
from oscar.core.loading import get_model
Category = get_model('catalogue', 'Category')
Course = get_model('catalogue', 'Product')
# Create your views here or die.
class SearchV2View(TemplateView):
template_name = 'ad... | {
"repo_name": "dilosung/ad-manage",
"path": "ad_manage/djangoapps/search/views.py",
"copies": "2",
"size": "1674",
"license": "mit",
"hash": -7705865654822921000,
"line_mean": 38.8571428571,
"line_max": 143,
"alpha_frac": 0.605734767,
"autogenerated": false,
"ratio": 4.1745635910224435,
"config... |
from django.views.generic import TemplateView
from django.views.generic.base import ContextMixin
from rest_framework import generics, status
from rest_framework.response import Response
from config.settings.base import GOOGLE_API_KEY
from gpstrack.tracks import permissions
from gpstrack.tracks.models import Track, Poi... | {
"repo_name": "ETinLV/gpstrack",
"path": "gpstrack/tracks/views.py",
"copies": "1",
"size": "2798",
"license": "mit",
"hash": -564910953385393800,
"line_mean": 33.975,
"line_max": 112,
"alpha_frac": 0.6790564689,
"autogenerated": false,
"ratio": 4.1513353115727005,
"config_test": false,
"has_... |
from django.views.generic import TemplateView
from django.views.generic.base import RedirectView
from . import get_plan_model
from .utils import get_default_backend
Plan = get_plan_model()
class PaymentsContextMixin(object):
def get_context_data(self, **kwargs):
context = super(PaymentsContextMixin, ... | {
"repo_name": "ubergrape/django-abo",
"path": "abo/views.py",
"copies": "1",
"size": "1655",
"license": "bsd-3-clause",
"hash": 2815513800983478300,
"line_mean": 24.4615384615,
"line_max": 78,
"alpha_frac": 0.684592145,
"autogenerated": false,
"ratio": 3.813364055299539,
"config_test": false,
... |
from django.views.generic import TemplateView
from django.views.generic.base import TemplateResponseMixin, ContextMixin
from django.views.generic.edit import ProcessFormView
from django.template.defaultfilters import slugify
from reporting.exports import CSVView
class ReportMixin(object):
report_class = None
... | {
"repo_name": "flagshipenterprise/django-prickly-reports",
"path": "reporting/views.py",
"copies": "1",
"size": "2593",
"license": "mit",
"hash": 2247750684562652700,
"line_mean": 35.0138888889,
"line_max": 113,
"alpha_frac": 0.6779791747,
"autogenerated": false,
"ratio": 3.8188512518409428,
"c... |
from django.views.generic import TemplateView
from django.views.generic.base import View
from gn_django.utils import csv_download_response
class ArticleView(TemplateView):
template_name = "article.j2"
def get_context_data(self):
return {
'app': 'content',
}
class AboutView(Templa... | {
"repo_name": "gamernetwork/gn-django",
"path": "tests/gn_django_tests/content/views.py",
"copies": "1",
"size": "1252",
"license": "mit",
"hash": -3007866147515555000,
"line_mean": 25.0833333333,
"line_max": 100,
"alpha_frac": 0.4864217252,
"autogenerated": false,
"ratio": 3.782477341389728,
"... |
from django.views.generic import TemplateView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView
from django.core.urlresolvers import reverse
from django.http import Http404
from django.contrib.auth.decorators import login_required
from django.utils.decorators import met... | {
"repo_name": "siggame/siggame-vote",
"path": "vote/polls/views.py",
"copies": "1",
"size": "4332",
"license": "bsd-3-clause",
"hash": -3077256557396017700,
"line_mean": 33.935483871,
"line_max": 83,
"alpha_frac": 0.6668975069,
"autogenerated": false,
"ratio": 3.7409326424870466,
"config_test":... |
from django.views.generic import TemplateView
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.views.generic.detail import SingleObjectMixin
from .models import Presentation, Category
from speaker.models import Speaker
class HomeView(TemplateView):
tem... | {
"repo_name": "bahattincinic/django-101",
"path": "presentation/views.py",
"copies": "1",
"size": "1438",
"license": "mit",
"hash": 3784969648809148400,
"line_mean": 31.6818181818,
"line_max": 76,
"alpha_frac": 0.7162726008,
"autogenerated": false,
"ratio": 3.907608695652174,
"config_test": fal... |
from django.views.generic import TemplateView
from django.views.generic.detail import DetailView
from reader.models import Item, Reader
class ReaderView(TemplateView):
template_name = "reader/item.html"
def get_context_data(self, **kwargs):
context = super(ReaderView, self).get_context_data(**kwargs... | {
"repo_name": "ImmaculateObsession/nest",
"path": "reader/views.py",
"copies": "1",
"size": "1978",
"license": "mit",
"hash": -7999067966324836000,
"line_mean": 26.095890411,
"line_max": 83,
"alpha_frac": 0.5187057634,
"autogenerated": false,
"ratio": 4.244635193133047,
"config_test": false,
... |
from django.views.generic import TemplateView
from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.views.generic.detail import DetailView
from django.core.urlresolvers import reverse_lazy
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db import conne... | {
"repo_name": "kuza/chess_tournament",
"path": "chess/views.py",
"copies": "1",
"size": "6299",
"license": "bsd-3-clause",
"hash": -7391587214907689000,
"line_mean": 34.593220339,
"line_max": 167,
"alpha_frac": 0.6504207017,
"autogenerated": false,
"ratio": 3.9741324921135646,
"config_test": fa... |
from django.views.generic import TemplateView
from django.views.generic.edit import UpdateView
from django.contrib.auth.decorators import login_required
from .models import Profile
class HomePageView(TemplateView):
template_name = "home.html"
home_page = HomePageView.as_view()
class ProfileView(TemplateView):
... | {
"repo_name": "aaee-enscachan/aaee-front",
"path": "aaee_front/apps/main/views.py",
"copies": "1",
"size": "1135",
"license": "mit",
"hash": 1162525063378758100,
"line_mean": 24.7954545455,
"line_max": 68,
"alpha_frac": 0.6757709251,
"autogenerated": false,
"ratio": 3.8087248322147653,
"config_... |
from django.views.generic import TemplateView
from django.views.generic.edit import UpdateView
from django.core.urlresolvers import reverse
from app import forms
from app import models
class Index(TemplateView):
template_name = "app/index.html"
def get_context_data(self, **kwargs):
context = super()... | {
"repo_name": "AntycSolutions/django-knockout",
"path": "examples/without-django-rest-framework/app/views.py",
"copies": "1",
"size": "3014",
"license": "mit",
"hash": 1664650503489568300,
"line_mean": 24.9827586207,
"line_max": 73,
"alpha_frac": 0.6320504313,
"autogenerated": false,
"ratio": 4.0... |
from django.views.generic import TemplateView
from django.views.generic import ListView, DetailView
from django.views.generic.edit import FormView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponse
from django.d... | {
"repo_name": "tigeli/futurice-ldap-user-manager",
"path": "fum/users/views.py",
"copies": "1",
"size": "2360",
"license": "bsd-3-clause",
"hash": -3102152381645905400,
"line_mean": 34.7575757576,
"line_max": 137,
"alpha_frac": 0.6707627119,
"autogenerated": false,
"ratio": 3.704866562009419,
"... |
from django.views.generic import TemplateView
from django.views.generic.list import ListView
from django.views.generic.edit import UpdateView
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect
from django.core.context_processors import csrf
from django.contrib.auth.decorators i... | {
"repo_name": "aaronsnig501/foreign-guides",
"path": "apps/accounts/views.py",
"copies": "1",
"size": "3704",
"license": "mit",
"hash": -1541674034973997000,
"line_mean": 26.437037037,
"line_max": 74,
"alpha_frac": 0.6665766739,
"autogenerated": false,
"ratio": 4.052516411378556,
"config_test":... |
from django.views.generic import TemplateView
from easy_rest.views import RestApiView
from easy_rest.mixins import FunctionUnPackerMixin
from challenge_runner.models import RunningChallenge
from challenge_processor.models import Challenge
from challenge_framework.mixins import AdminMixin
from challenge_processor.test... | {
"repo_name": "jonatanSh/challenge-framework",
"path": "challenge_framework/admin_views/views.py",
"copies": "1",
"size": "2074",
"license": "apache-2.0",
"hash": 3546415503177853000,
"line_mean": 26.6533333333,
"line_max": 88,
"alpha_frac": 0.6494696239,
"autogenerated": false,
"ratio": 3.996146... |
from django.views.generic import TemplateView
from haystack.generic_views import SearchView
from haystack.forms import SearchForm
from haystack.query import SearchQuerySet
from person.models import Person
class PersonsView(TemplateView):
template_name = 'person/persons.html'
def get_context_data(self, **kwa... | {
"repo_name": "openkamer/openkamer",
"path": "person/views.py",
"copies": "1",
"size": "3048",
"license": "mit",
"hash": -1685566232825591800,
"line_mean": 31.7741935484,
"line_max": 105,
"alpha_frac": 0.6469816273,
"autogenerated": false,
"ratio": 3.7536945812807883,
"config_test": false,
"h... |
from django.views.generic import TemplateView
from .models import Player, RedsData
from django.db.models import Func, F
class MainView(TemplateView):
template_name = 'stats/index.html'
def get_context_data(self, **kwargs):
context = super(MainView, self).get_context_data(**kwargs)
context['all... | {
"repo_name": "MichaelStadtmiller/Reds",
"path": "stats/views.py",
"copies": "1",
"size": "2237",
"license": "apache-2.0",
"hash": -532733833575226400,
"line_mean": 37.5689655172,
"line_max": 103,
"alpha_frac": 0.5619132767,
"autogenerated": false,
"ratio": 3.870242214532872,
"config_test": fal... |
from django.views.generic import TemplateView
from news.models import News
from .models import Album, Video
# Create your views here.
class GalleryView(TemplateView):
template_name = 'gallery.html'
def get_context_data(self, **kwargs):
context = super(GalleryView, self).get_context_data(**kwargs)
... | {
"repo_name": "aodarc/tennis_club",
"path": "gallery/views.py",
"copies": "1",
"size": "1553",
"license": "apache-2.0",
"hash": 6491983137072131000,
"line_mean": 26.7321428571,
"line_max": 79,
"alpha_frac": 0.6574372183,
"autogenerated": false,
"ratio": 3.6032482598607887,
"config_test": false,... |
from django.views.generic import TemplateView
from .response import RedisTemplateResponse
class RedisView(TemplateView):
response_class = RedisTemplateResponse
content_type = 'text/html'
app_name = ''
@property
def template_name(self):
return '{}:{}'.format(self.app_name, self.index_key)... | {
"repo_name": "kevinlondon/django-redis-views",
"path": "redis_views/views.py",
"copies": "1",
"size": "1058",
"license": "bsd-3-clause",
"hash": -4655870332626620000,
"line_mean": 32.0625,
"line_max": 73,
"alpha_frac": 0.6720226843,
"autogenerated": false,
"ratio": 4.390041493775934,
"config_t... |
from django.views.generic import TemplateView
from rest_framework import generics, permissions
from .serializer import *
# Create your views here.
class Forum(TemplateView):
template_name = 'forum/forum.html'
def get_context_data(self, **kwargs):
context = super(Forum, self).get_context_data(**kwarg... | {
"repo_name": "Hastu/educ_plateform",
"path": "educ/forum/views.py",
"copies": "1",
"size": "1265",
"license": "mit",
"hash": 8208939979073158000,
"line_mean": 24.3,
"line_max": 64,
"alpha_frac": 0.7241106719,
"autogenerated": false,
"ratio": 4.120521172638436,
"config_test": false,
"has_no_k... |
from django.views.generic import TemplateView
from tarifas.core import PackageSet
class Home(TemplateView):
template_name = 'tarifas/home.html'
def get_params(self):
def parse_param(attrname, default=0):
try:
return int(self.request.GET.get(attrname, default))
... | {
"repo_name": "ricardodani/vcxsolutions_devtest",
"path": "vcxsolutions_devtest/tarifas/views.py",
"copies": "1",
"size": "1035",
"license": "apache-2.0",
"hash": 4530722906353319000,
"line_mean": 29.4411764706,
"line_max": 67,
"alpha_frac": 0.5700483092,
"autogenerated": false,
"ratio": 3.833333... |
from django.views.generic import TemplateView
from tigerleaflet.models import State
class Index(TemplateView):
template_name = "pages/country.html"
def get_context_data(self, **kwargs):
return { 'title': "Welcome to the tigerleaflet demo!"}
class StateView(TemplateView):
template_name = "pages/st... | {
"repo_name": "jlillest/geodjango-tigerleaflet-example",
"path": "config/views.py",
"copies": "1",
"size": "1142",
"license": "mit",
"hash": 2230401419520964600,
"line_mean": 33.6060606061,
"line_max": 73,
"alpha_frac": 0.588441331,
"autogenerated": false,
"ratio": 3.7442622950819673,
"config_t... |
from django.views.generic import TemplateView
from website.models import MENU, PAGES, P404, SERVICES
class HtmlTemplate(TemplateView):
def get_context_data(self, page_name='index.html', **kwargs):
page=PAGES.get(page_name, P404)
kwargs.update(
dict((k, v[0] if len(v)==1 else v) for ... | {
"repo_name": "simone/static-erre",
"path": "website/views.py",
"copies": "1",
"size": "1306",
"license": "mit",
"hash": 8642327711409099000,
"line_mean": 32.5128205128,
"line_max": 84,
"alpha_frac": 0.5903522205,
"autogenerated": false,
"ratio": 4.030864197530864,
"config_test": false,
"has_... |
from django.views.generic import (TemplateView,
ListView,
DetailView,
View)
from django.shortcuts import (render,
render_to_response,
RequestContext)
from dja... | {
"repo_name": "arecker/hops",
"path": "hops/views.py",
"copies": "1",
"size": "3457",
"license": "mit",
"hash": 6512871153038434000,
"line_mean": 24.7985074627,
"line_max": 87,
"alpha_frac": 0.6022562916,
"autogenerated": false,
"ratio": 4.180169286577993,
"config_test": true,
"has_no_keyword... |
from django.views.generic import TemplateView
from admin.base.settings import ENTRY_POINTS
from admin.base.settings import KEEN_CREDENTIALS
from admin.base.utils import OSFAdmin
from admin.sales_analytics.utils import get_user_count, get_multi_product_metrics, get_repeat_action_user_count
from datetime import timedelt... | {
"repo_name": "DanielSBrown/osf.io",
"path": "admin/sales_analytics/views.py",
"copies": "13",
"size": "1204",
"license": "apache-2.0",
"hash": -3536717649593190000,
"line_mean": 47.16,
"line_max": 111,
"alpha_frac": 0.6985049834,
"autogenerated": false,
"ratio": 3.8466453674121404,
"config_tes... |
from django.views.generic import TemplateView
from analytics import maintenance
class AlreadyRegistered(Exception):
pass
class AnalyticsView(TemplateView):
columns = 4
rows = 2
def get_template_names(self):
return 'analytics/dashboard.html'
def __init__(self):
self._registry = ... | {
"repo_name": "praekelt/django-analytics",
"path": "analytics/views.py",
"copies": "1",
"size": "2267",
"license": "bsd-3-clause",
"hash": 8722959702993475000,
"line_mean": 25.9880952381,
"line_max": 88,
"alpha_frac": 0.5703573004,
"autogenerated": false,
"ratio": 4.342911877394636,
"config_tes... |
from django.views.generic import TemplateView
from apps.forum.models import Post
from apps.gallary.models import Album, Photo
from flora_project.mixins import FooterContextMixin, RightSideContextMixin
class MainPageView(FooterContextMixin, TemplateView):
template_name = 'main_page/main.html'
def get_context... | {
"repo_name": "aodarc/flowers_room",
"path": "flora_project/views.py",
"copies": "1",
"size": "1174",
"license": "mit",
"hash": 2013726860101337000,
"line_mean": 32.5428571429,
"line_max": 82,
"alpha_frac": 0.7018739353,
"autogenerated": false,
"ratio": 3.7507987220447285,
"config_test": false,... |
from django.views.generic import TemplateView
from bedrock.wordpress.models import BlogPost
from lib.l10n_utils import LangFilesMixin
from raven.contrib.django.raven_compat.models import client as sentry_client
class BlogPostsMixin:
blog_tags = None
blog_slugs = None
blog_posts_limit = 4
blog_posts_... | {
"repo_name": "sgarrity/bedrock",
"path": "bedrock/wordpress/views.py",
"copies": "5",
"size": "1421",
"license": "mpl-2.0",
"hash": 7351646734450351000,
"line_mean": 29.8913043478,
"line_max": 76,
"alpha_frac": 0.6249120338,
"autogenerated": false,
"ratio": 3.625,
"config_test": false,
"has_... |
from django.views.generic import TemplateView
from braces.views import LoginRequiredMixin
from rest_framework.views import APIView
from rest_framework import status
from rest_framework.response import Response
from geokey.projects.models import Project
from .models import CartoDbProject
from .serializer import CartoD... | {
"repo_name": "ExCiteS/geokey-cartodb",
"path": "geokey_cartodb/views.py",
"copies": "1",
"size": "2018",
"license": "mit",
"hash": -4655663974324568000,
"line_mean": 33.2033898305,
"line_max": 71,
"alpha_frac": 0.6417244797,
"autogenerated": false,
"ratio": 4.152263374485597,
"config_test": fa... |
from django.views.generic import TemplateView
from enhanced_cbv.views import (FormSetsView, ModelFormSetsView,
InlineFormSetsView, ListFilteredView, )
from enhanced_cbv.views.base import CSVTemplateResponseMixin
from enhanced_cbv.tests.forms import (
ArticleEnhancedFormSet, AuthorEn... | {
"repo_name": "rasca/django-enhanced-cbv",
"path": "enhanced_cbv/tests/views.py",
"copies": "2",
"size": "2094",
"license": "bsd-3-clause",
"hash": -8573920708851081000,
"line_mean": 31.2153846154,
"line_max": 76,
"alpha_frac": 0.6934097421,
"autogenerated": false,
"ratio": 3.950943396226415,
"... |
from django.views.generic import TemplateView
from gn_django import utils
from .models import ExampleModel
from gn_django.url import utils as url_utils
from gn_django.video import youtube
class Home(TemplateView):
template_name = "home.j2"
def get_context_data(self):
return {'msg': utils.super_helpe... | {
"repo_name": "gamernetwork/gn-django",
"path": "examples/simple/main/views.py",
"copies": "1",
"size": "1416",
"license": "mit",
"hash": -643564251913661000,
"line_mean": 25.7169811321,
"line_max": 62,
"alpha_frac": 0.6052259887,
"autogenerated": false,
"ratio": 3.6030534351145036,
"config_tes... |
from django.views.generic import TemplateView
from graphos.sources.simple import SimpleDataSource
from graphos.renderers.gchart import *
from mixpanel_django_graphos.utils import *
class ReportActivityView(TemplateView):
"""
Retrieve data from Mixpanel, and use graphos to display the data.
"""
templ... | {
"repo_name": "jibusayone/mixpanel_django_graphos",
"path": "mixpanel_django_graphos/views.py",
"copies": "1",
"size": "2116",
"license": "mit",
"hash": -8016095029860593000,
"line_mean": 33.1290322581,
"line_max": 83,
"alpha_frac": 0.6072778828,
"autogenerated": false,
"ratio": 3.918518518518518... |
from django.views.generic import TemplateView
from hyperadmin.clients.views.common import ClientMixin
class SingleObjectMixin(object):
context_object_name = None
def get_resource_item(self):
return self.get_state().item
def get_object(self):
return self.get_resource_item().instan... | {
"repo_name": "webcube/django-hyperadmin",
"path": "hyperadmin/clients/views/detail.py",
"copies": "2",
"size": "1122",
"license": "bsd-3-clause",
"hash": -3166070441113095000,
"line_mean": 30.1666666667,
"line_max": 75,
"alpha_frac": 0.6434937611,
"autogenerated": false,
"ratio": 4.08,
"config... |
from django.views.generic import TemplateView
from hyperadmin.clients.views.common import ClientMixin
class MultipleObjectMixin(object):
context_object_name = None
def get_resource_items(self):
return self.get_state().get_resource_items()
def get_object_list(self):
return [ri.in... | {
"repo_name": "webcube/django-hyperadmin",
"path": "hyperadmin/clients/views/list.py",
"copies": "2",
"size": "1768",
"license": "bsd-3-clause",
"hash": -8590054532412193000,
"line_mean": 35.8333333333,
"line_max": 90,
"alpha_frac": 0.6283936652,
"autogenerated": false,
"ratio": 4.121212121212121... |
from django.views.generic import TemplateView
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
from apps.userProfile.serializers import UserAuthenticationSerializer
class IndexView(TemplateView):
template_name = 'dashboard.html'
def get_context_data(sel... | {
"repo_name": "mjroson/tvlibre",
"path": "tvlibre/views.py",
"copies": "1",
"size": "1241",
"license": "mit",
"hash": -4967850802173687000,
"line_mean": 29.2926829268,
"line_max": 96,
"alpha_frac": 0.6390008058,
"autogenerated": false,
"ratio": 4.32404181184669,
"config_test": false,
"has_no_... |
from django.views.generic import TemplateView
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import permissions
from competition.models import Competition
from datetime import datetime
from time import mktime
import feedparser
class FeedException(Exceptio... | {
"repo_name": "siggame/webserver",
"path": "webserver/home/views.py",
"copies": "1",
"size": "2392",
"license": "bsd-3-clause",
"hash": -4639515531745121000,
"line_mean": 28.1707317073,
"line_max": 105,
"alpha_frac": 0.6425585284,
"autogenerated": false,
"ratio": 3.966832504145937,
"config_test... |
from django.views.generic import TemplateView
from sentry_sdk import capture_exception
from bedrock.wordpress.models import BlogPost
from lib.l10n_utils import LangFilesMixin
class BlogPostsMixin:
blog_tags = None
blog_slugs = None
blog_posts_limit = 4
blog_posts_template_variable = 'blog_posts'
... | {
"repo_name": "craigcook/bedrock",
"path": "bedrock/wordpress/views.py",
"copies": "4",
"size": "1372",
"license": "mpl-2.0",
"hash": -3457310156517231600,
"line_mean": 28.8260869565,
"line_max": 68,
"alpha_frac": 0.6166180758,
"autogenerated": false,
"ratio": 3.6392572944297084,
"config_test":... |
from django.views.generic import TemplateView
class GetFormView(TemplateView):
form_class = None
@property
def is_form_submitted(self):
return bool(self.request.GET)
def get_form_kwargs(self):
kwargs = {}
if self.is_form_submitted:
kwargs.update(data=self.request.... | {
"repo_name": "fusionbox/buggy",
"path": "buggy/utils.py",
"copies": "1",
"size": "1100",
"license": "bsd-3-clause",
"hash": 750227078457558700,
"line_mean": 27.9473684211,
"line_max": 72,
"alpha_frac": 0.5927272727,
"autogenerated": false,
"ratio": 3.8194444444444446,
"config_test": false,
"... |
from django.views.generic import TemplateView
class VersionView(TemplateView):
template_name = 'subproject.html'
def get_context_data(self, **kwargs):
from datetime import datetime
from project.models import SubProject, Version
ctx = super(VersionView, self).get_context_data(**kwargs)... | {
"repo_name": "MahdiZareie/VersionMonitoring",
"path": "project/views.py",
"copies": "1",
"size": "1500",
"license": "apache-2.0",
"hash": -2603615687917518000,
"line_mean": 37.4615384615,
"line_max": 121,
"alpha_frac": 0.6273333333,
"autogenerated": false,
"ratio": 4.032258064516129,
"config_t... |
from django.views.generic import TemplateView, RedirectView
from django.conf.urls import include, url, patterns
from django.contrib import admin
urlpatterns = patterns('',
url(r'^$', 'azure_deploy.views.index', name='home'),
# authentication url
url(r'^login/complete/$', 'azure_ad_auth.views.complete', na... | {
"repo_name": "csabatini/deploy-azurerm-django",
"path": "deployazurermdjango/urls.py",
"copies": "1",
"size": "1238",
"license": "bsd-3-clause",
"hash": -3364873830589447700,
"line_mean": 41.6896551724,
"line_max": 84,
"alpha_frac": 0.6631663974,
"autogenerated": false,
"ratio": 3.67359050445103... |
from django.views.generic import TemplateView, RedirectView
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.http import Http404
from django.shortcuts import render
admin.autodiscover()
def justatemplate(path):
def view(request):
context = {
"sh... | {
"repo_name": "sunlightlabs/sitegeist",
"path": "sitegeist/urls.py",
"copies": "1",
"size": "1750",
"license": "bsd-3-clause",
"hash": -6034239754441854000,
"line_mean": 31.4074074074,
"line_max": 139,
"alpha_frac": 0.6462857143,
"autogenerated": false,
"ratio": 3.2169117647058822,
"config_test... |
from django.views.generic import TemplateView, RedirectView
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from oscar.core.loading import get_class
import logging
get_product_search_handler_class = get_class(
'catalogue.search_handlers', 'get_product_search_ha... | {
"repo_name": "jinnykoo/wuyisj.com",
"path": "sites/sandbox/apps/promotions/views.py",
"copies": "1",
"size": "1612",
"license": "bsd-3-clause",
"hash": 666883256620297700,
"line_mean": 35.6590909091,
"line_max": 76,
"alpha_frac": 0.6501240695,
"autogenerated": false,
"ratio": 3.903147699757869,
... |
from django.views.generic import TemplateView, View, DetailView
from django.views.decorators.csrf import ensure_csrf_cookie
from django.http import HttpResponse, HttpResponseBadRequest
from django.core.urlresolvers import reverse
from django.utils.decorators import method_decorator
from .models import Post, AVAILABLE_F... | {
"repo_name": "amdorra/text2html",
"path": "text2html/editor/views.py",
"copies": "1",
"size": "2142",
"license": "mit",
"hash": -6616656389907334000,
"line_mean": 27.1842105263,
"line_max": 75,
"alpha_frac": 0.6479925303,
"autogenerated": false,
"ratio": 4.041509433962264,
"config_test": false... |
from django.views.generic import TemplateView, View, FormView
from django.contrib import messages
from osf.management.commands.archive_registrations_on_IA import (
archive_registrations_on_IA,
)
from osf.management.commands.populate_internet_archives_collections import (
populate_internet_archives_collections,
... | {
"repo_name": "Johnetordoff/osf.io",
"path": "admin/internet_archive/views.py",
"copies": "2",
"size": "3771",
"license": "apache-2.0",
"hash": -88387465719181310,
"line_mean": 35.6116504854,
"line_max": 106,
"alpha_frac": 0.6926544683,
"autogenerated": false,
"ratio": 3.836215666327569,
"confi... |
from django.views.generic import TemplateView, View
from django.contrib import messages
from django.http import HttpResponse
from django.contrib.auth.mixins import PermissionRequiredMixin
from osf.management.commands.manage_switch_flags import manage_waffle
from osf.management.commands.update_registration_schemas impo... | {
"repo_name": "cslzchen/osf.io",
"path": "admin/management/views.py",
"copies": "1",
"size": "4047",
"license": "apache-2.0",
"hash": -1908588905594296600,
"line_mean": 44.9886363636,
"line_max": 116,
"alpha_frac": 0.6928589078,
"autogenerated": false,
"ratio": 4.394136807817589,
"config_test":... |
from django.views.generic import TemplateView, View
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from celery.result import AsyncResult
class StartExportView(TemplateView):
"""
Triggers the task for creating an excel export and provides
a waiting page that poll... | {
"repo_name": "AASHE/django-celery-downloader",
"path": "django_celery_downloader/views.py",
"copies": "1",
"size": "1759",
"license": "mit",
"hash": 9191187233514941000,
"line_mean": 31.5740740741,
"line_max": 73,
"alpha_frac": 0.616827743,
"autogenerated": false,
"ratio": 4.300733496332518,
"... |
from django.views.generic import TemplateView, View
from django.http.response import HttpResponseServerError, HttpResponse
from stadtgedaechtnis_backend.import_entries.importers import *
__author__ = 'jpi'
class SimpleJSONImport(TemplateView):
"""
Imports entries from the standard JSON file supplied by Dig... | {
"repo_name": "codeforeurope/stadtgedaechtnis_backend",
"path": "import_entries/views.py",
"copies": "1",
"size": "1763",
"license": "mit",
"hash": -3288208276712229400,
"line_mean": 31.0545454545,
"line_max": 90,
"alpha_frac": 0.6557005105,
"autogenerated": false,
"ratio": 4.342364532019705,
"... |
from django.views.generic import TemplateView, View
from django.shortcuts import redirect
from django.db import transaction
from devilry.devilry_sandbox.sandbox import Sandbox
class CreateSubjectIntroView(TemplateView):
template_name = 'devilry_sandbox/createsubject.django.html'
class CreateSubjectCreateView(V... | {
"repo_name": "devilry/devilry-django",
"path": "devilry/devilry_sandbox/views.py",
"copies": "1",
"size": "1176",
"license": "bsd-3-clause",
"hash": -7112294141503780000,
"line_mean": 36.935483871,
"line_max": 82,
"alpha_frac": 0.7049319728,
"autogenerated": false,
"ratio": 4.083333333333333,
... |
from django.views.generic import TemplateView, View
from django.shortcuts import render
from tempfile import TemporaryFile, NamedTemporaryFile
from devilry.apps.gradeeditors.restful import examiner as gradeeditors_restful
from devilry.utils.module import dump_all_into_dict
from django.http import HttpResponse
from djan... | {
"repo_name": "vegarang/devilry-django",
"path": "devilry/apps/examiner/views.py",
"copies": "1",
"size": "4236",
"license": "bsd-3-clause",
"hash": -1628725453855403800,
"line_mean": 45.5494505495,
"line_max": 145,
"alpha_frac": 0.6239376771,
"autogenerated": false,
"ratio": 4.4125,
"config_te... |
from django.views.generic import TemplateView, View
from django.utils import timezone
from django.http import JsonResponse
from django.core.exceptions import PermissionDenied
from django.core import urlresolvers
from base import ManagementUtility, ManagementExecutor
from models import Log
def has_permission(request):... | {
"repo_name": "willandskill/django-executor",
"path": "django_executor/views.py",
"copies": "1",
"size": "1829",
"license": "mit",
"hash": -7877719052282128000,
"line_mean": 33.5094339623,
"line_max": 102,
"alpha_frac": 0.6664844177,
"autogenerated": false,
"ratio": 4.194954128440367,
"config_t... |
from django.views.generic import TemplateView, View
from product.models import Product
from customer.models import Customer
from shop.models import Order, OrderStatus
from django.contrib import messages
from django import http
from django.core.urlresolvers import reverse
class Homepage(TemplateView):
template_nam... | {
"repo_name": "MahdiZareie/PyShop",
"path": "shop/views.py",
"copies": "1",
"size": "4886",
"license": "mit",
"hash": -2003666418537571300,
"line_mean": 36.6910569106,
"line_max": 114,
"alpha_frac": 0.6425798102,
"autogenerated": false,
"ratio": 3.4468401486988847,
"config_test": false,
"has_... |
from django.views.generic import TemplateView, View
from dash.access import (df, hostname, ip, issue, mem, numberofcores, w, ps,
whereis, users, boot, loadavg, bandwidth, dnsmasq_leases,
ping, date)
from dash.utils import json_response
class IndexView(TemplateView):
templat... | {
"repo_name": "dongweiming/django-linux-dash",
"path": "dash/views.py",
"copies": "1",
"size": "1117",
"license": "mit",
"hash": 1253758165779745800,
"line_mean": 31.8529411765,
"line_max": 77,
"alpha_frac": 0.6947179946,
"autogenerated": false,
"ratio": 3.2852941176470587,
"config_test": false... |
from django.views.generic import UpdateView, CreateView
from extra_views import UpdateWithInlinesView, CreateWithInlinesView
# ################
# ## Mixins ##
# ################
class UpdateWithModifiedByMixin(UpdateView):
def post(self, request, *args, **kwargs):
res = super(UpdateWithModifiedByMix... | {
"repo_name": "tfroehlich82/koalixcrm",
"path": "crm_core/custom/mixins.py",
"copies": "1",
"size": "1339",
"license": "bsd-3-clause",
"hash": 9086317230699065000,
"line_mean": 30.880952381,
"line_max": 93,
"alpha_frac": 0.6811053025,
"autogenerated": false,
"ratio": 3.803977272727273,
"config_... |
from django.views.generic import UpdateView, DeleteView
from securedpi_locks.models import Lock
from securedpi_events.models import Event
import requests
from django.http import HttpResponseRedirect
from django.urls import reverse, reverse_lazy
from securedpi.settings import FLASK_SERVER
class EditLockView(UpdateView... | {
"repo_name": "Secured-Pi/Secured-Pi",
"path": "securedpi_locks/views.py",
"copies": "1",
"size": "1466",
"license": "mit",
"hash": -4668483823768746000,
"line_mean": 25.1785714286,
"line_max": 57,
"alpha_frac": 0.6452933151,
"autogenerated": false,
"ratio": 3.9197860962566846,
"config_test": f... |
from django.views.generic import UpdateView, DetailView, ListView, CreateView
from django.shortcuts import render, get_object_or_404, redirect
from django.http import HttpResponseRedirect, Http404, HttpResponse
from django.template import RequestContext
from account.mixins import LoginRequiredMixin
from .models impo... | {
"repo_name": "postpdm/ich_bau",
"path": "crm/views.py",
"copies": "1",
"size": "2736",
"license": "apache-2.0",
"hash": 5462421698332469000,
"line_mean": 32.7901234568,
"line_max": 80,
"alpha_frac": 0.6838450292,
"autogenerated": false,
"ratio": 3.763411279229711,
"config_test": false,
"has_... |
from django.views.generic import UpdateView
from django.shortcuts import render
from django.urls import reverse_lazy
from .models import UserProfile
def profile_view(request):
"""Return rendered profile page."""
return render(request, 'profile.html', context={
'username': request.user.username,
... | {
"repo_name": "welliam/imagersite",
"path": "user_profile/views.py",
"copies": "1",
"size": "1188",
"license": "mit",
"hash": -4216247953639077000,
"line_mean": 30.2631578947,
"line_max": 64,
"alpha_frac": 0.6430976431,
"autogenerated": false,
"ratio": 3.8697068403908794,
"config_test": false,
... |
from django.views.generic import UpdateView
from mps.mixins import (
ListHandlerView,
DetailHandlerView,
TemplateHandlerView,
FormHandlerMixin,
PermissionDenied,
user_is_active
)
from .models import Disease, DiseaseComponent, MPSCoReMember
from .forms import MPSCoReMemberForm
from assays.models ... | {
"repo_name": "UPDDI/mps-database-server",
"path": "diseases/views.py",
"copies": "1",
"size": "14545",
"license": "mit",
"hash": 8977119163308799000,
"line_mean": 30.3469827586,
"line_max": 132,
"alpha_frac": 0.6091440358,
"autogenerated": false,
"ratio": 3.86218799787573,
"config_test": false... |
from django.views.generic import UpdateView
from profile_cfn.models import ProfileCfn
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from profile_cfn.forms import EditProfileForm
from django.urls import reverse_lazy
from django.core.paginator import Paginator, EmptyPage, PageNo... | {
"repo_name": "CodeFN/thecodefellowsnetwork",
"path": "cfn/profile_cfn/views.py",
"copies": "1",
"size": "4061",
"license": "apache-2.0",
"hash": 3054164317248811500,
"line_mean": 38.8137254902,
"line_max": 93,
"alpha_frac": 0.6500861857,
"autogenerated": false,
"ratio": 3.8239171374764593,
"co... |
from django.views.generic import UpdateView
from .edit import BackendFormViewMixin
from .mixins import SaveInlineDoneMixin
class BackendUpdateView(SaveInlineDoneMixin, BackendFormViewMixin, UpdateView):
action_name = 'update'
template_type = 'update'
def get_required_object_permissions(self):
re... | {
"repo_name": "team23/django_backend",
"path": "django_backend/backend/base/views/update.py",
"copies": "1",
"size": "1478",
"license": "bsd-3-clause",
"hash": 4453226398355208000,
"line_mean": 34.1904761905,
"line_max": 92,
"alpha_frac": 0.6657645467,
"autogenerated": false,
"ratio": 3.799485861... |
from django.views.generic import UpdateView, TemplateView, DetailView, CreateView, DeleteView
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_m... | {
"repo_name": "mcallistersean/b2-issue-tracker",
"path": "toucan/user_profile/views.py",
"copies": "2",
"size": "4468",
"license": "mit",
"hash": -5757026387405423000,
"line_mean": 31.6131386861,
"line_max": 99,
"alpha_frac": 0.6783795882,
"autogenerated": false,
"ratio": 4.227057710501419,
"co... |
from django.views.generic import View, DetailView, ListView, TemplateView
from django.shortcuts import get_object_or_404
from cjdata.models import Dataset, Category, STATE_NATL_LOOKUP
from search.query import sqs
from common.views import CSVExportMixin
from django.db.models import Q
import itertools
from collections im... | {
"repo_name": "sunlightlabs/hall-of-justice",
"path": "cjdata/views.py",
"copies": "1",
"size": "3995",
"license": "bsd-3-clause",
"hash": 6477045195757253000,
"line_mean": 34.3539823009,
"line_max": 157,
"alpha_frac": 0.648310388,
"autogenerated": false,
"ratio": 3.8524590163934427,
"config_te... |
from django.views.generic import View, DetailView
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.shortcuts import get_object_or_404
from django.template.response import TemplateResponse
from mezzanine.utils.views import render
from video.models import Video, Category, Tag
class... | {
"repo_name": "OlegPshenichniy/upfavor-mezzanine",
"path": "video/views.py",
"copies": "1",
"size": "5348",
"license": "mit",
"hash": -2564153850138274300,
"line_mean": 28.3846153846,
"line_max": 95,
"alpha_frac": 0.5942408377,
"autogenerated": false,
"ratio": 3.6756013745704466,
"config_test":... |
from django.views.generic import View, FormView
from django.http import JsonResponse
from django.shortcuts import render
from .forms import SubscribeForm, UnsubscribeForm, ConfirmEmailForm
from . import user_service
class IndexView(View):
form_class = SubscribeForm
template = 'user_manager/index.html'
d... | {
"repo_name": "avinassh/nightreads",
"path": "nightreads/user_manager/views.py",
"copies": "1",
"size": "2434",
"license": "mit",
"hash": 4280947956624520000,
"line_mean": 34.2753623188,
"line_max": 77,
"alpha_frac": 0.6347576007,
"autogenerated": false,
"ratio": 4.125423728813559,
"config_test... |
from django.views.generic import View, FormView
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from markdown import markdown
from .models import Mail, Subscription
from .forms import MailModelForm
from .tasks import send_newslet... | {
"repo_name": "davidjrichardson/uwcs-zarya",
"path": "newsletter/views.py",
"copies": "1",
"size": "2619",
"license": "mit",
"hash": -3368769707650900500,
"line_mean": 37.5147058824,
"line_max": 104,
"alpha_frac": 0.7216494845,
"autogenerated": false,
"ratio": 3.7956521739130435,
"config_test":... |
from django.views.generic import View, FormView, UpdateView, CreateView, DetailView, ListView, TemplateView
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.decorators import login_required
from core.forms import UserForm, Us... | {
"repo_name": "jovencoda/troca",
"path": "core/views.py",
"copies": "1",
"size": "25224",
"license": "cc0-1.0",
"hash": -1429474085082852000,
"line_mean": 40.2156862745,
"line_max": 203,
"alpha_frac": 0.5802013955,
"autogenerated": false,
"ratio": 4.035194368900976,
"config_test": false,
"has... |
from django.views.generic import View,ListView, DetailView, CreateView, \
DeleteView, UpdateView, \
ArchiveIndexView, DateDetailView, \
DayArchiveView, MonthArchiveView, \
TodayArchiveView, WeekArchiveView, \
YearArchiveView
from django.contrib import messages
from baseapp.forms import Pool_database... | {
"repo_name": "tnemis/staging-server",
"path": "schemes/views1.py",
"copies": "2",
"size": "12639",
"license": "mit",
"hash": -3782701824529855500,
"line_mean": 59.1857142857,
"line_max": 341,
"alpha_frac": 0.6445130153,
"autogenerated": false,
"ratio": 3.5040199611865814,
"config_test": false,... |
from django.views.generic import View,ListView, DetailView, CreateView, \
DeleteView, UpdateView, \
ArchiveIndexView, DateDetailView, \
DayArchiveView, MonthArchiveView, \
TodayArchiveView... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "teacher/views/teacher_personal_detail_views.py",
"copies": "1",
"size": "9148",
"license": "mit",
"hash": 4265527707390599700,
"line_mean": 42.1556603774,
"line_max": 341,
"alpha_frac": 0.7039790118,
"autogenerated": false,
"ratio": 3.767710049423394... |
from django.views.generic import View, ListView, DetailView
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import redirect
from .forms import CodeRunForm
from .services import run_code
from .models import CodeRun
class ReplIndexView(LoginRequiredMixin, ListView):
template_name =... | {
"repo_name": "RadoRado/EuroPython2017",
"path": "run_python_run/repl/views.py",
"copies": "1",
"size": "1041",
"license": "mit",
"hash": 7573340854732274000,
"line_mean": 25.6923076923,
"line_max": 76,
"alpha_frac": 0.6983669549,
"autogenerated": false,
"ratio": 3.6526315789473682,
"config_tes... |
from django.views.generic import View, ListView, TemplateView
from django.http import HttpResponse, JsonResponse, Http404
from django.views.decorators.csrf import csrf_exempt
from resources.server.models import Server, ServerStatus
from resources.product.models import Product
from django.contrib.auth.mixins import... | {
"repo_name": "mingziV5/opsweb_test",
"path": "resources/server/view.py",
"copies": "1",
"size": "7381",
"license": "apache-2.0",
"hash": 4837973226628130000,
"line_mean": 39.8218390805,
"line_max": 112,
"alpha_frac": 0.6024742268,
"autogenerated": false,
"ratio": 3.9133942980096825,
"config_te... |
from django.views.generic import View
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from recommendation import facebook, models
from recommendation.bot import states
import json
class WebhookView(View):
http_method_names = [u'get', u'pos... | {
"repo_name": "msfernandes/facebook-chatbot",
"path": "application/recommendation/views.py",
"copies": "1",
"size": "2192",
"license": "mit",
"hash": -4474901072036390000,
"line_mean": 40.2641509434,
"line_max": 75,
"alpha_frac": 0.5098308185,
"autogenerated": false,
"ratio": 4.537344398340249,
... |
from django.views.generic import View
from django.conf.urls import patterns, url, include
from rest_framework.routers import DefaultRouter
from xosapi_helpers import XOSIndexViewSet
import os, sys
import inspect
import importlib
try:
from rest_framework.serializers import DictField
except:
raise Exception("Fai... | {
"repo_name": "xmaruto/mcord",
"path": "xos/api/import_methods.py",
"copies": "2",
"size": "3319",
"license": "apache-2.0",
"hash": 3262173325667191000,
"line_mean": 36.7159090909,
"line_max": 160,
"alpha_frac": 0.5815004519,
"autogenerated": false,
"ratio": 3.7083798882681562,
"config_test": f... |
from django.views.generic import View
from django.conf.urls import patterns, url
from rest_framework.routers import DefaultRouter
import os, sys
import inspect
import importlib
# XXX based on core/dashboard/views/__init__.py
# Find all modules in the current directory that have descendents of the View
# object, and a... | {
"repo_name": "cboling/xos",
"path": "xos/core/xoslib/methods/__init__.py",
"copies": "4",
"size": "2631",
"license": "apache-2.0",
"hash": -1854410049501454800,
"line_mean": 43.593220339,
"line_max": 233,
"alpha_frac": 0.5895096921,
"autogenerated": false,
"ratio": 3.416883116883117,
"config_t... |
from django.views.generic import View
from django.conf.urls import patterns, url
import os, sys
import inspect
import importlib
# XXX based on core/dashboard/views/__init__.py
# Find all modules in the current directory that have descendents of the View
# object, and add them as globals to this module. Also, build up... | {
"repo_name": "wathsalav/xos",
"path": "xos/core/xoslib/methods/__init__.py",
"copies": "1",
"size": "1834",
"license": "apache-2.0",
"hash": -8214722535849149000,
"line_mean": 39.7555555556,
"line_max": 135,
"alpha_frac": 0.5992366412,
"autogenerated": false,
"ratio": 3.5066921606118546,
"conf... |
from django.views.generic import View
from django.contrib.auth import authenticate, login
from django.shortcuts import render_to_response
from django.utils.decorators import classonlymethod
from functools import update_wrapper
from ipviking_django.forms import LoginForm, EmailForm
from ipviking_django.authorizer import... | {
"repo_name": "norsecorp/ipviking-django",
"path": "ipviking_django/ipviking_django/views.py",
"copies": "1",
"size": "3981",
"license": "bsd-2-clause",
"hash": -8077016741643302000,
"line_mean": 36.9142857143,
"line_max": 103,
"alpha_frac": 0.566691786,
"autogenerated": false,
"ratio": 4.6344586... |
from django.views.generic import View
from django.contrib.auth.mixins import LoginRequiredMixin
from conversation.models import Treedj, Tweetdj
from django.shortcuts import render
from rest_framework.views import APIView
from charts.utils import get_userid_lst
from bot.lib.datetime import get_datetime_tz_from_twitter_s... | {
"repo_name": "jeromecc/doctoctocbot",
"path": "src/charts/views/reply_delay.py",
"copies": "1",
"size": "2536",
"license": "mpl-2.0",
"hash": 5285535317232320000,
"line_mean": 32.3815789474,
"line_max": 70,
"alpha_frac": 0.606466877,
"autogenerated": false,
"ratio": 3.7964071856287425,
"config... |
from django.views.generic import View
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import HttpResponseRedirect, HttpResponseBadRequest
from django.core.urlresolvers import reverse
from oauth2client.client import OAuth2WebServerFlow
from config.keys import keys
from .models import GmailAcc... | {
"repo_name": "daisychainme/daisychain",
"path": "daisychain/channel_gmail/views.py",
"copies": "1",
"size": "2894",
"license": "mit",
"hash": -2542067321798493000,
"line_mean": 31.8977272727,
"line_max": 119,
"alpha_frac": 0.6085003455,
"autogenerated": false,
"ratio": 4.550314465408805,
"conf... |
from django.views.generic import View
from django.contrib.auth.mixins import LoginRequiredMixin
from moderation.models import SocialUser, SocialMedia
from django.shortcuts import render
from rest_framework.views import APIView
from charts.utils import get_userid_lst
from bot.lib.datetime import get_datetime_tz_from_twi... | {
"repo_name": "jeromecc/doctoctocbot",
"path": "src/charts/views/creation_follower.py",
"copies": "1",
"size": "1804",
"license": "mpl-2.0",
"hash": -88358908427978990,
"line_mean": 35.1,
"line_max": 80,
"alpha_frac": 0.6097560976,
"autogenerated": false,
"ratio": 4.072234762979684,
"config_tes... |
from django.views.generic import View
from django.contrib import messages
from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from students.models import Child_detail, School_child_count
from baseapp.models import District, Block, School, Habitat... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "students/views/district_views.py",
"copies": "1",
"size": "5923",
"license": "mit",
"hash": 3932701390220615700,
"line_mean": 70.3734939759,
"line_max": 330,
"alpha_frac": 0.7399966233,
"autogenerated": false,
"ratio": 3.0203977562468127,
"config_t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.