text stringlengths 0 1.05M | meta dict |
|---|---|
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Category
from django.contrib import auth, messages
class CategoryView(object):
model = Category
def get_template_names(self):
"""Nest templates wit... | {
"repo_name": "tnemis/staging-server",
"path": "baseapp/views/category_views.py",
"copies": "3",
"size": "1728",
"license": "mit",
"hash": -393010813608206100,
"line_mean": 24.7910447761,
"line_max": 73,
"alpha_frac": 0.6793981481,
"autogenerated": false,
"ratio": 4.341708542713568,
"config_tes... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Community
from django.contrib import auth, messages
class CommunityView(object):
model = Community
def get_template_names(self):
"""Nest templates ... | {
"repo_name": "mravikumar281/staging-server",
"path": "baseapp/views/community_views.py",
"copies": "3",
"size": "1751",
"license": "mit",
"hash": -8464017072309467000,
"line_mean": 25.1343283582,
"line_max": 73,
"alpha_frac": 0.6836093661,
"autogenerated": false,
"ratio": 4.302211302211302,
"c... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Differently_abled
from django.contrib import auth, messages
class Differently_abledView(object):
model = Differently_abled
def get_template_names(self):
... | {
"repo_name": "tnemis/staging-server",
"path": "baseapp/views/differently_abled_views.py",
"copies": "3",
"size": "1935",
"license": "mit",
"hash": -3506357786164113000,
"line_mean": 27.8805970149,
"line_max": 73,
"alpha_frac": 0.7018087855,
"autogenerated": false,
"ratio": 4.073684210526316,
"... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Disadvantaged_group
from django.contrib import auth, messages
class Disadvantaged_groupView(object):
model = Disadvantaged_group
def get_template_names(sel... | {
"repo_name": "tnemis/staging-server",
"path": "baseapp/views/disadvantaged_group_views.py",
"copies": "3",
"size": "1981",
"license": "mit",
"hash": -2233356799653160700,
"line_mean": 28.5671641791,
"line_max": 77,
"alpha_frac": 0.7087329631,
"autogenerated": false,
"ratio": 3.861598440545809,
... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Educational_block
class Educational_blockView(object):
model = Educational_block
def get_template_names(self):
"""Nest templates within educational... | {
"repo_name": "tnemis/staging-server",
"path": "baseapp/views/educational_block_views.py",
"copies": "3",
"size": "1762",
"license": "mit",
"hash": 2725640752866101000,
"line_mean": 27.4193548387,
"line_max": 73,
"alpha_frac": 0.7150964813,
"autogenerated": false,
"ratio": 3.838779956427015,
"c... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Educational_district
class Educational_districtView(object):
model = Educational_district
def get_template_names(self):
"""Nest templates within ed... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "baseapp/views/educational_district_views.py",
"copies": "3",
"size": "1831",
"license": "mit",
"hash": 1642821204816665000,
"line_mean": 28.5322580645,
"line_max": 79,
"alpha_frac": 0.7258328782,
"autogenerated": false,
"ratio": 3.9891067538126364,
... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Habitation
from django.contrib import auth, messages
class HabitationView(object):
model = Habitation
def get_template_names(self):
"""Nest templat... | {
"repo_name": "tnemis/staging-server",
"path": "baseapp/views/habitation_views.py",
"copies": "3",
"size": "1774",
"license": "mit",
"hash": 8284730840503208000,
"line_mean": 25.4776119403,
"line_max": 73,
"alpha_frac": 0.6877113867,
"autogenerated": false,
"ratio": 3.9954954954954953,
"config_... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Language
from django.contrib import auth, messages
class LanguageView(object):
model = Language
def get_template_names(self):
"""Nest templates wit... | {
"repo_name": "mravikumar281/staging-server",
"path": "baseapp/views/language_views.py",
"copies": "3",
"size": "1728",
"license": "mit",
"hash": -6828476208460277000,
"line_mean": 24.7910447761,
"line_max": 73,
"alpha_frac": 0.6793981481,
"autogenerated": false,
"ratio": 4.341708542713568,
"co... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Management
from django.contrib import auth, messages
class ManagementView(object):
model = Management
def get_template_names(self):
"""Nest templat... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "baseapp/views/management_views.py",
"copies": "3",
"size": "1774",
"license": "mit",
"hash": 842523046729156600,
"line_mean": 25.4776119403,
"line_max": 73,
"alpha_frac": 0.6877113867,
"autogenerated": false,
"ratio": 4.457286432160804,
"config_tes... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Management
class ManagementView(object):
model = Management
def get_template_names(self):
"""Nest templates within management directory."""
... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "baseapp/views/managment_views.py",
"copies": "3",
"size": "1601",
"license": "mit",
"hash": -3242842421080081000,
"line_mean": 24.8225806452,
"line_max": 73,
"alpha_frac": 0.7008119925,
"autogenerated": false,
"ratio": 4.362397820163488,
"config_te... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Parliamentary
class ParliamentaryView(object):
model = Parliamentary
def get_template_names(self):
"""Nest templates within parliamentary directory... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "baseapp/views/parliamentary_views.py",
"copies": "3",
"size": "1670",
"license": "mit",
"hash": 2534147687650322400,
"line_mean": 25.935483871,
"line_max": 73,
"alpha_frac": 0.7131736527,
"autogenerated": false,
"ratio": 3.830275229357798,
"config_... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Religion
from django.contrib import auth, messages
class ReligionView(object):
model = Religion
def get_template_names(self):
"""Nest templates wit... | {
"repo_name": "mravikumar281/staging-server",
"path": "baseapp/views/religion_views.py",
"copies": "3",
"size": "1728",
"license": "mit",
"hash": 1158070597189687300,
"line_mean": 24.7910447761,
"line_max": 73,
"alpha_frac": 0.6793981481,
"autogenerated": false,
"ratio": 3.891891891891892,
"con... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Revenue_block
class Revenue_blockView(object):
model = Revenue_block
def get_template_names(self):
"""Nest templates within revenue_block directory... | {
"repo_name": "mravikumar281/staging-server",
"path": "baseapp/views/revenue_block_views.py",
"copies": "3",
"size": "1670",
"license": "mit",
"hash": -1999273968111254000,
"line_mean": 25.935483871,
"line_max": 73,
"alpha_frac": 0.6994011976,
"autogenerated": false,
"ratio": 3.830275229357798,
... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Schemes
from django.contrib import auth, messages
class SchemesView(object):
model = Schemes
def get_template_names(self):
"""Nest templates within... | {
"repo_name": "mravikumar281/staging-server",
"path": "baseapp/views/schemes_views.py",
"copies": "3",
"size": "1713",
"license": "mit",
"hash": -7908334717992443000,
"line_mean": 21.84,
"line_max": 73,
"alpha_frac": 0.6719206071,
"autogenerated": false,
"ratio": 4.049645390070922,
"config_test... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import School
from django.contrib import auth, messages
class SchoolView(object):
model = School
def get_template_names(self):
"""Nest templates within sc... | {
"repo_name": "tnemis/staging-server",
"path": "baseapp/views/school_views.py",
"copies": "3",
"size": "1682",
"license": "mit",
"hash": -5687774884793671000,
"line_mean": 24.1044776119,
"line_max": 73,
"alpha_frac": 0.6706302021,
"autogenerated": false,
"ratio": 4.053012048192771,
"config_test... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from baseapp.models import Taluk
class TalukView(object):
model = Taluk
def get_template_names(self):
"""Nest templates within taluk directory."""
tpl = super(TalukVi... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "baseapp/views/taluk_views.py",
"copies": "3",
"size": "1513",
"license": "mit",
"hash": -4972188015915489000,
"line_mean": 22.2769230769,
"line_max": 73,
"alpha_frac": 0.6655651024,
"autogenerated": false,
"ratio": 3.6902439024390246,
"config_test"... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from school.models import Area_classification
class Area_classificationView(object):
model = Area_classification
def get_template_names(self):
"""Nest templates within area_c... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "school/views/area_classification_views.py",
"copies": "1",
"size": "1985",
"license": "mit",
"hash": 9019251987080393000,
"line_mean": 25.8243243243,
"line_max": 77,
"alpha_frac": 0.7133501259,
"autogenerated": false,
"ratio": 4.440715883668904,
"c... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from school.models import Brc
class BrcView(object):
model = Brc
def get_template_names(self):
"""Nest templates within brc directory."""
tpl = super(BrcView, self).g... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "school/views/brc_views.py",
"copies": "1",
"size": "1601",
"license": "mit",
"hash": -5138404781535864000,
"line_mean": 20.6351351351,
"line_max": 73,
"alpha_frac": 0.6595877577,
"autogenerated": false,
"ratio": 3.784869976359338,
"config_test": fa... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from school.models import Crc
class CrcView(object):
model = Crc
def get_template_names(self):
"""Nest templates within crc directory."""
tpl = super(CrcView, self).g... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "school/views/crc_views.py",
"copies": "1",
"size": "1601",
"license": "mit",
"hash": -2371428367755814400,
"line_mean": 20.6351351351,
"line_max": 73,
"alpha_frac": 0.6595877577,
"autogenerated": false,
"ratio": 3.8578313253012047,
"config_test": f... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from school.models import School_category
class School_categoryView(object):
model = School_category
def get_template_names(self):
"""Nest templates within school_category di... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "school/views/school_category_views.py",
"copies": "1",
"size": "1954",
"license": "mit",
"hash": 6115414013509994000,
"line_mean": 25.0533333333,
"line_max": 74,
"alpha_frac": 0.6949846469,
"autogenerated": false,
"ratio": 4.037190082644628,
"confi... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from school.models import School_managed
class School_managedView(object):
model = School_managed
def get_template_names(self):
"""Nest templates within school_managed direct... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "school/views/school_managed_views.py",
"copies": "1",
"size": "1968",
"license": "mit",
"hash": 1563172048799479000,
"line_mean": 24.8947368421,
"line_max": 74,
"alpha_frac": 0.6885162602,
"autogenerated": false,
"ratio": 3.9597585513078473,
"confi... |
from django.views.generic import ListView, DetailView, CreateView, \
DeleteView, UpdateView
from school.models import School_type
class School_typeView(object):
model = School_type
def get_template_names(self):
"""Nest templates within school_type directory."""
... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "school/views/school_type_views.py",
"copies": "1",
"size": "1854",
"license": "mit",
"hash": -8927400537459995000,
"line_mean": 23.72,
"line_max": 74,
"alpha_frac": 0.6785329018,
"autogenerated": false,
"ratio": 3.830578512396694,
"config_test": fa... |
from django.views.generic import ListView, DetailView, CreateView
from braces.views import LoginRequiredMixin
from .models import Articulo, Categoria
"""
## TODO ##
1. Hace falta la vista que permita editar los articulos creados para que sean
actualizados.
2. Hace falta crear vistas para CRUD de las categorias.
3. Cre... | {
"repo_name": "fullprogramaciondev/portal",
"path": "blog/views.py",
"copies": "1",
"size": "2425",
"license": "bsd-3-clause",
"hash": 2735452157192195600,
"line_mean": 36.3076923077,
"line_max": 78,
"alpha_frac": 0.7290721649,
"autogenerated": false,
"ratio": 3.0388471177944862,
"config_test":... |
from django.views.generic import ListView, DetailView, CreateView
from braces.views import LoginRequiredMixin
from .models import Pregunta, Respuesta
class CrearPregunta(LoginRequiredMixin, CreateView):
'''Vista usando concepto de 'Class Based Views' para registrar y publicar,
una pregunta de forma abierta en... | {
"repo_name": "andresgz/portal",
"path": "forum/views.py",
"copies": "1",
"size": "1048",
"license": "bsd-3-clause",
"hash": 5970748141318956000,
"line_mean": 25.8717948718,
"line_max": 79,
"alpha_frac": 0.733778626,
"autogenerated": false,
"ratio": 3.2048929663608563,
"config_test": false,
"... |
from django.views.generic import ListView, DetailView, CreateView
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.template import RequestContext
from django.shortcuts import render_to_response
from braces.views import LoginRequiredMixin
from .models import Articulo, Categoria
"""
#... | {
"repo_name": "andresgz/portal",
"path": "blog/views.py",
"copies": "1",
"size": "3817",
"license": "bsd-3-clause",
"hash": -5846103803937501000,
"line_mean": 35.3523809524,
"line_max": 77,
"alpha_frac": 0.7057898873,
"autogenerated": false,
"ratio": 3.196817420435511,
"config_test": false,
"... |
from django.views.generic import ListView, DetailView, CreateView
from django.shortcuts import get_object_or_404
from dynoforms.models import Schema, Entry
from dynoforms.forms import DynoForm
class Schemes(ListView):
model = Schema
template_name = 'dynoforms/schemes.html'
context_object_name = 'schemes'
... | {
"repo_name": "johnnywell/django-dynoforms",
"path": "dynoforms/views.py",
"copies": "1",
"size": "1075",
"license": "mit",
"hash": 8004374826637708000,
"line_mean": 28.8611111111,
"line_max": 75,
"alpha_frac": 0.6558139535,
"autogenerated": false,
"ratio": 3.6317567567567566,
"config_test": fa... |
from django.views.generic import ListView, DetailView, CreateView
from braces.views import LoginRequiredMixin
from .models import Thread, Comment
from .forms import ThreadForm
from ekratia.threads.forms import ThreadCommentForm
class ThreadListView(ListView):
"""
List of Threads
"""
model = Thread
... | {
"repo_name": "andresgz/ekratia",
"path": "ekratia/conversations/views.py",
"copies": "1",
"size": "1674",
"license": "bsd-3-clause",
"hash": -2912206074364524000,
"line_mean": 27.3728813559,
"line_max": 74,
"alpha_frac": 0.6391875747,
"autogenerated": false,
"ratio": 4.216624685138539,
"config... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView, FormView
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse
from django.conf import settings
from django.http import HttpResponseRedirect
from django.short... | {
"repo_name": "vIiRuS/Lagerregal",
"path": "network/views.py",
"copies": "1",
"size": "8381",
"license": "bsd-3-clause",
"hash": 4369176934197961700,
"line_mean": 41.9794871795,
"line_max": 119,
"alpha_frac": 0.6224794177,
"autogenerated": false,
"ratio": 4.2285570131180625,
"config_test": fals... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
from django.urls import reverse_lazy, reverse
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db.models import Q
from devicegroups.models import Devicegroup
from devices.models... | {
"repo_name": "vIiRuS/Lagerregal",
"path": "devicegroups/views.py",
"copies": "1",
"size": "6638",
"license": "bsd-3-clause",
"hash": 8652116370357219000,
"line_mean": 39.7239263804,
"line_max": 109,
"alpha_frac": 0.657276288,
"autogenerated": false,
"ratio": 4.30200907323396,
"config_test": fa... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
from django.views.generic.list import MultipleObjectTemplateResponseMixin, BaseListView
from django.views.generic.detail import SingleObjectTemplateResponseMixin, BaseDetailView
from django.db import models
from django import http... | {
"repo_name": "udbhav/eurorack-planner",
"path": "source/apps/modules/views.py",
"copies": "1",
"size": "7282",
"license": "mit",
"hash": -4572547684446600700,
"line_mean": 34.3495145631,
"line_max": 89,
"alpha_frac": 0.6432298819,
"autogenerated": false,
"ratio": 4.102535211267606,
"config_tes... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView, View
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from django.urls import reverse_lazy, re... | {
"repo_name": "vIiRuS/Lagerregal",
"path": "devicetypes/views.py",
"copies": "1",
"size": "9941",
"license": "bsd-3-clause",
"hash": -3356828122650028000,
"line_mean": 39.9094650206,
"line_max": 118,
"alpha_frac": 0.6140227341,
"autogenerated": false,
"ratio": 4.3831569664903,
"config_test": fa... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView, View
from django.urls import reverse_lazy, reverse
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_4... | {
"repo_name": "vIiRuS/Lagerregal",
"path": "locations/views.py",
"copies": "1",
"size": "6587",
"license": "bsd-3-clause",
"hash": -8402794044364295000,
"line_mean": 42.9133333333,
"line_max": 117,
"alpha_frac": 0.631091544,
"autogenerated": false,
"ratio": 4.206257982120051,
"config_test": fal... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, FormView, RedirectView
from django.contrib.auth.mixins import LoginRequiredMixin
from sound.models import Sound, Author, Request, ArtistRequest
from sound.forms import RequestForm
from django.http import Http404
from django.shortcuts import ... | {
"repo_name": "Jafte/RTTTM",
"path": "sound/views.py",
"copies": "1",
"size": "5193",
"license": "mit",
"hash": -7950387187315331000,
"line_mean": 31.2546583851,
"line_max": 118,
"alpha_frac": 0.6576160216,
"autogenerated": false,
"ratio": 3.7849854227405246,
"config_test": false,
"has_no_key... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView
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 .models import Photo, Album
@method_decorator(login_require... | {
"repo_name": "steventhan/django-imager",
"path": "imagersite/imager_images/views.py",
"copies": "1",
"size": "3539",
"license": "mit",
"hash": 7776779756244284000,
"line_mean": 32.3867924528,
"line_max": 96,
"alpha_frac": 0.6931336536,
"autogenerated": false,
"ratio": 3.6864583333333334,
"conf... |
from django.views.generic import ListView, DetailView, CreateView, UpdateView, TemplateView, View
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.urls import reverse
from django.shortcuts import get_object_or_404
from django.core.exceptions import PermissionDenied
from django.... | {
"repo_name": "Jafte/jasn.ru",
"path": "blog/views.py",
"copies": "1",
"size": "5771",
"license": "mit",
"hash": 3323902138569297000,
"line_mean": 30.8839779006,
"line_max": 97,
"alpha_frac": 0.6284872639,
"autogenerated": false,
"ratio": 3.9019607843137254,
"config_test": false,
"has_no_keyw... |
from django.views.generic import ListView, DetailView, CreateView, View
from django.core.exceptions import ObjectDoesNotExist
from braces.views import LoginRequiredMixin, AjaxResponseMixin, \
JSONResponseMixin
from .forms import AgencyReviewForm
from .models import AgencyReview, AgencyReviewVote, AgencyReviewScor... | {
"repo_name": "borfast/housing-reviews",
"path": "reviews/views.py",
"copies": "1",
"size": "4355",
"license": "mit",
"hash": 1854797953463829500,
"line_mean": 33.2913385827,
"line_max": 79,
"alpha_frac": 0.6211251435,
"autogenerated": false,
"ratio": 3.91636690647482,
"config_test": false,
"... |
from django.views.generic import ListView, DetailView, FormView
from django.contrib.auth.models import User
from django.contrib.auth.mixins import LoginRequiredMixin
from django.shortcuts import get_object_or_404, redirect
from django.http import Http404
from .forms import ProfileForm, WantToReadForm
from .models impor... | {
"repo_name": "Jafte/RTTTM",
"path": "user_profile/views.py",
"copies": "1",
"size": "4571",
"license": "mit",
"hash": -3630131832574134300,
"line_mean": 27.9303797468,
"line_max": 81,
"alpha_frac": 0.6230584117,
"autogenerated": false,
"ratio": 3.7072181670721815,
"config_test": false,
"has_... |
from django.views.generic import ListView, DetailView, FormView
from django.core.urlresolvers import reverse, reverse_lazy
from django.http import HttpResponseRedirect
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
from forums.forms import TopicCreateForm, PostCreateForm
fr... | {
"repo_name": "byteweaver/django-forums",
"path": "forums/views.py",
"copies": "2",
"size": "3004",
"license": "bsd-3-clause",
"hash": 7560699061879966000,
"line_mean": 35.1927710843,
"line_max": 97,
"alpha_frac": 0.6737683089,
"autogenerated": false,
"ratio": 3.7881462799495584,
"config_test":... |
from django.views.generic import ListView, DetailView, FormView, TemplateView
from django.contrib.auth.models import User
from django.contrib.auth.mixins import LoginRequiredMixin
from user_profile.forms import UserForm
from django.urls import reverse
from django.conf import settings
from blog.models import Blog
from a... | {
"repo_name": "Jafte/jasn.ru",
"path": "user_profile/views.py",
"copies": "1",
"size": "2767",
"license": "mit",
"hash": -8184961899279855000,
"line_mean": 34.9350649351,
"line_max": 97,
"alpha_frac": 0.6920852909,
"autogenerated": false,
"ratio": 3.8112947658402203,
"config_test": false,
"ha... |
from django.views.generic import ListView, DetailView, MonthArchiveView
from django import forms
from .models import Post
class ListMixin(object):
paginate_by = 5
context_object_name = 'posts'
template_name = 'blog/post_list_view.html'
def get_queryset(self):
tag = self.request.GET.get('tag'... | {
"repo_name": "divisible-by-hero/dbh-blog",
"path": "blog/views.py",
"copies": "1",
"size": "1074",
"license": "bsd-3-clause",
"hash": -1449683677619535400,
"line_mean": 23.976744186,
"line_max": 72,
"alpha_frac": 0.6685288641,
"autogenerated": false,
"ratio": 3.703448275862069,
"config_test": ... |
from django.views.generic import ListView, DetailView, MonthArchiveView
from .models import Gallery, Photo
class StaffAccessMixin(object):
"""
Allow staff members to see all galleries, including drafts.
"""
def get_queryset(self):
if self.request.user.is_staff:
return Gallery.obj... | {
"repo_name": "zsiciarz/django-pgallery",
"path": "pgallery/views.py",
"copies": "1",
"size": "1483",
"license": "mit",
"hash": -2315318128556183600,
"line_mean": 25.0175438596,
"line_max": 74,
"alpha_frac": 0.6729602158,
"autogenerated": false,
"ratio": 3.7075,
"config_test": false,
"has_no_... |
from django.views.generic import ListView, DetailView, MonthArchiveView
from .models import Post
class ListMixin(object):
paginate_by = 5
context_object_name = 'posts'
template_name = 'blog/post_list_view.html'
def get_queryset(self):
tag = self.request.GET.get('tag', None)
if tag:
... | {
"repo_name": "divisible-by-hero/RefreshMint",
"path": "refreshmint/blog/views.py",
"copies": "1",
"size": "1045",
"license": "mit",
"hash": -8082647782732905000,
"line_mean": 23.3023255814,
"line_max": 72,
"alpha_frac": 0.6631578947,
"autogenerated": false,
"ratio": 3.6925795053003534,
"config... |
from django.views.generic import ListView, DetailView
from django.conf import settings
from django.http import Http404
from django.core.paginator import (
Paginator,
EmptyPage,
PageNotAnInteger,
)
from .models import Entry
class EntryListView(ListView):
template_name = 'blog/entry_list.html'
de... | {
"repo_name": "bwarren2/django-basic-blog",
"path": "blog/views.py",
"copies": "1",
"size": "1596",
"license": "mit",
"hash": 3185441892244534000,
"line_mean": 25.1639344262,
"line_max": 54,
"alpha_frac": 0.5657894737,
"autogenerated": false,
"ratio": 4.050761421319797,
"config_test": false,
... |
from django.views.generic import ListView, DetailView
from django.core.exceptions import ObjectDoesNotExist
from competition.models.competition_model import Competition
class CompetitionListView(ListView):
"""Lists every single competition"""
context_object_name = 'competitions'
model = Competition
t... | {
"repo_name": "michaelwisely/django-competition",
"path": "src/competition/views/competition_views.py",
"copies": "1",
"size": "1178",
"license": "bsd-3-clause",
"hash": 4439033299746997000,
"line_mean": 34.696969697,
"line_max": 80,
"alpha_frac": 0.69524618,
"autogenerated": false,
"ratio": 3.88... |
from django.views.generic import ListView, DetailView
from django.db.models import Q
from .models import Information
class IndexView(ListView):
paginate_by = 6
template_name = 'information/index.html'
def get_queryset(self):
queryset = Information.objects.all()
tag = self.kwargs.get('tag'... | {
"repo_name": "VictorArnaud/sitepet",
"path": "information/views.py",
"copies": "2",
"size": "1156",
"license": "mpl-2.0",
"hash": -988918535115825900,
"line_mean": 29.4210526316,
"line_max": 65,
"alpha_frac": 0.6098615917,
"autogenerated": false,
"ratio": 4.345864661654136,
"config_test": fals... |
from django.views.generic import ListView, DetailView
from django.db.models import Q
from oscar_sagepay import models
from . import forms
class Transactions(ListView):
model = models.RequestResponse
context_object_name = 'transactions'
template_name = 'sagepay/dashboard/request_list.html'
paginate_by... | {
"repo_name": "django-oscar/django-oscar-sagepay-direct",
"path": "oscar_sagepay/dashboard/views.py",
"copies": "1",
"size": "1351",
"license": "bsd-3-clause",
"hash": 8422364454013887000,
"line_mean": 31.9512195122,
"line_max": 79,
"alpha_frac": 0.6461880089,
"autogenerated": false,
"ratio": 3.7... |
from django.views.generic import ListView, DetailView
from django.http import Http404
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from ..models.club import Club
from ..util import vote_available
class ClubListVi... | {
"repo_name": "hangpark/kaistusc",
"path": "apps/ot/views/club.py",
"copies": "1",
"size": "2413",
"license": "bsd-2-clause",
"hash": -3770471392377494500,
"line_mean": 29.3552631579,
"line_max": 81,
"alpha_frac": 0.5951452102,
"autogenerated": false,
"ratio": 3.1175675675675674,
"config_test":... |
from django.views.generic import ListView, DetailView
from django.http import HttpResponseRedirect
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.db.models import Q
from .models import Detector, AbuseReport
from .forms import AbuseReportForm
class DetectorList(ListView):
... | {
"repo_name": "mingot/detectme_server",
"path": "detectme/detectors/views.py",
"copies": "1",
"size": "2739",
"license": "mit",
"hash": 7660493186154834000,
"line_mean": 33.6708860759,
"line_max": 112,
"alpha_frac": 0.6498722161,
"autogenerated": false,
"ratio": 4.039823008849558,
"config_test"... |
from django.views.generic import ListView, DetailView
from django.shortcuts import get_object_or_404
from django.conf import settings
from .models import Question, Category
class QuestionDetailView(DetailView):
model = Question
class QuestionListView(ListView):
def get_paginate_by(self, queryset):
... | {
"repo_name": "waustin/django-simple-faq",
"path": "faq/views.py",
"copies": "1",
"size": "1054",
"license": "bsd-3-clause",
"hash": 5682437126710108000,
"line_mean": 34.1333333333,
"line_max": 126,
"alpha_frac": 0.6869070209,
"autogenerated": false,
"ratio": 4.199203187250996,
"config_test": f... |
from django.views.generic import ListView, DetailView
from django.shortcuts import get_object_or_404
from django.conf import settings
from nomadblog.models import Blog, BlogUser, Category
from nomadblog.utils import get_post_model
multiblog = getattr(settings, 'NOMADBLOG_MULTIPLE_BLOGS', False)
DEFAULT_STATUS = geta... | {
"repo_name": "Nomadblue/django-nomad-blog",
"path": "nomadblog/views.py",
"copies": "1",
"size": "3310",
"license": "bsd-3-clause",
"hash": -4180583888498752500,
"line_mean": 38.8795180723,
"line_max": 106,
"alpha_frac": 0.6891238671,
"autogenerated": false,
"ratio": 3.685968819599109,
"config... |
from django.views.generic import ListView, DetailView
from django.shortcuts import get_object_or_404
from django.conf import settings
from nomadblog.models import Blog, Category
from nomadblog import get_post_model
DEFAULT_STATUS = getattr(settings, 'PUBLIC_STATUS', 0)
POST_MODEL = get_post_model()
class NomadBlog... | {
"repo_name": "Nomadblue/django-nomad-country-blogs",
"path": "nomadblog/views.py",
"copies": "1",
"size": "2404",
"license": "bsd-3-clause",
"hash": 4908811221509147000,
"line_mean": 35.4242424242,
"line_max": 139,
"alpha_frac": 0.6876039933,
"autogenerated": false,
"ratio": 3.434285714285714,
... |
from django.views.generic import ListView, DetailView
from django.shortcuts import get_object_or_404, redirect
from django.contrib.auth import logout
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Podcast, PodcastPart
def logout_view(request):
if request.user.is_authenticated():
... | {
"repo_name": "AccuraGit/PodcastPlatform",
"path": "podcast/views.py",
"copies": "1",
"size": "1039",
"license": "mit",
"hash": 5154739179628582000,
"line_mean": 28.6857142857,
"line_max": 93,
"alpha_frac": 0.7131857555,
"autogenerated": false,
"ratio": 3.645614035087719,
"config_test": false,
... |
from django.views.generic import ListView, DetailView
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from .models import Course, Lecture, Exercise
class CourseList(ListView):
model = Course
context_object_name = 'course_list'
def get_queryset... | {
"repo_name": "mingot/datacademy_django",
"path": "datacademy/courses/views.py",
"copies": "1",
"size": "2678",
"license": "mit",
"hash": 5985397212930567000,
"line_mean": 31.6585365854,
"line_max": 73,
"alpha_frac": 0.6557132188,
"autogenerated": false,
"ratio": 4.027067669172932,
"config_test... |
from django.views.generic import ListView, DetailView
from django.shortcuts import redirect, get_object_or_404
from achievement import models
class StudentsListView(ListView):
model = models.Student
class StudentsGroupDetailView(DetailView):
model = models.StudentsGroup
def get_context_data(self, **kwa... | {
"repo_name": "Alt90/Student_progress_bar",
"path": "achievement/views.py",
"copies": "1",
"size": "1246",
"license": "mit",
"hash": -8763540531160094000,
"line_mean": 34.6285714286,
"line_max": 83,
"alpha_frac": 0.6869983949,
"autogenerated": false,
"ratio": 3.9808306709265175,
"config_test": ... |
from django.views.generic import ListView, DetailView
from django.shortcuts import render, get_object_or_404
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from .models import Category, Article
from django.db.models import Count, DateTimeField
from django.db.models.functions import Trunc, Trun... | {
"repo_name": "andrewnsk/dorokhin.moscow",
"path": "blog/views.py",
"copies": "1",
"size": "7457",
"license": "mit",
"hash": -3970018632228309500,
"line_mean": 37.241025641,
"line_max": 96,
"alpha_frac": 0.6687676009,
"autogenerated": false,
"ratio": 3.7891260162601625,
"config_test": false,
... |
from django.views.generic import ListView, DetailView
from django.shortcuts import render, get_object_or_404
from django.utils import translation
from django.http import HttpResponseRedirect
from django.views.decorators.http import require_POST
from .models import BlogPost
from taggit.models import Tag
from .forms impo... | {
"repo_name": "censurfridns/blog.censurfridns.dk",
"path": "src/blog/views.py",
"copies": "1",
"size": "2058",
"license": "bsd-3-clause",
"hash": -214099703198742500,
"line_mean": 27.1917808219,
"line_max": 77,
"alpha_frac": 0.675898931,
"autogenerated": false,
"ratio": 3.804066543438078,
"conf... |
from django.views.generic import ListView, DetailView
from django.shortcuts import render, get_object_or_404
from .models import Post, Category
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
class PublishedPostsMixin(object):
def get_queryset(self):
return(self.model.objects.live... | {
"repo_name": "mmitucha/blavanet-web",
"path": "blog/views.py",
"copies": "1",
"size": "2508",
"license": "mit",
"hash": -7628983712928116000,
"line_mean": 30.35,
"line_max": 78,
"alpha_frac": 0.6686602871,
"autogenerated": false,
"ratio": 3.67203513909224,
"config_test": false,
"has_no_keywo... |
from django.views.generic import ListView, DetailView
from django.shortcuts import render, redirect
from django.db import models
from models import Raw_Uploaded_Data, Patient_Identifier, Patient, Transplant_Type, Patient_Transplant
class DataAnalysisDetailView(DetailView):
model = Raw_Uploaded_Data
template_... | {
"repo_name": "hizni/vod-systems",
"path": "vod_systems/vod/data_views.py",
"copies": "1",
"size": "7268",
"license": "mit",
"hash": -6298990440486506000,
"line_mean": 46.8157894737,
"line_max": 137,
"alpha_frac": 0.528893781,
"autogenerated": false,
"ratio": 4.349491322561341,
"config_test": f... |
from django.views.generic import ListView, DetailView
from django.views.generic.base import View
from django.shortcuts import render
from django.template import RequestContext
from btblog.models import Entry
class EntryList(ListView):
model = Entry
template_name = "btblog/entry_list.html"
paginate_by = 1... | {
"repo_name": "petroleyum/btBlog",
"path": "btproject/btblog/views.py",
"copies": "1",
"size": "1289",
"license": "mit",
"hash": -3358635236393664500,
"line_mean": 27.0434782609,
"line_max": 69,
"alpha_frac": 0.6524437548,
"autogenerated": false,
"ratio": 3.8363095238095237,
"config_test": fals... |
from django.views.generic import ListView, DetailView
from django.views.generic.edit import CreateView, DeleteView
from django.contrib.messages.views import SuccessMessageMixin
from django.contrib import messages
from django.shortcuts import render
from django.forms import inlineformset_factory, modelformset_factory, T... | {
"repo_name": "joehalloran/shoppinglist_project",
"path": "shoppinglist/lists/views.py",
"copies": "1",
"size": "5771",
"license": "apache-2.0",
"hash": 1486659190448361200,
"line_mean": 33.3571428571,
"line_max": 109,
"alpha_frac": 0.7225784093,
"autogenerated": false,
"ratio": 3.613650594865372... |
from django.views.generic import ListView, DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from remote_jobs.models import... | {
"repo_name": "ryanroser/ecliptic",
"path": "ecliptic/remote_jobs/views.py",
"copies": "1",
"size": "3530",
"license": "mit",
"hash": -2485236522413588500,
"line_mean": 33.2718446602,
"line_max": 85,
"alpha_frac": 0.6589235127,
"autogenerated": false,
"ratio": 3.8162162162162163,
"config_test":... |
from django.views.generic import ListView, DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.utils.decorators import method_decorator
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.auth.decorators import login_required
from models import *
fr... | {
"repo_name": "Etxea/gestion_eide_web",
"path": "alumnos/views.py",
"copies": "1",
"size": "3114",
"license": "mit",
"hash": -418431665651993340,
"line_mean": 34.3863636364,
"line_max": 72,
"alpha_frac": 0.706807964,
"autogenerated": false,
"ratio": 3.5386363636363636,
"config_test": false,
"... |
from django.views.generic import ListView, DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.views.generic.base import RedirectView
from django.core.urlresolvers import reverse, reverse_lazy
from .forms import ItemForm
from .models import ItemModel
class ItemList(ListVie... | {
"repo_name": "thinkAmi-sandbox/Django_Class_based_view_Sample",
"path": "myapp/views.py",
"copies": "1",
"size": "1429",
"license": "unlicense",
"hash": -4601092725830618600,
"line_mean": 25.693877551,
"line_max": 122,
"alpha_frac": 0.7299158378,
"autogenerated": false,
"ratio": 3.21130221130221... |
from django.views.generic import ListView, DetailView
from .models import Link, UserProfile
from .forms import UserProfileForm
from django.contrib.auth import get_user_model
from django.views.generic.edit import UpdateView
from django.core.urlresolvers import reverse
class LinkListView(ListView):
model = Link
... | {
"repo_name": "arocks/steel-rumors",
"path": "links/views.py",
"copies": "1",
"size": "1055",
"license": "mit",
"hash": -7527969218266498000,
"line_mean": 30.9696969697,
"line_max": 75,
"alpha_frac": 0.727014218,
"autogenerated": false,
"ratio": 3.9365671641791047,
"config_test": false,
"has_... |
from django.views.generic import ListView, DetailView
from text.models import Text, Author, Category
from django.shortcuts import get_object_or_404
from pure_pagination.mixins import PaginationMixin
class AuthorList(PaginationMixin, ListView):
model = Author
template_name = "text/author_list.html"
context... | {
"repo_name": "Jafte/RTTTM",
"path": "text/views.py",
"copies": "1",
"size": "1804",
"license": "mit",
"hash": 4515378860764869600,
"line_mean": 28.0967741935,
"line_max": 94,
"alpha_frac": 0.6757206208,
"autogenerated": false,
"ratio": 3.8059071729957807,
"config_test": false,
"has_no_keywor... |
from django.views.generic import ListView, DetailView
from amanda.core.views import AppView, CacheView
from amanda.product.models import Product, ServiceProduct
from amanda.product.utils import products_by_category, service_products_by_category
from amanda.resources.models import Video, CaseStudy, Documentation, Ebook... | {
"repo_name": "AmandaCMS/amanda-cms",
"path": "amanda/product/views.py",
"copies": "1",
"size": "2815",
"license": "mit",
"hash": 2246181992358907600,
"line_mean": 29.597826087,
"line_max": 88,
"alpha_frac": 0.6465364121,
"autogenerated": false,
"ratio": 4.103498542274052,
"config_test": false,... |
from django.views.generic import ListView, DetailView
from amanda.core.views import AppView, CacheView
from amanda.resources.models import Ebook, Video, Documentation, CaseStudy
# from amanda.product.utils import products_by_category, service_products_by_category
class EbookListView(AppView, CacheView, ListView):
... | {
"repo_name": "AmandaCMS/amanda-cms",
"path": "amanda/resources/views.py",
"copies": "1",
"size": "2006",
"license": "mit",
"hash": -8887427253285146000,
"line_mean": 29.8615384615,
"line_max": 85,
"alpha_frac": 0.6640079761,
"autogenerated": false,
"ratio": 3.820952380952381,
"config_test": fa... |
from django.views.generic import ListView, DetailView
from blog.models import Post
class NoPostMsgMixin(object):
no_post_message = 'Sorry, no posts found.'
def get_context_data(self, **kwargs):
""" Get the context for this view. Add No Post Message. """
context = super(NoPostMsgMixin, self).g... | {
"repo_name": "JTarball/docker-django-polymer-starter-kit",
"path": "docker/app/app/backend/apps/_archive/blog_old/views.py",
"copies": "8",
"size": "1882",
"license": "isc",
"hash": -1131488255291553000,
"line_mean": 25.8857142857,
"line_max": 84,
"alpha_frac": 0.6902231668,
"autogenerated": false... |
from django.views.generic import ListView, DetailView
from .forms import OrganisationSearchForm
from .models import Organisation
class OrganisationSearchView(ListView):
template_name = 'justizgelder/search.html'
paginate_by = 25
def get_queryset(self):
self.form = OrganisationSearchForm(self.req... | {
"repo_name": "correctiv/correctiv-justizgelder",
"path": "correctiv_justizgelder/views.py",
"copies": "1",
"size": "1160",
"license": "mit",
"hash": -3352435945572827600,
"line_mean": 33.1176470588,
"line_max": 76,
"alpha_frac": 0.6732758621,
"autogenerated": false,
"ratio": 3.986254295532646,
... |
from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
"""Base Post List View."""
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.published()
class... | {
"repo_name": "bunchesofdonald/django-hermes",
"path": "hermes/views.py",
"copies": "1",
"size": "1227",
"license": "mit",
"hash": -2115968082101661200,
"line_mean": 27.5348837209,
"line_max": 77,
"alpha_frac": 0.6748166259,
"autogenerated": false,
"ratio": 3.7753846153846156,
"config_test": fa... |
from django.views.generic import ListView, DetailView
from .models import Post
class PostListView(ListView):
context_object_name = 'posts'
model = Post
template_name = 'hermes/post_list.html'
def get_queryset(self):
return self.model.objects.order_by('created_on')
class CategoryPostLis... | {
"repo_name": "emilian/django-hermes",
"path": "hermes/views.py",
"copies": "1",
"size": "1281",
"license": "mit",
"hash": -553974626208105600,
"line_mean": 25.6875,
"line_max": 77,
"alpha_frac": 0.6588602654,
"autogenerated": false,
"ratio": 3.7565982404692084,
"config_test": false,
"has_no_... |
from django.views.generic import ListView, DetailView
from simplestore.cart.forms import AddToCartForm
from .models.product import Product, Category
class CategoryDetailView(DetailView):
model = Category
slug_url_kwarg = 'category_slug'
template_name = "category_detail.html"
def get_context_data(sel... | {
"repo_name": "martinstastny/django-simple-ecommerce",
"path": "simplestore/products/views.py",
"copies": "2",
"size": "1074",
"license": "mit",
"hash": 8908547030083438000,
"line_mean": 27.2631578947,
"line_max": 76,
"alpha_frac": 0.677839851,
"autogenerated": false,
"ratio": 4.228346456692913,
... |
from django.views.generic import ListView, DetailView, RedirectView
from django.http import Http404
from amanda.core.views import AppView, CacheView
from amanda.articles.models import Article, Author
from amanda.taxonomy.models import ContentCategory
from amanda.taxonomy.views import ContentCategoryListView, TagListVi... | {
"repo_name": "AmandaCMS/amanda-cms",
"path": "amanda/articles/views.py",
"copies": "1",
"size": "4906",
"license": "mit",
"hash": -2800956338873217000,
"line_mean": 28.7333333333,
"line_max": 107,
"alpha_frac": 0.620057073,
"autogenerated": false,
"ratio": 4.295971978984238,
"config_test": fal... |
from django.views.generic import ListView, DetailView
from cyndiloza.apps.news.models import Article, Publication
from cyndiloza.apps.places.models import Place
class PlaceLatestFeedView(ListView):
queryset = Article.objects.filter(published=True).filter(place__isnull=False)[0:25]
template_name = 'pl... | {
"repo_name": "richardcornish/cyndiloza",
"path": "cyndiloza/apps/places/views.py",
"copies": "1",
"size": "1429",
"license": "bsd-3-clause",
"hash": -5320078184430495000,
"line_mean": 32.0238095238,
"line_max": 135,
"alpha_frac": 0.7151854444,
"autogenerated": false,
"ratio": 3.645408163265306,
... |
from django.views.generic import ListView, DetailView, TemplateView
# from django.views.generic import TemplateView, RedirectView, CreateView
# from django.views.generic import UpdateView, DeleteView
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from django.shortcuts import get_list... | {
"repo_name": "robjordan/unesco_project",
"path": "unesco/whsites/views.py",
"copies": "1",
"size": "3453",
"license": "apache-2.0",
"hash": 2565336282958707000,
"line_mean": 34.2346938776,
"line_max": 83,
"alpha_frac": 0.6550825369,
"autogenerated": false,
"ratio": 3.937286202964652,
"config_t... |
from django.views.generic import ListView, DetailView, TemplateView
from models import Blog, Tag
from django.db.models import Count
# from django.core.cache import cache
#Creating footer Mixin
class Footer(object):
def data(self):
footer = {}
queryset = Blog.objects.all().filter(published=True)
... | {
"repo_name": "varunsagi20/varunmehta.me",
"path": "blog_app/views.py",
"copies": "1",
"size": "2092",
"license": "mit",
"hash": -7894344512889696000,
"line_mean": 32.7580645161,
"line_max": 95,
"alpha_frac": 0.6644359465,
"autogenerated": false,
"ratio": 3.702654867256637,
"config_test": false... |
from django.views.generic import ListView, DetailView, TemplateView
from models import *
from django.core.exceptions import ObjectDoesNotExist
from django.core.cache import cache
from django.http import HttpResponse, HttpResponseRedirect, Http404
import json
import sys
from links.models import Link
class LobbyistsInd... | {
"repo_name": "navotsil/Open-Knesset",
"path": "lobbyists/views.py",
"copies": "3",
"size": "6708",
"license": "bsd-3-clause",
"hash": -385542947654117400,
"line_mean": 42.2774193548,
"line_max": 142,
"alpha_frac": 0.6623434705,
"autogenerated": false,
"ratio": 3.8441260744985675,
"config_test"... |
from django.views.generic import ListView,DetailView,TemplateView,UpdateView,CreateView
from django.shortcuts import get_object_or_404
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.core.context_processors import csrf
from django... | {
"repo_name": "hydroshare/hydroshare_temp",
"path": "hs_party/views/organizationassociation.py",
"copies": "1",
"size": "1949",
"license": "bsd-3-clause",
"hash": 2355746200647722500,
"line_mean": 37.98,
"line_max": 87,
"alpha_frac": 0.7696254489,
"autogenerated": false,
"ratio": 4.78869778869778... |
from django.views.generic import ListView, DetailView, UpdateView, CreateView
# from django.views.generic import TemplateView, RedirectView, DeleteView
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.auth.decorators import login_required
from django.core.exceptions import PermissionDenied... | {
"repo_name": "robjordan/unesco_project",
"path": "unesco/members/views.py",
"copies": "1",
"size": "1532",
"license": "apache-2.0",
"hash": 5707292987570083000,
"line_mean": 27.3703703704,
"line_max": 77,
"alpha_frac": 0.7545691906,
"autogenerated": false,
"ratio": 4.3154929577464785,
"config_... |
from django.views.generic import ListView, DetailView, UpdateView
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, Http404
from django.contrib import messages
from django.contrib.formtools.wizard.views import SessionWizardView
from .mixins import EditorCheckMixin, HaystackSearc... | {
"repo_name": "nikdoof/vapemap",
"path": "app/stores/views/stores.py",
"copies": "1",
"size": "3492",
"license": "bsd-3-clause",
"hash": -7807983057145401000,
"line_mean": 31.3425925926,
"line_max": 112,
"alpha_frac": 0.6649484536,
"autogenerated": false,
"ratio": 3.9368658399098084,
"config_te... |
from django.views.generic import ListView, DetailView, View
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from taggit.models import Tag
from braces.views import JSONResponseMixin
from models import Knot, CreatorProfile
from .forms import LinkFormset, Kn... | {
"repo_name": "althalus/knotcrafters",
"path": "knotdirectory/knotdirectory/knots/views.py",
"copies": "1",
"size": "2124",
"license": "mit",
"hash": -6603715225127014000,
"line_mean": 27.7027027027,
"line_max": 69,
"alpha_frac": 0.7015065913,
"autogenerated": false,
"ratio": 3.840867992766727,
... |
from django.views.generic import ListView, FormView, CreateView
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from infuse.auth.permissions import LoginRequiredMixin
from .models import Feed, FeedItem, Category
from .forms import AddFeedForm, ImportFeedForm
from .google_take... | {
"repo_name": "gotlium/django-feedme",
"path": "feedme/views.py",
"copies": "1",
"size": "2345",
"license": "mit",
"hash": 6951864461359871000,
"line_mean": 32.5,
"line_max": 75,
"alpha_frac": 0.6699360341,
"autogenerated": false,
"ratio": 3.9411764705882355,
"config_test": false,
"has_no_key... |
from django.views.generic import ListView, \
CreateView, \
UpdateView, \
DeleteView, \
DetailView
from django.core.urlresolvers import reverse
from contacts.models import Contact
from contacts.forms import ContactForm, ContactAddressFormSet
# Create your views here.
class ListContactView(ListView):
... | {
"repo_name": "Victory/first-django",
"path": "addressbook/contacts/views.py",
"copies": "1",
"size": "1825",
"license": "mit",
"hash": -4500315955980801500,
"line_mean": 21.256097561,
"line_max": 75,
"alpha_frac": 0.6657534247,
"autogenerated": false,
"ratio": 4.1289592760181,
"config_test": f... |
from django.views.generic import ListView
from datetime import datetime
from django.shortcuts import redirect
from website.project.model import Node
from modularodm import Q
from admin.base.views import GuidFormView, GuidView
from admin.nodes.templatetags.node_extras import reverse_node
from .serializers import seria... | {
"repo_name": "billyhunt/osf.io",
"path": "admin/nodes/views.py",
"copies": "1",
"size": "1866",
"license": "apache-2.0",
"hash": -9103810599241163000,
"line_mean": 26.4411764706,
"line_max": 74,
"alpha_frac": 0.6650589496,
"autogenerated": false,
"ratio": 3.64453125,
"config_test": false,
"h... |
from django.views.generic import ListView
from discuss.apps.discuss.models import Question
from discuss.apps.users.models import User
class IndexView(ListView):
template_name = 'index.html'
# con model jalamos todo el objeto
# model = Question
context_object_name = 'question_list'
# pero nosotros... | {
"repo_name": "brapastor/djdiscuss",
"path": "discuss/discuss/apps/home/views.py",
"copies": "1",
"size": "1308",
"license": "mit",
"hash": 5340866341769413000,
"line_mean": 39.875,
"line_max": 109,
"alpha_frac": 0.6987767584,
"autogenerated": false,
"ratio": 3.5161290322580645,
"config_test": ... |
from django.views.generic import ListView
from django.conf.urls import patterns, include, url
from django.contrib import admin
from stats import views
from stats.models import Country
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'lgbtstats.views.home', name='home'),
# url(r'^blog/', include('blog.ur... | {
"repo_name": "arnoldtan/cep_2015_sem2_assign2",
"path": "lgbtstats/urls.py",
"copies": "2",
"size": "1407",
"license": "apache-2.0",
"hash": 1138454687905770200,
"line_mean": 35.0769230769,
"line_max": 99,
"alpha_frac": 0.6019900498,
"autogenerated": false,
"ratio": 3.4655172413793105,
"config... |
from django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.http import HttpResponseForbidden
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import rev... | {
"repo_name": "tabdon/crmeasy-deploy-build",
"path": "crmapp/accounts/views.py",
"copies": "2",
"size": "2887",
"license": "mit",
"hash": 9161256306837945000,
"line_mean": 29.0729166667,
"line_max": 74,
"alpha_frac": 0.6536196744,
"autogenerated": false,
"ratio": 4.315396113602391,
"config_test... |
from django.views.generic import ListView
from django.core.exceptions import ImproperlyConfigured
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_protect
from .models import Image, Album
class AlbumView(ListV... | {
"repo_name": "dsimandl/teamsurmandl",
"path": "gallery/views.py",
"copies": "1",
"size": "2645",
"license": "mit",
"hash": 4976522715030093000,
"line_mean": 34.2666666667,
"line_max": 88,
"alpha_frac": 0.6404536862,
"autogenerated": false,
"ratio": 3.9536621823617337,
"config_test": false,
"... |
from django.views.generic import ListView
from django.core.exceptions import ImproperlyConfigured
from endless_pagination.settings import PAGE_LABEL
class AjaxListView(ListView):
"""
A subclass of *django.views.generic.ListView* that allows AJAX
pagination of a list of objects.
You can use this c... | {
"repo_name": "unicefuganda/edtrac",
"path": "edtrac_project/endless/endless_pagination/views.py",
"copies": "5",
"size": "3180",
"license": "bsd-3-clause",
"hash": -5325637864436084000,
"line_mean": 36.8571428571,
"line_max": 77,
"alpha_frac": 0.6242138365,
"autogenerated": false,
"ratio": 4.234... |
from django.views.generic import ListView
from django.db.models import get_model
from django import http
from django.shortcuts import get_object_or_404
from oscar.apps.offer.models import ConditionalOffer, Range
Product = get_model('catalogue', 'Product')
class OfferListView(ListView):
model = ConditionalOffer
... | {
"repo_name": "ruddra/django-oscar",
"path": "oscar/apps/offer/views.py",
"copies": "4",
"size": "1895",
"license": "bsd-3-clause",
"hash": -5315525039477491000,
"line_mean": 30.0655737705,
"line_max": 73,
"alpha_frac": 0.6564643799,
"autogenerated": false,
"ratio": 3.9072164948453607,
"config_... |
from django.views.generic import ListView
from django.db.models import get_model
from django import http
from oscar.apps.offer.models import ConditionalOffer
Product = get_model('catalogue', 'Product')
class OfferListView(ListView):
model = ConditionalOffer
context_object_name = 'offers'
template_name =... | {
"repo_name": "makielab/django-oscar",
"path": "oscar/apps/offer/views.py",
"copies": "2",
"size": "1246",
"license": "bsd-3-clause",
"hash": -56211420934522990,
"line_mean": 29.3902439024,
"line_max": 73,
"alpha_frac": 0.6645264848,
"autogenerated": false,
"ratio": 3.9555555555555557,
"config_... |
from django.views.generic import ListView
from django.db.models import Q
from six import string_types
class SearchableListView(ListView):
'''
Render a list of objects that's searchable.
'''
# pylint: disable=R0901
# pylint: disable=E1101
#: The fields the search will be performed on, using ``qu... | {
"repo_name": "ocadotechnology/django-nuit",
"path": "nuit/views.py",
"copies": "1",
"size": "1358",
"license": "apache-2.0",
"hash": 6230832775272177000,
"line_mean": 33.8205128205,
"line_max": 77,
"alpha_frac": 0.5979381443,
"autogenerated": false,
"ratio": 4.25705329153605,
"config_test": fa... |
from django.views.generic import ListView
from django.http import Http404
from taggit.models import Tag
from amanda.taxonomy.models import ContentCategory
class ContentCategoryListView(ListView):
"""
A generic ListView that shows object lists that match a category.
Requires a kwarg, category, that refer... | {
"repo_name": "AmandaCMS/amanda-cms",
"path": "amanda/taxonomy/views.py",
"copies": "1",
"size": "1686",
"license": "mit",
"hash": -5661817485434855000,
"line_mean": 27.1,
"line_max": 81,
"alpha_frac": 0.6257413998,
"autogenerated": false,
"ratio": 4.2683544303797465,
"config_test": false,
"h... |
from django.views.generic import ListView
from django.http import JsonResponse
from querystring_parser import parser
from django.core.exceptions import FieldError
from django.db.models import Q
class KendoListProviderView(ListView):
filters_ci = True
distinct = False
def _build_filters(self, filters, django_filter... | {
"repo_name": "tnajdek/django-kendoui-backend",
"path": "kendoui_backend/views.py",
"copies": "1",
"size": "2672",
"license": "mit",
"hash": 6360839053003685000,
"line_mean": 33.2564102564,
"line_max": 137,
"alpha_frac": 0.6624251497,
"autogenerated": false,
"ratio": 3.3028430160692213,
"config... |
from django.views.generic import ListView
from django import http
from django.conf import settings
from django.shortcuts import get_object_or_404
from oscar.core.loading import get_model
ConditionalOffer = get_model('offer', 'ConditionalOffer')
Range = get_model('offer', 'Range')
Product = get_model('catalogue', 'Pro... | {
"repo_name": "WadeYuChen/django-oscar",
"path": "src/oscar/apps/offer/views.py",
"copies": "23",
"size": "2060",
"license": "bsd-3-clause",
"hash": 4525619512823324000,
"line_mean": 31.1875,
"line_max": 73,
"alpha_frac": 0.6611650485,
"autogenerated": false,
"ratio": 3.8867924528301887,
"confi... |
from django.views.generic import ListView
from django import http
from django.shortcuts import get_object_or_404
from oscar.core.loading import get_model
from oscar.apps.offer.models import ConditionalOffer, Range
Product = get_model('catalogue', 'Product')
class OfferListView(ListView):
model = ConditionalOffe... | {
"repo_name": "ademuk/django-oscar",
"path": "src/oscar/apps/offer/views.py",
"copies": "12",
"size": "1965",
"license": "bsd-3-clause",
"hash": -8794012165439810000,
"line_mean": 30.6935483871,
"line_max": 73,
"alpha_frac": 0.6580152672,
"autogenerated": false,
"ratio": 3.914342629482072,
"con... |
from django.views.generic import ListView
from django.shortcuts import get_object_or_404
from trix.trix_core import models
from trix.trix_student.views.common import AssignmentListViewBase
class PermalinkView(AssignmentListViewBase):
template_name = "trix_student/permalink.django.html"
paginate_by = 20
... | {
"repo_name": "devilry/trix2",
"path": "trix/trix_student/views/permalink.py",
"copies": "1",
"size": "1666",
"license": "bsd-3-clause",
"hash": -6945478601414249000,
"line_mean": 33.7083333333,
"line_max": 83,
"alpha_frac": 0.6716686675,
"autogenerated": false,
"ratio": 3.5905172413793105,
"co... |
from django.views.generic import ListView
from django.shortcuts import render, get_object_or_404
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from django.core.mail import send_mail
from django.db.models import ... | {
"repo_name": "crasker/mysite",
"path": "blog/views.py",
"copies": "1",
"size": "2213",
"license": "bsd-2-clause",
"hash": 3992252320683089000,
"line_mean": 32.0298507463,
"line_max": 77,
"alpha_frac": 0.5842747402,
"autogenerated": false,
"ratio": 4.105751391465677,
"config_test": false,
"ha... |
from django.views.generic import ListView
from django.shortcuts import render
from .. import models
from ..forms import EntryForm
from parametrized_pagination_mixin import ParametrizedPaginationMixin
class EntryListView(ParametrizedPaginationMixin, ListView):
model = models.Entry
context_object_name = 'entri... | {
"repo_name": "dagothar/django-guestbook",
"path": "guestbook/views/entry_list_view.py",
"copies": "1",
"size": "1544",
"license": "mit",
"hash": -5918967312975625000,
"line_mean": 29.88,
"line_max": 75,
"alpha_frac": 0.6224093264,
"autogenerated": false,
"ratio": 4.084656084656085,
"config_tes... |
from django.views.generic import ListView
from django.shortcuts import render, redirect
from models import User_Institution, Institution, Datatype, Transplant_Type, Alias_Identifier, Data_Cleansing_Template, \
Data_Cleansing_Template_Field, User, Upload_History, Patient_Transplant, Raw_Uploaded_Data
from django.co... | {
"repo_name": "hizni/vod-systems",
"path": "vod_systems/vod/upload_views.py",
"copies": "1",
"size": "9551",
"license": "mit",
"hash": 8277179297979210000,
"line_mean": 49.2736842105,
"line_max": 157,
"alpha_frac": 0.6252748403,
"autogenerated": false,
"ratio": 3.8762175324675323,
"config_test"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.