text stringlengths 0 1.05M | meta dict |
|---|---|
from django.views.generic.list import ListView
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.template import RequestContext
from cms.forms import UserForm, TimeForm, SwarableForm
from cms.models import User, Time, Swarable
import datetime
... | {
"repo_name": "sunaokumura/time_manager",
"path": "time_manager/cms/views.py",
"copies": "1",
"size": "6123",
"license": "apache-2.0",
"hash": 8705683431238908000,
"line_mean": 33.3505747126,
"line_max": 82,
"alpha_frac": 0.5549606826,
"autogenerated": false,
"ratio": 3.5179517363154797,
"confi... |
from django.views.generic.list import ListView
from django.shortcuts import get_object_or_404
from django.db.models import Q
from article.models import Articles
from category.models import Categories
from .CategoryMixin import CategoryMixin
from generic.pagination import PaginationPages
from django_blog.blog_setting i... | {
"repo_name": "rudikovrf/django_blog",
"path": "category/views.py",
"copies": "1",
"size": "1231",
"license": "mit",
"hash": -5046188260370377000,
"line_mean": 35.2058823529,
"line_max": 83,
"alpha_frac": 0.7181153534,
"autogenerated": false,
"ratio": 4.158783783783784,
"config_test": false,
... |
from django.views.generic.list import ListView
from django.shortcuts import get_object_or_404
from competitions.models import Competition
from .models import Leaflet
class LeafletViewContextItem(object):
def __init__(self, competition=None, leaflets=None):
self.competition = competition
self.lea... | {
"repo_name": "matus-stehlik/glowing-batman",
"path": "leaflets/views.py",
"copies": "1",
"size": "2603",
"license": "mit",
"hash": 7192559067405826000,
"line_mean": 31.1358024691,
"line_max": 73,
"alpha_frac": 0.5966192854,
"autogenerated": false,
"ratio": 4.138314785373609,
"config_test": fal... |
from django.views.generic.list import ListView
from django.views.generic.base import RedirectView
from django.shortcuts import get_object_or_404
from competitions.models import Competition
from roots import settings
from .models import Leaflet
class LeafletViewContextItem(object):
def __init__(self, competition... | {
"repo_name": "matus-stehlik/roots",
"path": "leaflets/views.py",
"copies": "3",
"size": "3268",
"license": "mit",
"hash": 1863556526326652200,
"line_mean": 30.1238095238,
"line_max": 73,
"alpha_frac": 0.5966952264,
"autogenerated": false,
"ratio": 4.121059268600252,
"config_test": false,
"ha... |
from django.views.generic.list import ListView
from django.views.generic.base import TemplateView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from django.http import Http404, HttpResponseRedirect
from ... | {
"repo_name": "bilbeyt/ituro",
"path": "ituro/lcd/views.py",
"copies": "1",
"size": "6179",
"license": "mit",
"hash": -3955361022120956400,
"line_mean": 37.1419753086,
"line_max": 83,
"alpha_frac": 0.6632141123,
"autogenerated": false,
"ratio": 3.938177182919057,
"config_test": false,
"has_no... |
from django.views.generic.list import ListView
from django.views.generic.base import TemplateView
from django.views.generic.detail import DetailView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied
from dja... | {
"repo_name": "ITURO/ituro",
"path": "ituro/results/views.py",
"copies": "1",
"size": "9609",
"license": "mit",
"hash": -7218023356802370000,
"line_mean": 37.436,
"line_max": 98,
"alpha_frac": 0.6857113123,
"autogenerated": false,
"ratio": 3.7995255041518385,
"config_test": false,
"has_no_key... |
from django.views.generic.list import ListView
from django.views.generic.base import TemplateView
from django.views.generic.edit import CreateView, UpdateView, DeleteView, \
FormView
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.core.excep... | {
"repo_name": "bilbeyt/ituro",
"path": "ituro/referee/views.py",
"copies": "1",
"size": "42310",
"license": "mit",
"hash": -2422683723234969000,
"line_mean": 34.2583333333,
"line_max": 131,
"alpha_frac": 0.6592531316,
"autogenerated": false,
"ratio": 3.884502387073081,
"config_test": false,
"... |
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.db.models import Q
from django.http import HttpResponse
from django.core.exceptions import PermissionDenied
import csv
import re
from signbank.dictionary.models import *
from signbank.dictionary.forms import *... | {
"repo_name": "Signbank/Auslan-signbank",
"path": "signbank/dictionary/adminviews.py",
"copies": "1",
"size": "10564",
"license": "bsd-3-clause",
"hash": 5178429305244503000,
"line_mean": 33.6360655738,
"line_max": 138,
"alpha_frac": 0.5324687618,
"autogenerated": false,
"ratio": 3.96546546546546... |
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.shortcuts import get_object_or_404
from django.db.models import Max
from django.http import Http404
from ..models import Game, GameScore
from .mixins import CompetitionViewMixin, RequireRunningMixin
class Ga... | {
"repo_name": "michaelwisely/django-competition",
"path": "src/competition/views/game_views.py",
"copies": "1",
"size": "2049",
"license": "bsd-3-clause",
"hash": 3632758854958558700,
"line_mean": 31.5238095238,
"line_max": 74,
"alpha_frac": 0.6486090776,
"autogenerated": false,
"ratio": 3.829906... |
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.db.models import Q, F, ExpressionWrapper, IntegerField, Count
from django.db.models import CharField, TextField, Value as V
from django.d... | {
"repo_name": "Woseseltops/signbank",
"path": "signbank/dictionary/adminviews.py",
"copies": "1",
"size": "202561",
"license": "bsd-3-clause",
"hash": -3931020493721668000,
"line_mean": 47.1371197719,
"line_max": 259,
"alpha_frac": 0.6148370121,
"autogenerated": false,
"ratio": 4.082985628187298,... |
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.http import HttpResponseRedirect, Http404
from django.core.urlresolvers import reverse, reverse_lazy
from hammer.mixins import AJAXRespon... | {
"repo_name": "hodgesds/django-hammer",
"path": "hammerdemo/views.py",
"copies": "1",
"size": "17519",
"license": "mit",
"hash": -603410926684888700,
"line_mean": 35.8046218487,
"line_max": 85,
"alpha_frac": 0.6690450368,
"autogenerated": false,
"ratio": 3.6422037422037423,
"config_test": false... |
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
from .models import Customer, Session, CompanyProfile
from therapyinvoicing.customers.forms import Cust... | {
"repo_name": "ylitormatech/terapialaskutus",
"path": "therapyinvoicing/customers/views.py",
"copies": "1",
"size": "10031",
"license": "bsd-3-clause",
"hash": 8831006354837993000,
"line_mean": 36.249070632,
"line_max": 153,
"alpha_frac": 0.678742515,
"autogenerated": false,
"ratio": 3.7983320697... |
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from .models import PressRelease, PressMention
NUM_RECENT_RELEASES = 5
NUM_RECENT_MENTIONS = 5
class PressReleaseListView(ListView):
model = PressRelease
paginate_by = 15
def get_queryset(self):
re... | {
"repo_name": "okfn/website",
"path": "foundation/press/views.py",
"copies": "1",
"size": "2221",
"license": "mit",
"hash": -7025743306816079000,
"line_mean": 25.7590361446,
"line_max": 63,
"alpha_frac": 0.6758217019,
"autogenerated": false,
"ratio": 3.9171075837742504,
"config_test": false,
... |
from django.views.generic.list import ListView
from django.views.generic import DetailView
from django.shortcuts import get_object_or_404
from django.db.models import Q
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import authentication, permissions
from .mod... | {
"repo_name": "dasap89/db2_blog",
"path": "blog/posts/views.py",
"copies": "1",
"size": "1291",
"license": "mit",
"hash": 6872415432324706000,
"line_mean": 27.0869565217,
"line_max": 68,
"alpha_frac": 0.6390395043,
"autogenerated": false,
"ratio": 4.124600638977636,
"config_test": false,
"has... |
from django.views.generic.list import ListView
from people.models import Category, Person
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from people.forms import CategoryForm, PersonForm
from django.views.generic.detail import DetailView
from django.shortcuts import get_object_or_404
from djan... | {
"repo_name": "OckiFals/crud-django",
"path": "people/views.py",
"copies": "1",
"size": "2197",
"license": "mit",
"hash": -4591270479612018000,
"line_mean": 22.8804347826,
"line_max": 86,
"alpha_frac": 0.7269003186,
"autogenerated": false,
"ratio": 3.9232142857142858,
"config_test": false,
"h... |
from django.views.generic.list import ListView
from rest_framework.decorators import list_route
from rest_framework.permissions import AllowAny
from mapentity import views as mapentity_views
from geotrek.feedback import models as feedback_models
from geotrek.feedback import serializers as feedback_serializers
class ... | {
"repo_name": "mabhub/Geotrek",
"path": "geotrek/feedback/views.py",
"copies": "1",
"size": "1499",
"license": "bsd-2-clause",
"hash": -6692766744800362000,
"line_mean": 32.3111111111,
"line_max": 74,
"alpha_frac": 0.7178118746,
"autogenerated": false,
"ratio": 3.9036458333333335,
"config_test"... |
from django.views.generic.list import ListView
from snapshotServer.models import Version
from django.shortcuts import render, redirect
from snapshotServer.views.LoginRequiredMixinConditional import LoginRequiredMixinConditional
class ApplicationVersionListView(LoginRequiredMixinConditional, ListView):
"""
Vie... | {
"repo_name": "bhecquet/seleniumRobot-server",
"path": "snapshotServer/views/ApplicationVersionListView.py",
"copies": "1",
"size": "1218",
"license": "apache-2.0",
"hash": 6716340841667105000,
"line_mean": 38.3225806452,
"line_max": 139,
"alpha_frac": 0.6658456486,
"autogenerated": false,
"ratio... |
from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
"""
Mixin that adds filtering behaviour for Class Based Views.
"""
filter_form_cls = None
use_filter_chaining = False
context_filterform_name = 'filterform'
... | {
"repo_name": "freevoid/django-datafilters",
"path": "datafilters/views.py",
"copies": "1",
"size": "1823",
"license": "mit",
"hash": 2275489432341574700,
"line_mean": 32.7592592593,
"line_max": 81,
"alpha_frac": 0.6149204608,
"autogenerated": false,
"ratio": 4.490147783251231,
"config_test": f... |
from django.views.generic.list import MultipleObjectMixin
__all__ = ('FilterFormMixin',)
class FilterFormMixin(MultipleObjectMixin):
'''
Mixin that adds filtering behaviour for list-based views.
Requirements for view:
* `get_queryset` is used to filter the queryset is this is used by
the s... | {
"repo_name": "zorainc/django-datafilters",
"path": "datafilters/views.py",
"copies": "1",
"size": "3154",
"license": "mit",
"hash": -339410604837447900,
"line_mean": 33.6593406593,
"line_max": 77,
"alpha_frac": 0.606214331,
"autogenerated": false,
"ratio": 4.417366946778712,
"config_test": fal... |
from django.views.generic.simple import direct_to_template
from authority.decorators import permission_required_or_403
from livecenter.models import Cluster, Livelihood
from livecenter.utils import redirect
from group.models import Group
from product.models import Product
from .forms import ClusterForm
#from google.app... | {
"repo_name": "rimbalinux/LMD3",
"path": "cluster/views.py",
"copies": "1",
"size": "3337",
"license": "bsd-3-clause",
"hash": 3811016282913607700,
"line_mean": 34.1263157895,
"line_max": 107,
"alpha_frac": 0.6643691939,
"autogenerated": false,
"ratio": 3.691371681415929,
"config_test": false,
... |
from django.views.generic.simple import direct_to_template
from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
import flickrapi
import flickrapi.shorturl
import simplejson
import bueda
import logging
def demo(request):
flickr_conn = flickrapi.FlickrAPI(settings.FLICKR_AP... | {
"repo_name": "bueda/bueda-flickr-mashup",
"path": "bueda_flickr_mashup/views.py",
"copies": "1",
"size": "3359",
"license": "mit",
"hash": 1322552490744039400,
"line_mean": 37.1704545455,
"line_max": 126,
"alpha_frac": 0.5885680262,
"autogenerated": false,
"ratio": 3.8040770101925254,
"config_... |
from django.views.generic.simple import direct_to_template
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
import reporting
__all__ = ['reports', 'reports_detail']
@login_required
def reports(request, template_name='reporting/reports.html'):
""" Render a list... | {
"repo_name": "MVReddy/TMS",
"path": "adlibre_tms/apps/reporting/views.py",
"copies": "2",
"size": "1325",
"license": "bsd-3-clause",
"hash": -4747786816855109000,
"line_mean": 35.8055555556,
"line_max": 84,
"alpha_frac": 0.6664150943,
"autogenerated": false,
"ratio": 3.943452380952381,
"config... |
from django.views.generic.simple import direct_to_template
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.template import RequestContext
from privatebeta.forms import InviteRequestForm
fro... | {
"repo_name": "fitoria/django-privatebeta",
"path": "privatebeta/views.py",
"copies": "1",
"size": "3087",
"license": "bsd-3-clause",
"hash": 2359455600879948300,
"line_mean": 32.9230769231,
"line_max": 111,
"alpha_frac": 0.69063816,
"autogenerated": false,
"ratio": 4.366336633663367,
"config_t... |
from django.views.generic.simple import direct_to_template
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from privatebeta.forms import InviteRequestForm
def invite(request, form_class=... | {
"repo_name": "pragmaticbadger/django-privatebeta",
"path": "privatebeta/views.py",
"copies": "2",
"size": "2449",
"license": "bsd-3-clause",
"hash": 7638208833800507000,
"line_mean": 32.5479452055,
"line_max": 111,
"alpha_frac": 0.6868109432,
"autogenerated": false,
"ratio": 4.493577981651376,
... |
from django.views.generic.simple import direct_to_template
from django.core.urlresolvers import reverse
from django.shortcuts import redirect, get_object_or_404
from django.contrib.auth import authenticate, login, logout, REDIRECT_FIELD_NAME
from django.contrib.auth.forms import PasswordChangeForm
from django.contrib.a... | {
"repo_name": "codasus/django-blogages",
"path": "blogages/libs/userena/views.py",
"copies": "1",
"size": "23114",
"license": "mit",
"hash": 6526851628238228000,
"line_mean": 36.829787234,
"line_max": 104,
"alpha_frac": 0.628666609,
"autogenerated": false,
"ratio": 4.543738942402202,
"config_te... |
from django.views.generic.simple import direct_to_template
from django.http import HttpResponseRedirect, HttpResponse
from django.views.generic.simple import direct_to_template
from deejaypages.forms import EditDJForm
from deejaypages.models import DJ, OAuth2Access, TOKEN_AUTHORIZE, TOKEN_ACCESS, TOKEN_REFRESH, Faceboo... | {
"repo_name": "pwhelan/djshouts",
"path": "deejaypages/views/dj.py",
"copies": "1",
"size": "2917",
"license": "bsd-3-clause",
"hash": 8130348438814519000,
"line_mean": 30.7065217391,
"line_max": 113,
"alpha_frac": 0.7418580734,
"autogenerated": false,
"ratio": 3.2738496071829406,
"config_test"... |
from django.views.generic.simple import direct_to_template
from django.shortcuts import *
from django.contrib.auth.decorators import login_required
from django.template.context import RequestContext
from django.views.decorators.http import require_http_methods
from django.views.generic.list_detail import object_li... | {
"repo_name": "przem/TimeRecord",
"path": "booking/views.py",
"copies": "1",
"size": "2977",
"license": "bsd-3-clause",
"hash": 2641275548214612500,
"line_mean": 37.1710526316,
"line_max": 172,
"alpha_frac": 0.6479677528,
"autogenerated": false,
"ratio": 3.922266139657444,
"config_test": false,... |
from django.views import debug
from django.conf import settings
def get_search_link():
default_choice = "stackoverflow"
search_urls = {
"stackoverflow": "http://stackoverflow.com/search?q=[python] or "
"[django]+{{ exception_value|force_escape }}",
"googlesearch": "ht... | {
"repo_name": "emre/django-stackoverflow-trace",
"path": "django_stackoverflow_trace/__init__.py",
"copies": "1",
"size": "1343",
"license": "mit",
"hash": -7093018108658450000,
"line_mean": 25.3333333333,
"line_max": 73,
"alpha_frac": 0.5979151154,
"autogenerated": false,
"ratio": 3.926900584795... |
from django.views import generic as generic_views
import json
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import models as auth_models
from django.conf import settings
from django.db.models import Q
from django.shortcuts import get_object_or_404
from userprofiles.contrib.emailve... | {
"repo_name": "zerok/pyconde-website-mirror",
"path": "pyconde/accounts/views.py",
"copies": "1",
"size": "3223",
"license": "bsd-3-clause",
"hash": -7891627084200276000,
"line_mean": 35.2134831461,
"line_max": 112,
"alpha_frac": 0.6580825318,
"autogenerated": false,
"ratio": 4.20757180156658,
... |
from django.views import generic as generic_views
from . import models
from . import settings
class PublishedNewsMixin(object):
"""
Since the queryset also has to filter elements by timestamp
we have to fetch it dynamically.
"""
def get_queryset(self):
return models.News.published.all()
... | {
"repo_name": "Medvezhopok/cmsplugin-news",
"path": "cmsplugin_news/views.py",
"copies": "2",
"size": "1718",
"license": "bsd-2-clause",
"hash": -871896900705599700,
"line_mean": 26.7096774194,
"line_max": 75,
"alpha_frac": 0.6821885914,
"autogenerated": false,
"ratio": 3.8348214285714284,
"con... |
from django.views import generic
from accounts.models import Menu
from django.http import HttpResponse
from django.shortcuts import render
from carton.cart import Cart
class HomePage(generic.TemplateView):
template_name = "home.html"
class AboutPage(generic.TemplateView):
template_name = "about.html"
def tr... | {
"repo_name": "prashh/my_proj",
"path": "src/my_proj/views.py",
"copies": "1",
"size": "1499",
"license": "mit",
"hash": -3223473961041071600,
"line_mean": 27.8269230769,
"line_max": 72,
"alpha_frac": 0.6671114076,
"autogenerated": false,
"ratio": 3.230603448275862,
"config_test": false,
"has... |
from django.views import generic
from adoffice.models import Category, Page
from forms import SubscribeForm
from django.shortcuts import redirect
from django.template.loader import get_template
from django.template import Context
from django.conf import settings
from django.core.mail import EmailMultiAlternatives
from ... | {
"repo_name": "kobox/achilles.pl",
"path": "src/achilles/views.py",
"copies": "1",
"size": "2315",
"license": "mit",
"hash": -3462707640422290400,
"line_mean": 37.6,
"line_max": 144,
"alpha_frac": 0.682937365,
"autogenerated": false,
"ratio": 3.8973063973063975,
"config_test": false,
"has_no_... |
from django.views import generic
from braces.views import LoginRequiredMixin
try:
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
from . import models
from . import utils
from django.shortcuts import get_object_or_404
from django.contrib.auth import get_user_mod... | {
"repo_name": "Bearle/django-private-chat",
"path": "django_private_chat/views.py",
"copies": "1",
"size": "1846",
"license": "isc",
"hash": 4837327433305853000,
"line_mean": 38.2765957447,
"line_max": 106,
"alpha_frac": 0.650595883,
"autogenerated": false,
"ratio": 3.978448275862069,
"config_t... |
from django.views import generic
from challenge_processor.models import Challenge
from challenge_framework.mixins import ChallengeMixin
from easy_rest.views import RestApiView
from django.conf import settings
from vcore_api import Api
import json
from easy_rest.mixins import JavascriptContextMixin
from django.urls impo... | {
"repo_name": "jonatanSh/challenge-framework",
"path": "challenge_framework/challenge_viewer/views.py",
"copies": "1",
"size": "3527",
"license": "apache-2.0",
"hash": -1352891276460600000,
"line_mean": 33.5784313725,
"line_max": 115,
"alpha_frac": 0.6027785654,
"autogenerated": false,
"ratio": 4... |
from django.views import generic
from croplet_demo import settings
from croplet_demo.croplet.models import Grant
from models import AccessToken
from mixins import LoggedInMixin
from urllib2 import urlopen, Request, HTTPError
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import ... | {
"repo_name": "JJStoker/cropr_demo",
"path": "croplet_demo/croplet/views.py",
"copies": "1",
"size": "5093",
"license": "mit",
"hash": -3254761290127488000,
"line_mean": 36.7333333333,
"line_max": 105,
"alpha_frac": 0.6075004909,
"autogenerated": false,
"ratio": 3.722953216374269,
"config_test"... |
from django.views import generic
from django.contrib.auth import authenticate, logout, login
from django.contrib.auth.models import User
from rest_framework import serializers, viewsets
from rest_framework.permissions import IsAuthenticated
from rest_framework.views import APIView, Response
from rest_framework.excepti... | {
"repo_name": "GeorgeZhukov/taskmanager",
"path": "taskmanager/tasks/views.py",
"copies": "1",
"size": "3929",
"license": "mit",
"hash": 7328489381779604000,
"line_mean": 32.3050847458,
"line_max": 99,
"alpha_frac": 0.6675998982,
"autogenerated": false,
"ratio": 4.157671957671957,
"config_test"... |
from django.views import generic
from django.contrib.auth.models import User
from braces import views
from . import models
from . import forms
class DashboardView(
views.LoginRequiredMixin,
generic.TemplateView
):
template_name = "pfa/dashboard.html"
def get_context_data(self, **kwargs):
con... | {
"repo_name": "fretscha/pfa",
"path": "pfa/postfix/views.py",
"copies": "2",
"size": "1621",
"license": "bsd-3-clause",
"hash": 5429743279290752000,
"line_mean": 22.1571428571,
"line_max": 71,
"alpha_frac": 0.6804441703,
"autogenerated": false,
"ratio": 3.9926108374384235,
"config_test": false,... |
from django.views import generic
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.conf import settings
from django import http
from django.utils.translation import ugettext as _
from paypal.payflow import models
from paypal.payflow import facade
class TransactionListView(g... | {
"repo_name": "embedded1/django-oscar-paypal",
"path": "paypal/payflow/dashboard/views.py",
"copies": "1",
"size": "3507",
"license": "bsd-3-clause",
"hash": 4133817847103253500,
"line_mean": 42.2962962963,
"line_max": 89,
"alpha_frac": 0.5913886513,
"autogenerated": false,
"ratio": 4.37827715355... |
from django.views import generic
from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
from django.core.urlresolvers import get_callable
from django.http import HttpResponse
DefaultRenderingBackend = get_callable(getattr(settings, 'PDF_DEFAULT_RENDERER', 'djpdf.renderers.wkhtmltopdf.... | {
"repo_name": "allanlei/django-pdf",
"path": "djpdf/views.py",
"copies": "1",
"size": "1490",
"license": "bsd-3-clause",
"hash": 2807511671217489400,
"line_mean": 36.25,
"line_max": 121,
"alpha_frac": 0.6879194631,
"autogenerated": false,
"ratio": 4.197183098591549,
"config_test": false,
"has... |
from django.views import generic
from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
from django.http import HttpResponseRedirect
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.sites.models import get_current_site
from django.contrib.auth import login
from ... | {
"repo_name": "allanlei/django-oauthentication",
"path": "oauthentication/base/views.py",
"copies": "1",
"size": "4739",
"license": "bsd-3-clause",
"hash": 4264978729097832000,
"line_mean": 35.4538461538,
"line_max": 208,
"alpha_frac": 0.6638531336,
"autogenerated": false,
"ratio": 4.204968944099... |
from django.views import generic
from django.core.exceptions import PermissionDenied
from datasets.models import Dataset
from core.views import ListSortMixin, GetPublishedObjectMixin
from .models import Choropleth
class ChoroplethExport(generic.DetailView):
model = Choropleth
template_name = "choropleths/exp... | {
"repo_name": "unt-libraries/texas-choropleth",
"path": "src/choropleths/views.py",
"copies": "2",
"size": "1808",
"license": "bsd-3-clause",
"hash": 5420798256565526000,
"line_mean": 29.1333333333,
"line_max": 74,
"alpha_frac": 0.6908185841,
"autogenerated": false,
"ratio": 3.8224101479915435,
... |
from django.views import generic
from django.core.urlresolvers import reverse_lazy
from custommixins import mixins
from . import forms
from . import models
# class Company(generic.TemplateView):
# template_name = 'companies/index.html'
class CompanyList(mixins.LoginRequiredMixin, generic.ListView):
model ... | {
"repo_name": "DobromirZlatkov/anteya",
"path": "companies/views.py",
"copies": "1",
"size": "1636",
"license": "mit",
"hash": -2019039030967670300,
"line_mean": 30.4615384615,
"line_max": 77,
"alpha_frac": 0.7047677262,
"autogenerated": false,
"ratio": 3.7958236658932716,
"config_test": false,... |
from django.views import generic
from django.core.urlresolvers import reverse
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.contrib.messages import success, error
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth import get_user_model
from djan... | {
"repo_name": "zniper/test-blog",
"path": "src/content/views.py",
"copies": "1",
"size": "5312",
"license": "mit",
"hash": -5776281951770068000,
"line_mean": 32.2,
"line_max": 78,
"alpha_frac": 0.625564759,
"autogenerated": false,
"ratio": 4.114639814097599,
"config_test": false,
"has_no_keyw... |
from django.views import generic
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render, render_to_response
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django... | {
"repo_name": "CSC301H-Fall2013/JuakStore",
"path": "Storefront/juakstore/views.py",
"copies": "1",
"size": "21481",
"license": "mit",
"hash": -1442677955163106000,
"line_mean": 43.2907216495,
"line_max": 331,
"alpha_frac": 0.5762301569,
"autogenerated": false,
"ratio": 3.9559852670349906,
"con... |
from django.views import generic
from django.core.urlresolvers import reverse
from accounting.apps.books.mixins import (
RestrictToSelectedOrganizationQuerySetMixin,
AutoSetSelectedOrganizationMixin)
from .models import Client, Employee
from .forms import ClientForm, EmployeeForm
class ClientListView(Restric... | {
"repo_name": "dulaccc/django-accounting",
"path": "accounting/apps/people/views.py",
"copies": "3",
"size": "2462",
"license": "mit",
"hash": 3170537749297428500,
"line_mean": 30.5641025641,
"line_max": 69,
"alpha_frac": 0.6969943136,
"autogenerated": false,
"ratio": 4.559259259259259,
"config... |
from django.views import generic
from django.core.urlresolvers import reverse
from django.contrib.auth.mixins import LoginRequiredMixin
from baza.models import DopuszczeniaLegalizacje
from .forms import ZadanieForm, ZadanieUpdateForm
from .models import Zadanie
class ZadanieCreateView(LoginRequiredMixin, generic.C... | {
"repo_name": "szymanskirafal/ab",
"path": "zadania/views.py",
"copies": "1",
"size": "1025",
"license": "mit",
"hash": -7458120941547338000,
"line_mean": 27.4722222222,
"line_max": 107,
"alpha_frac": 0.7502439024,
"autogenerated": false,
"ratio": 3.115501519756839,
"config_test": false,
"has... |
from django.views import generic
from django.db.models import Count, Sum
from .base import CommitteeDataView
from calaccess_campaign_browser.models import (
Committee,
Filing,
Expenditure,
Contribution
)
class CommitteeDetailView(generic.DetailView):
model = Committee
def get_context_data(sel... | {
"repo_name": "california-civic-data-coalition/django-calaccess-campaign-browser",
"path": "calaccess_campaign_browser/views/committees.py",
"copies": "3",
"size": "3397",
"license": "mit",
"hash": 2585412101919460400,
"line_mean": 31.9805825243,
"line_max": 77,
"alpha_frac": 0.6387989402,
"autogen... |
from django.views import generic
from django.db.models import get_model
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _, ugettext
from extra_views import (CreateWithInlinesView, UpdateWithInlinesView,
InlineFormSet)
from brand.dashboard ... | {
"repo_name": "mmcorp/django-oscar-brand",
"path": "brand/dashboard/views.py",
"copies": "1",
"size": "2461",
"license": "mit",
"hash": -7989831729410499000,
"line_mean": 29.7625,
"line_max": 70,
"alpha_frac": 0.6700528241,
"autogenerated": false,
"ratio": 3.745814307458143,
"config_test": fals... |
from django.views import generic
from django.db.models import get_model
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from . import forms
from ..utils import get_page_model, get_node_model
# PageNode = get_node_model()
# FancyPage = get_page_model()
# ContentBl... | {
"repo_name": "socradev/django-fancypages",
"path": "fancypages/dashboard/views.py",
"copies": "1",
"size": "2415",
"license": "bsd-3-clause",
"hash": -6837918083900043000,
"line_mean": 28.8148148148,
"line_max": 68,
"alpha_frac": 0.6683229814,
"autogenerated": false,
"ratio": 3.577777777777778,
... |
from django.views import generic
from django.db.models import get_model
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from . import utils
from .forms import TicketUpdateForm, TicketCreateForm
Ticket = get_model('oscar_support', 'Ticket')
Message = get_model('oscar_support',... | {
"repo_name": "snowball-one/django-oscar-support",
"path": "oscar_support/views.py",
"copies": "1",
"size": "2631",
"license": "bsd-3-clause",
"hash": -7709674101267745000,
"line_mean": 31.4814814815,
"line_max": 78,
"alpha_frac": 0.6545039909,
"autogenerated": false,
"ratio": 3.9683257918552037,... |
from django.views import generic
from django.db.models import get_model
from django.shortcuts import get_object_or_404
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
from django import http
from oscar.core.loading import get_class
from oscar.apps.customer.alerts import util... | {
"repo_name": "michaelBenin/django-oscar",
"path": "oscar/apps/customer/alerts/views.py",
"copies": "1",
"size": "3229",
"license": "bsd-3-clause",
"hash": 6028565023866342000,
"line_mean": 34.8777777778,
"line_max": 84,
"alpha_frac": 0.6738928461,
"autogenerated": false,
"ratio": 3.9962871287128... |
from django.views import generic
from django.db.models import get_model
from django.template import loader, RequestContext
from django.utils.translation import ugettext_lazy as _
from fancypages.assets import forms
from fancypages.mixins import JSONResponseMixin
# ImageAsset = get_model('assets', 'ImageAsset')
cla... | {
"repo_name": "socradev/django-fancypages",
"path": "fancypages/assets/views.py",
"copies": "1",
"size": "1999",
"license": "bsd-3-clause",
"hash": -2631973472030724000,
"line_mean": 32.8813559322,
"line_max": 79,
"alpha_frac": 0.631815908,
"autogenerated": false,
"ratio": 4.006012024048096,
"c... |
from django.views import generic
from django.db.models import get_model, Q
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from . import forms
from .. import utils
Note = get_model('oscar_support', 'Note')
Ticket = get_model('oscar_support', 'Ticket')
Message = get_model('osc... | {
"repo_name": "snowball-one/django-oscar-support",
"path": "oscar_support/dashboard/views.py",
"copies": "1",
"size": "3585",
"license": "bsd-3-clause",
"hash": 4053838660418142000,
"line_mean": 32.5046728972,
"line_max": 90,
"alpha_frac": 0.6608089261,
"autogenerated": false,
"ratio": 3.92231947... |
from django.views import generic
from django.db.models import Q
from django.core.exceptions import ImproperlyConfigured
class DataTablesServerDataMixin(object):
query_class = Q
initial_query_kwargs = {}
searchable_fields = ()
def get_searchable_fields(self):
if self.searchable_fields is n... | {
"repo_name": "allanlei/rhinocloud-utils",
"path": "rhinocloud/contrib/jquery/views.py",
"copies": "1",
"size": "2169",
"license": "bsd-3-clause",
"hash": -6930998905904229000,
"line_mean": 38.4363636364,
"line_max": 115,
"alpha_frac": 0.6205624712,
"autogenerated": false,
"ratio": 4.031598513011... |
from django.views import generic
from django.db.models import Q
from django.http import HttpResponseRedirect
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import get_object_or_404, redirect
from django.templ... | {
"repo_name": "monikasulik/django-oscar",
"path": "src/oscar/apps/dashboard/catalogue/views.py",
"copies": "1",
"size": "28129",
"license": "bsd-3-clause",
"hash": 1732166658754794000,
"line_mean": 36.7064343164,
"line_max": 114,
"alpha_frac": 0.62277365,
"autogenerated": false,
"ratio": 4.413084... |
from django.views import generic
from django.db.models import Q
from vida.vida_core.mixins import LoginRequiredMixin
import helpers
from vida.vida.models import Person, Shelter
class PersonIndexView(LoginRequiredMixin, generic.ListView):
model = Person
paginate_by = 30
queryset = Person.objects.all()
... | {
"repo_name": "ROGUE-JCTD/vida",
"path": "vida/vida/views.py",
"copies": "1",
"size": "3591",
"license": "mit",
"hash": -3664986662709553700,
"line_mean": 33.8737864078,
"line_max": 115,
"alpha_frac": 0.4909495962,
"autogenerated": false,
"ratio": 4.48314606741573,
"config_test": false,
"has_... |
from django.views import generic
from django.db.models import Q
from .models import Book, Publisher
class BooksListView(generic.ListView):
model = Book
template_name = 'books/list_of_books.html'
context_object_name = 'list_of_books'
paginate_by = 10
def get_context_data(self, **kwargs):
... | {
"repo_name": "febinstephen/django-fundrasiser-app",
"path": "books/views.py",
"copies": "2",
"size": "1280",
"license": "bsd-3-clause",
"hash": -5758450636075675000,
"line_mean": 27.4444444444,
"line_max": 71,
"alpha_frac": 0.66484375,
"autogenerated": false,
"ratio": 3.7536656891495603,
"conf... |
from django.views import generic
from django.http import Http404
from django.utils.translation import ugettext as _
from django_filters.views import FilterMixin
# Based on BasedListView at django/views/generic/list.py
class FilterViewWithPagination(FilterMixin, generic.ListView):
def get(self, request, *args, *... | {
"repo_name": "vintasoftware/curly-enigma",
"path": "core/generic_views.py",
"copies": "4",
"size": "1645",
"license": "mit",
"hash": -3118285641941354500,
"line_mean": 41.1794871795,
"line_max": 88,
"alpha_frac": 0.6267477204,
"autogenerated": false,
"ratio": 3.8615023474178405,
"config_test":... |
from django.views import generic
from django.http import Http404
from django.utils.translation import ugettext as _
from emoticonvis.apps.corpus import models as corpus_models
from emoticonvis.apps.enhance import models as enhance_models
from django.contrib.auth.decorators import login_required
class LoginRequiredMi... | {
"repo_name": "nanchenchen/emoticon-analysis",
"path": "emoticonvis/apps/base/views.py",
"copies": "1",
"size": "5151",
"license": "mit",
"hash": -7889369447151538000,
"line_mean": 27.9438202247,
"line_max": 78,
"alpha_frac": 0.6202679091,
"autogenerated": false,
"ratio": 4.147342995169082,
"co... |
from django.views import generic
from django.http import Http404
from django.utils.translation import ugettext as _
from msgvis.apps.corpus import models as corpus_models
from django.contrib.auth.decorators import login_required
class LoginRequiredMixin(object):
"""A mixin that forces a login to view the CBTempl... | {
"repo_name": "hds-lab/textvisdrg",
"path": "msgvis/apps/base/views.py",
"copies": "1",
"size": "2397",
"license": "mit",
"hash": 3624541676325211600,
"line_mean": 27.5357142857,
"line_max": 78,
"alpha_frac": 0.6312056738,
"autogenerated": false,
"ratio": 4.154246100519931,
"config_test": false... |
from django.views import generic
from django.http import Http404
from django.utils.translation import ugettext as _
from msgvis.apps.corpus import models as corpus_models
from msgvis.apps.enhance import models as enhance_models
from msgvis.apps.experiment import models as experiment_models
from django.contrib.auth.dec... | {
"repo_name": "hds-lab/coding-ml",
"path": "msgvis/apps/base/views.py",
"copies": "1",
"size": "6132",
"license": "mit",
"hash": -1371828341452349400,
"line_mean": 28.2047619048,
"line_max": 78,
"alpha_frac": 0.6211676451,
"autogenerated": false,
"ratio": 4.171428571428572,
"config_test": false... |
from django.views import generic
from django.http import Http404
from django.utils.translation import ugettext as _
from pyanalysis.apps.corpus import models as corpus_models
from django.contrib.auth.decorators import login_required
class LoginRequiredMixin(object):
"""A mixin that forces a login to view the CBT... | {
"repo_name": "nanchenchen/script-analysis",
"path": "pyanalysis/apps/base/views.py",
"copies": "1",
"size": "4244",
"license": "mit",
"hash": 4853527154736224000,
"line_mean": 28.0753424658,
"line_max": 78,
"alpha_frac": 0.6255890669,
"autogenerated": false,
"ratio": 4.185404339250493,
"config... |
from django.views import generic
from django.http import Http404
from . import models
class BlogEntryListView(generic.ListView):
template_name = 'blog/list.html'
model = models.BlogEntry
queryset = models.BlogEntry.objects.filter(status=models.PUBLISHED)
context_object_name = 'active_blog_entries'
... | {
"repo_name": "zsoobhan/prometheus",
"path": "www/blog/views.py",
"copies": "1",
"size": "1113",
"license": "mit",
"hash": 8990769365149366000,
"line_mean": 29.9166666667,
"line_max": 76,
"alpha_frac": 0.6873315364,
"autogenerated": false,
"ratio": 4.091911764705882,
"config_test": false,
"ha... |
from django.views import generic
from django.http import HttpResponseForbidden
from django.contrib.auth import authenticate, login
from .models import Movie, Collection
class IndexView(generic.ListView):
template_name = 'index.html'
context_object_name = 'latest_movie_list'
def get_queryset(self):
... | {
"repo_name": "odty101/MediaCollector",
"path": "MediaCollector/Movies/views.py",
"copies": "1",
"size": "1060",
"license": "mit",
"hash": -95909039342991090,
"line_mean": 24.8780487805,
"line_max": 68,
"alpha_frac": 0.7018867925,
"autogenerated": false,
"ratio": 4.189723320158103,
"config_test... |
from django.views import generic
from django.http import HttpResponse
from django.template.response import TemplateResponse
from django.template import loader
from django.core.servers.basehttp import FileWrapper
from rhinocloud.template.response import PDFTemplateResponse, WebkitPDFTemplateResponse
class PDFResponse... | {
"repo_name": "allanlei/rhinocloud-utils",
"path": "rhinocloud/views/generic/pdf.py",
"copies": "1",
"size": "1912",
"license": "bsd-3-clause",
"hash": -2566807563136498000,
"line_mean": 28.4153846154,
"line_max": 87,
"alpha_frac": 0.6077405858,
"autogenerated": false,
"ratio": 4.120689655172414,... |
from django.views import generic
from django.http import HttpResponseRedirect
from django.core.exceptions import ImproperlyConfigured
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.conf import settings
from mixins import LoginMixin
import logging
logger = logging.getLogger(__name__)
class LoginVie... | {
"repo_name": "allanlei/django-openauth",
"path": "openauth/openid/views.py",
"copies": "1",
"size": "2593",
"license": "bsd-3-clause",
"hash": 3704872032214601000,
"line_mean": 30.6219512195,
"line_max": 142,
"alpha_frac": 0.6509834169,
"autogenerated": false,
"ratio": 4.155448717948718,
"conf... |
from django.views import generic
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from accounting.apps.books.models import Organization
from .steps import (
CreateOrganizationStep,
ConfigureTaxRatesStep,
ConfigureBusinessSettingsStep,
ConfigureFinancialSettingsS... | {
"repo_name": "dulaccc/django-accounting",
"path": "accounting/apps/connect/views.py",
"copies": "1",
"size": "2405",
"license": "mit",
"hash": -1835637456929621500,
"line_mean": 30.6447368421,
"line_max": 77,
"alpha_frac": 0.6602910603,
"autogenerated": false,
"ratio": 4.437269372693727,
"conf... |
from django.views import generic
from django import shortcuts, http
from django.core.urlresolvers import reverse
from django.contrib import messages
from oscar.apps.order import models as order_models
from oscar.apps.payment import exceptions
from oscar_sagepay import facade, models, gateway
class AuthorisePayment(g... | {
"repo_name": "django-oscar/django-oscar-sagepay-direct",
"path": "sandbox/apps/views.py",
"copies": "1",
"size": "3129",
"license": "bsd-3-clause",
"hash": -3670795669313457700,
"line_mean": 31.59375,
"line_max": 75,
"alpha_frac": 0.6062639821,
"autogenerated": false,
"ratio": 4.138888888888889,... |
from django.views import generic
from django.shortcuts import get_object_or_404
from django.template.loader import get_template
from django.http import HttpResponse
from django.core.exceptions import PermissionDenied
from z3c.rml import rml2pdf
from django.utils import timezone
from invoice import models
class Invoi... | {
"repo_name": "pickleshb/PyInvoice",
"path": "invoice/invoice_print.py",
"copies": "1",
"size": "2217",
"license": "mit",
"hash": 4583809822714748000,
"line_mean": 30.2253521127,
"line_max": 78,
"alpha_frac": 0.5737483085,
"autogenerated": false,
"ratio": 4.1361940298507465,
"config_test": fals... |
from django.views import generic
from django.shortcuts import get_object_or_404
from apps.learn.models import Project, Announcement
from apps.learn.views.mixins import EnrollmentPermissionMixin
class ProjectHomeView(EnrollmentPermissionMixin, generic.ListView):
template_name = 'learn/internal/project_home.html'... | {
"repo_name": "gileno/sofia",
"path": "sofia/apps/learn/views/project.py",
"copies": "1",
"size": "1303",
"license": "mit",
"hash": -2334092341389356500,
"line_mean": 30.7804878049,
"line_max": 76,
"alpha_frac": 0.7122026094,
"autogenerated": false,
"ratio": 3.972560975609756,
"config_test": fa... |
from django.views import generic
from django.shortcuts import get_object_or_404, redirect
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.utils.translation import ugettext_lazy as _
from django.db import models
from apps.learn.models import Project, Area, Enrol... | {
"repo_name": "gileno/sofia",
"path": "sofia/apps/learn/views/public.py",
"copies": "1",
"size": "3254",
"license": "mit",
"hash": -1757499854484072000,
"line_mean": 32.7395833333,
"line_max": 79,
"alpha_frac": 0.5798085829,
"autogenerated": false,
"ratio": 4.184754521963824,
"config_test": fal... |
from django.views import generic
from django.shortcuts import get_object_or_404, render
from django.utils import timezone
from ..models import Challenge
from ..forms import ChallengeForm, ChallengeCommentForm
from apps.coder.models import Coder
class DetailView(generic.View):
form_class = ChallengeForm
comm... | {
"repo_name": "mavroskardia/codechallenge",
"path": "cc/apps/challenge/views/detail.py",
"copies": "1",
"size": "1452",
"license": "mit",
"hash": -1581380904126613200,
"line_mean": 38.2432432432,
"line_max": 132,
"alpha_frac": 0.6701101928,
"autogenerated": false,
"ratio": 3.956403269754768,
"c... |
from django.views import generic
from django.shortcuts import redirect
from django.contrib import messages
from . import models
from . import forms
from . import tasks
class ChosenFeedsMixin(object):
def get_context_data(self, **kwargs):
kwargs = super().get_context_data(**kwargs)
kwargs["feeds"]... | {
"repo_name": "arocks/jazz_reader",
"path": "src/feeds/views.py",
"copies": "1",
"size": "2035",
"license": "mit",
"hash": 6649323013669321000,
"line_mean": 30.796875,
"line_max": 86,
"alpha_frac": 0.6658476658,
"autogenerated": false,
"ratio": 3.6145648312611014,
"config_test": false,
"has_n... |
from django.views import generic
from django.shortcuts import render
from braces.views import LoginRequiredMixin
from . import forms
from django.template.response import TemplateResponse
from buddyutility import getAddress
from django.shortcuts import render_to_response
from models import usersProfiles
from models impo... | {
"repo_name": "focode/buddy2",
"path": "src/buddy/views.py",
"copies": "1",
"size": "8476",
"license": "mit",
"hash": -3356076257099067400,
"line_mean": 37.5272727273,
"line_max": 118,
"alpha_frac": 0.6331996225,
"autogenerated": false,
"ratio": 4.246492985971944,
"config_test": false,
"has_n... |
from django.views import generic
from django.shortcuts import render
from braces.views import LoginRequiredMixin
from . import forms
import datetime
from django.core import serializers
import json
from django.template.response import TemplateResponse
from buddyutility import getAddress
from django.shortcuts import rend... | {
"repo_name": "focode/buddy2",
"path": "src/buddy/buddyactionsview.py",
"copies": "1",
"size": "2885",
"license": "mit",
"hash": -9128021566662242000,
"line_mean": 31.7840909091,
"line_max": 119,
"alpha_frac": 0.6935875217,
"autogenerated": false,
"ratio": 4.006944444444445,
"config_test": fals... |
from django.views import generic
from django.shortcuts import render
from models import TimeFrame, FeelingWord, FeelingPercent, ExampleTweet
from django.utils import timezone
from jsonview.decorators import json_view
import json
from itertools import groupby
import settings
import times
from collections import defaultd... | {
"repo_name": "michaelbrooks/twitter-feels",
"path": "twitter_feels/apps/thermometer/views.py",
"copies": "1",
"size": "7249",
"license": "mit",
"hash": -6402343013628454000,
"line_mean": 32.4055299539,
"line_max": 120,
"alpha_frac": 0.6182921782,
"autogenerated": false,
"ratio": 3.59039128281327... |
from django.views import generic
from django.shortcuts import render, redirect
from django.contrib.auth import authenticate, login, logout as auth_logout
from django.views.generic import View
from forms import UserForm
from django.contrib.auth.models import User
from django.http import HttpResponse, JsonResponse
from d... | {
"repo_name": "xSash/SocialMediaProject",
"path": "CodeShare/CodeShareIo/views.py",
"copies": "1",
"size": "8820",
"license": "mit",
"hash": -2547748556542144000,
"line_mean": 31.4264705882,
"line_max": 119,
"alpha_frac": 0.5861678005,
"autogenerated": false,
"ratio": 4.240384615384615,
"config... |
from django.views import generic
from django_tables2 import SingleTableMixin
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.template.loader import render_to_string
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.util... | {
"repo_name": "cage1016/django-oscar-hooks",
"path": "hooks/dashboard/views.py",
"copies": "1",
"size": "12025",
"license": "bsd-3-clause",
"hash": 7262044453670581000,
"line_mean": 33.0651558074,
"line_max": 102,
"alpha_frac": 0.6192931393,
"autogenerated": false,
"ratio": 4.1928172942817294,
... |
from django.views import generic
from django.template.loader import select_template
from django.shortcuts import render
from .models import Page
def home_page(request):
page_base_template_names = ["nupages/base.html",]
page_template_names = ["nupages/index.html",]
page_list = Page.objects.published()
... | {
"repo_name": "goldhand/django-nupages",
"path": "nupages/views.py",
"copies": "1",
"size": "4345",
"license": "bsd-3-clause",
"hash": -4721721811123906000,
"line_mean": 34.9090909091,
"line_max": 78,
"alpha_frac": 0.6264672037,
"autogenerated": false,
"ratio": 4.083646616541353,
"config_test":... |
from django.views import generic
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from sundayfunday.models import Event
from sundayfunday.models import AttendEvent
from sundayfunday.models import Preference
from sundayfun... | {
"repo_name": "mihaibivol/sunday-funday",
"path": "sundayfunday/views/index.py",
"copies": "1",
"size": "1565",
"license": "artistic-2.0",
"hash": 6431596655178373000,
"line_mean": 41.2972972973,
"line_max": 91,
"alpha_frac": 0.6562300319,
"autogenerated": false,
"ratio": 4.218328840970351,
"co... |
from django.views import generic
from django.utils.decorators import method_decorator
from django.http import HttpResponseBadRequest, JsonResponse
from django.shortcuts import redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from sequere.registry import registry
from sequere.model... | {
"repo_name": "thoas/django-sequere",
"path": "sequere/contrib/user/views.py",
"copies": "1",
"size": "2500",
"license": "mit",
"hash": -7599867547246308000,
"line_mean": 31.0512820513,
"line_max": 110,
"alpha_frac": 0.6488,
"autogenerated": false,
"ratio": 4.244482173174872,
"config_test": fal... |
from django.views import generic
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_protect
from django.urls import reverse
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404
from pybb.models import Topic
from pybb.co... | {
"repo_name": "ulule/pybbm",
"path": "pybb/contrib/profiles/views.py",
"copies": "2",
"size": "1517",
"license": "bsd-2-clause",
"hash": -4708966934729794000,
"line_mean": 31.9782608696,
"line_max": 82,
"alpha_frac": 0.7172050099,
"autogenerated": false,
"ratio": 3.840506329113924,
"config_test... |
from django.views import generic
from django.views.decorators.csrf import csrf_exempt
import json
import requests
import random
from django.utils.decorators import method_decorator
from django.http.response import HttpResponse
from django.shortcuts import render
def chat(request):
context = {}
return render(r... | {
"repo_name": "vaisaghvt/django-bot-server-tutorial",
"path": "chatbot_tutorial/views.py",
"copies": "1",
"size": "1837",
"license": "mit",
"hash": -1627996808112280000,
"line_mean": 40.7727272727,
"line_max": 163,
"alpha_frac": 0.6467065868,
"autogenerated": false,
"ratio": 3.6448412698412698,
... |
from django.views import generic
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from profiles.models import *
from django.db.models import F
from django.template.loader import get_template
from django.shortcuts import render, render_to_response
from django.http import HttpResponse
from django... | {
"repo_name": "justiceeq/csc309individualassignment",
"path": "src/my_proj/views.py",
"copies": "1",
"size": "5670",
"license": "mit",
"hash": -231770681607248800,
"line_mean": 30.5055555556,
"line_max": 105,
"alpha_frac": 0.6571428571,
"autogenerated": false,
"ratio": 3.7926421404682276,
"conf... |
from django.views import generic
from django.views.generic.edit import DeleteView, CreateView, UpdateView
from .models import Album, Song
# Neive way of creating views
"""
def index(request):
all_albums = Album.objects.all()
return render(request, "music/index.html", {'all_albums' : all_albums})
def detail(re... | {
"repo_name": "sravankr96/Sample-Music-App",
"path": "website/music/views.py",
"copies": "1",
"size": "1405",
"license": "mit",
"hash": 6813417889620669000,
"line_mean": 28.914893617,
"line_max": 124,
"alpha_frac": 0.6775800712,
"autogenerated": false,
"ratio": 3.393719806763285,
"config_test":... |
from django.views import generic
from django.views.generic import View
from django.views.generic.edit import CreateView, UpdateView, DeleteView, FormView
from django.shortcuts import render, redirect
from .models import Information, Images
from .forms import ProjectForm, UserForm
from django.core.urlresolvers import re... | {
"repo_name": "ayushjain19/Technopedia-BPHC-website",
"path": "projects/views.py",
"copies": "1",
"size": "2962",
"license": "mit",
"hash": -8936839829542058000,
"line_mean": 25.4464285714,
"line_max": 82,
"alpha_frac": 0.7069547603,
"autogenerated": false,
"ratio": 3.2478070175438596,
"config_... |
from django.views import generic
from easy_rest.views import RestApiView
from .models import User
from challenge_framework.lib.messages import url_message, MessageTypes
from django.urls import reverse_lazy
from django.contrib.auth import authenticate, login, logout
from django.http.response import HttpResponseRedirect
... | {
"repo_name": "jonatanSh/challenge-framework",
"path": "challenge_framework/users/views.py",
"copies": "1",
"size": "2239",
"license": "apache-2.0",
"hash": -2672500913683602000,
"line_mean": 31.4492753623,
"line_max": 120,
"alpha_frac": 0.6132201876,
"autogenerated": false,
"ratio": 4.3560311284... |
from django.views import generic
from .models import Todo
from .forms import TodoForm
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
class IndexView(generic.ListView):
template_name = 'todo/index.html'
context_object_name = 'todo_list... | {
"repo_name": "jashort/todoit",
"path": "todo/views.py",
"copies": "1",
"size": "1194",
"license": "mit",
"hash": -6608044463867075000,
"line_mean": 24.9565217391,
"line_max": 72,
"alpha_frac": 0.7102177554,
"autogenerated": false,
"ratio": 3.52212389380531,
"config_test": false,
"has_no_keyw... |
from django.views import generic
from rest_framework import viewsets
from blog import models
from blog import serializers
class HomeView(generic.ListView):
def get_queryset(self):
return models.Post.objects.all().order_by('-posted_date')
home_view = HomeView.as_view()
class CategoryPosts(generic.Detai... | {
"repo_name": "riklaunim/django-examples",
"path": "ember-drf-example/blog/views.py",
"copies": "1",
"size": "1611",
"license": "mit",
"hash": -7333856129868778000,
"line_mean": 26.3050847458,
"line_max": 71,
"alpha_frac": 0.6809435133,
"autogenerated": false,
"ratio": 3.835714285714286,
"confi... |
from django.views import generic
from wit import Wit
from skyscanner.skyscanner import FlightsCache
#from botair import skyscanner
from django.http.response import HttpResponse
import json
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts imp... | {
"repo_name": "itucsProject2/Proje2",
"path": "botair/views.py",
"copies": "1",
"size": "10575",
"license": "unlicense",
"hash": -3408294728406534000,
"line_mean": 44,
"line_max": 467,
"alpha_frac": 0.5807092199,
"autogenerated": false,
"ratio": 3.7040280210157617,
"config_test": false,
"has_... |
from django.views import generic
class HomePage(generic.TemplateView):
template_name = "home.html"
class LookAroundPage(generic.TemplateView):
template_name = "lookaround.html"
class CourseAllPage(generic.TemplateView):
template_name = "course/courseall.html"
class ContentPage(generic.TemplateView):
t... | {
"repo_name": "skrcjstk/SpeakKo_Home",
"path": "src/SpeakKo/views.py",
"copies": "1",
"size": "1158",
"license": "mit",
"hash": -6616228187167361000,
"line_mean": 35.1875,
"line_max": 58,
"alpha_frac": 0.7789291883,
"autogenerated": false,
"ratio": 3.676190476190476,
"config_test": false,
"ha... |
from django.views import generic
from accounts.forms import AccountForm
from accounts import security
class AccountBalanceView(generic.FormView):
form_class = AccountForm
template_name = 'accounts/balance_check.html'
def get_context_data(self, **kwargs):
ctx = super(AccountBalanceView, self).get... | {
"repo_name": "amsys/django-account-balances",
"path": "accounts/views.py",
"copies": "6",
"size": "1083",
"license": "bsd-3-clause",
"hash": 936708263633254300,
"line_mean": 35.1,
"line_max": 77,
"alpha_frac": 0.6842105263,
"autogenerated": false,
"ratio": 3.9525547445255476,
"config_test": fa... |
from django.views import generic
from blog.models import Category
from blog.models import Entry
class BaseEntryView(object):
date_field = 'pub_date'
model = Entry
class BaseCategoryView(object):
model = Category
class NavMixin(object):
def get_context_data(self, **kwargs):
context = supe... | {
"repo_name": "akarambir/shadow",
"path": "blog/views.py",
"copies": "1",
"size": "1185",
"license": "mit",
"hash": 6059195976699351000,
"line_mean": 23.1836734694,
"line_max": 75,
"alpha_frac": 0.7113924051,
"autogenerated": false,
"ratio": 3.8599348534201954,
"config_test": false,
"has_no_k... |
from django.views import generic
from core.mixins import ImportMixin
from .models import Corpus, Language
from .utils import get_available_corpora
class PrepareDownloadMixin(generic.base.ContextMixin):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
corpora = ... | {
"repo_name": "UUDigitalHumanitieslab/timealign",
"path": "annotations/mixins.py",
"copies": "1",
"size": "1710",
"license": "mit",
"hash": 3843822602586597400,
"line_mean": 33.8979591837,
"line_max": 84,
"alpha_frac": 0.6584795322,
"autogenerated": false,
"ratio": 4.014084507042254,
"config_te... |
from django.views import generic
from django.core.urlresolvers import reverse
from django.core.urlresolvers import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import forms
from horizon import tabs
from horizon import tables
from horizon import messa... | {
"repo_name": "sreenathmenon/billing-dashboard",
"path": "billingdashboard/dashboards/project/available_plans/views.py",
"copies": "1",
"size": "2855",
"license": "apache-2.0",
"hash": -1084812368067825800,
"line_mean": 36.5657894737,
"line_max": 98,
"alpha_frac": 0.6980735552,
"autogenerated": fal... |
from django.views import generic
from django.http import Http404, HttpResponseRedirect, JsonResponse
from django.shortcuts import render
from django.contrib.auth import login, mixins, get_user
from django.contrib.auth.forms import AuthenticationForm
from django.core.exceptions import ObjectDoesNotExist
from django.cor... | {
"repo_name": "jgillick/Spaces",
"path": "spaces/views.py",
"copies": "1",
"size": "6914",
"license": "mit",
"hash": 677663174565363700,
"line_mean": 28.8017241379,
"line_max": 93,
"alpha_frac": 0.622215794,
"autogenerated": false,
"ratio": 4.160048134777377,
"config_test": false,
"has_no_key... |
from django.views import generic
from extra_views import (
CalendarMonthView,
CreateWithInlinesView,
FormSetSuccessMessageMixin,
FormSetView,
InlineFormSetFactory,
InlineFormSetView,
ModelFormSetView,
NamedFormsetsMixin,
SearchableListMixin,
SortableListMixin,
SuccessMessage... | {
"repo_name": "AndrewIngram/django-extra-views",
"path": "extra_views_tests/views.py",
"copies": "1",
"size": "4800",
"license": "mit",
"hash": 437353055777715500,
"line_mean": 29,
"line_max": 88,
"alpha_frac": 0.6791666667,
"autogenerated": false,
"ratio": 3.7706205813040063,
"config_test": fa... |
from django.views import generic
from .forms import AcceptForm, DeclineForm, InvitePersonForm
from .models import Invitation
class UserMixin(object):
def get_form_kwargs(self):
kwargs = super(UserMixin, self).get_form_kwargs()
kwargs.update(user=self.request.user)
return kwargs
class In... | {
"repo_name": "schinckel/django-boardinghouse",
"path": "boardinghouse/contrib/invite/views.py",
"copies": "1",
"size": "3040",
"license": "bsd-3-clause",
"hash": 3689598319456552400,
"line_mean": 27.679245283,
"line_max": 103,
"alpha_frac": 0.7263157895,
"autogenerated": false,
"ratio": 3.584905... |
from django.views import generic
from .forms import InvitePersonForm, AcceptForm, DeclineForm
from .models import Invitation
class UserMixin(object):
def get_form_kwargs(self):
kwargs = super(UserMixin, self).get_form_kwargs()
kwargs.update(user=self.request.user)
return kwargs
class In... | {
"repo_name": "luzfcb/django-boardinghouse",
"path": "boardinghouse/contrib/invite/views.py",
"copies": "1",
"size": "3040",
"license": "bsd-3-clause",
"hash": 2989468233743381000,
"line_mean": 27.679245283,
"line_max": 103,
"alpha_frac": 0.7263157895,
"autogenerated": false,
"ratio": 3.584905660... |
from django.views import generic
from gallery import queries as image_queries
from gallery.models import GalleryImage
from . import queries
from .models import Arc, Issue
class IndexView(generic.ListView):
model = Arc
template_name = "comics/index.html"
context_object_name = "arcs"
class IssueView(gen... | {
"repo_name": "evanepio/dotmanca",
"path": "comics/views.py",
"copies": "1",
"size": "1862",
"license": "mit",
"hash": -2853223363718596600,
"line_mean": 28.09375,
"line_max": 88,
"alpha_frac": 0.6444683136,
"autogenerated": false,
"ratio": 3.754032258064516,
"config_test": false,
"has_no_key... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.