text
stringlengths
0
1.05M
meta
dict
from django.test.utils import override_settings from hc.test import BaseTestCase @override_settings(LINENOTIFY_CLIENT_ID="t1", LINENOTIFY_CLIENT_SECRET="s1") class AddLineNotifyTestCase(BaseTestCase): def setUp(self): super().setUp() self.url = "/projects/%s/add_linenotify/" % self.project.code ...
{ "repo_name": "healthchecks/healthchecks", "path": "hc/front/tests/test_add_linenotify.py", "copies": "2", "size": "1256", "license": "bsd-3-clause", "hash": 2743252623510547000, "line_mean": 38.25, "line_max": 85, "alpha_frac": 0.6815286624, "autogenerated": false, "ratio": 3.558073654390935, ...
from django.test.utils import override_settings from hc.test import BaseTestCase @override_settings(PUSHBULLET_CLIENT_ID="t1", PUSHBULLET_CLIENT_SECRET="s1") class AddPushbulletTestCase(BaseTestCase): def setUp(self): super().setUp() self.url = "/projects/%s/add_pushbullet/" % self.project.code ...
{ "repo_name": "iphoting/healthchecks", "path": "hc/front/tests/test_add_pushbullet.py", "copies": "2", "size": "1249", "license": "bsd-3-clause", "hash": 4811924213995654000, "line_mean": 38.03125, "line_max": 79, "alpha_frac": 0.6821457166, "autogenerated": false, "ratio": 3.5685714285714285, ...
from django.test.utils import override_settings from kitsune.search.tests import Elastic7TestCase from kitsune.search.documents import ProfileDocument from kitsune.users.tests import ProfileFactory, GroupFactory from elasticsearch.helpers import bulk as es7_bulk from kitsune.search.es7_utils import es7_client @overri...
{ "repo_name": "mozilla/kitsune", "path": "kitsune/search/tests/test_base.py", "copies": "1", "size": "1435", "license": "bsd-3-clause", "hash": -5753185104730556000, "line_mean": 34, "line_max": 66, "alpha_frac": 0.687804878, "autogenerated": false, "ratio": 3.6237373737373737, "config_test": t...
from django.test.utils import override_settings from rapidsms.models import Connection from rapidsms.tests.harness import RapidTest from rapidsms.tests.translation import app from rapidsms.utils import translation as trans_helpers class TranslationTestMixin(object): def setUp(self): super(TranslationTest...
{ "repo_name": "lsgunth/rapidsms", "path": "rapidsms/tests/translation/tests.py", "copies": "7", "size": "5132", "license": "bsd-3-clause", "hash": -4449915106505727000, "line_mean": 43.6260869565, "line_max": 77, "alpha_frac": 0.6147700701, "autogenerated": false, "ratio": 4.227347611202636, "c...
from django.test.utils import override_settings from rest_framework import status from rest_framework.test import force_authenticate from .base import APIViewTestCase class _BaseChangePasswordTestCase(APIViewTestCase): VIEW_NAME = 'change-password' def setUp(self): super().setUp() self.passw...
{ "repo_name": "szopu/django-rest-registration", "path": "tests/api/test_change_password.py", "copies": "1", "size": "5441", "license": "mit", "hash": -4938684533458477000, "line_mean": 34.5620915033, "line_max": 73, "alpha_frac": 0.6243337622, "autogenerated": false, "ratio": 4.033358042994811, ...
from django.test.utils import override_settings from test_plus import TestCase from tournamentcontrol.competition.models import LadderSummary from tournamentcontrol.competition.tests import factories ORIGINAL_BEHAVIOUR = "tournamentcontrol.competition.rank.points_func" CORRECT_BEHAVIOUR = "tournamentcontrol.competitio...
{ "repo_name": "goodtune/vitriolic", "path": "tournamentcontrol/competition/tests/test_rank.py", "copies": "1", "size": "4308", "license": "bsd-3-clause", "hash": 5666965637066028000, "line_mean": 34.9, "line_max": 87, "alpha_frac": 0.6281337047, "autogenerated": false, "ratio": 3.256235827664399,...
from django.test.utils import override_settings from test_plus import TestCase @override_settings(ROOT_URLCONF='example_app.urls') class DateTimeFieldTest(TestCase): def test_validate_form_output_tz(self): text = """ <optgroup label="Australia"> <option value="Australia/Adelaide">Adel...
{ "repo_name": "goodtune/vitriolic", "path": "touchtechnology/common/tests/test_fields.py", "copies": "1", "size": "2800", "license": "bsd-3-clause", "hash": 8627834950068246000, "line_mean": 33.1463414634, "line_max": 70, "alpha_frac": 0.5532142857, "autogenerated": false, "ratio": 3.778677462887...
from django.test.utils import override_settings from uw_pws.util import fdao_pws_override from uw_gws.utilities import fdao_gws_override from uw_sws.util import fdao_sws_override from uw_kws.utilities import fdao_kws_override from uw_canvas.utilities import fdao_canvas_override from uw_libraries.util import ( fdao_...
{ "repo_name": "uw-it-aca/uw-restclients", "path": "restclients/test/__init__.py", "copies": "1", "size": "2229", "license": "apache-2.0", "hash": 757101972783433100, "line_mean": 38.8035714286, "line_max": 77, "alpha_frac": 0.8030506954, "autogenerated": false, "ratio": 2.7655086848635237, "con...
from django.test.utils import override_settings from hc.test import BaseTestCase from hc.accounts.models import Credential @override_settings(RP_ID="testserver") class RemoveCredentialTestCase(BaseTestCase): def setUp(self): super().setUp() self.c = Credential.objects.create(user=self.alice, nam...
{ "repo_name": "iphoting/healthchecks", "path": "hc/accounts/tests/test_remove_credential.py", "copies": "2", "size": "1852", "license": "bsd-3-clause", "hash": -2954019185223346700, "line_mean": 34.6153846154, "line_max": 82, "alpha_frac": 0.6636069114, "autogenerated": false, "ratio": 3.62426614...
from django.test.utils import override_settings from mock import Mock, patch from bedrock.firefox.models import FirefoxOSFeedLink from bedrock.mozorg.tests import TestCase from scripts import update_firefox_os_feeds class TestUpdateFirefoxOSFeeds(TestCase): @override_settings(FIREFOX_OS_FEEDS=[('xx', 'http://e...
{ "repo_name": "mermi/bedrock", "path": "scripts/tests.py", "copies": "23", "size": "2277", "license": "mpl-2.0", "hash": 3124412396752933400, "line_mean": 48.5, "line_max": 83, "alpha_frac": 0.6543697848, "autogenerated": false, "ratio": 3.3683431952662723, "config_test": true, "has_no_keywor...
from django.test.utils import override_settings from mock import Mock, patch from olympia.amo.tests import TestCase from olympia.amo import monitors import responses class TestMonitor(TestCase): @patch('socket.socket') def test_memcache(self, mock_socket): mocked_caches = { 'default': { ...
{ "repo_name": "harikishen/addons-server", "path": "src/olympia/amo/tests/test_monitor.py", "copies": "1", "size": "3555", "license": "bsd-3-clause", "hash": -5359664715630217000, "line_mean": 34.9090909091, "line_max": 79, "alpha_frac": 0.5729957806, "autogenerated": false, "ratio": 4.14335664335...
from django.test.utils import override_settings from mock import Mock, patch from olympia.amo.tests import TestCase from olympia.amo import monitors class TestMonitor(TestCase): @patch('socket.socket') def test_memcache(self, mock_socket): mocked_caches = { 'default': { '...
{ "repo_name": "Prashant-Surya/addons-server", "path": "src/olympia/amo/tests/test_monitor.py", "copies": "1", "size": "2954", "license": "bsd-3-clause", "hash": 1203867553021728500, "line_mean": 35.4691358025, "line_max": 79, "alpha_frac": 0.5653351388, "autogenerated": false, "ratio": 4.13725490...
from django.test.utils import override_settings from mock import patch from nose.tools import assert_false, eq_ from bedrock.mozorg.tests import TestCase from bedrock.firefox import helpers @override_settings(FIREFOX_OS_FEED_LOCALES=['xx']) @patch('bedrock.firefox.helpers.cache') @patch('bedrock.firefox.helpers.Fir...
{ "repo_name": "jacshfr/mozilla-bedrock", "path": "bedrock/firefox/tests/test_helpers.py", "copies": "1", "size": "3075", "license": "mpl-2.0", "hash": -8347471687558499000, "line_mean": 38.4230769231, "line_max": 85, "alpha_frac": 0.6640650407, "autogenerated": false, "ratio": 3.554913294797688, ...
from django.test.utils import override_settings from mock import patch from nose.tools import eq_, ok_ from requests import ConnectionError, HTTPError from mozillians.common.tests import TestCase from mozillians.geo.models import Country, Region, City from mozillians.geo.lookup import (GeoLookupException, deduplicate...
{ "repo_name": "hoosteeno/mozillians", "path": "mozillians/geo/tests/test_lookup.py", "copies": "5", "size": "8450", "license": "bsd-3-clause", "hash": -3317315446099362300, "line_mean": 35.7391304348, "line_max": 98, "alpha_frac": 0.5785798817, "autogenerated": false, "ratio": 3.637537666810159, ...
from django.test.utils import override_settings from olympia.reviewers.templatetags import code_manager from olympia.amo.tests import TestCase class TestCodeManagerUrl(TestCase): def setUp(self): super().setUp() self.addon_id = 1 self.base_version_id = 2 self.cm_url = 'http://code...
{ "repo_name": "wagnerand/addons-server", "path": "src/olympia/reviewers/tests/test_code_manager_tags.py", "copies": "4", "size": "2259", "license": "bsd-3-clause", "hash": -7465148764215934000, "line_mean": 35.435483871, "line_max": 85, "alpha_frac": 0.5081894644, "autogenerated": false, "ratio":...
from django.test.utils import override_settings from rest_registration.api.views.reset_password import ResetPasswordSigner from .base import ViewTestCase VERIFICATION_URL = '/accounts/reset-password/' SUCCESS_URL = '/accounts/reset-password/success/' FAILURE_URL = '/accounts/reset-password/failure/' @override_sett...
{ "repo_name": "szopu/django-rest-registration", "path": "tests/contrib/verification_redirects/test_reset_password.py", "copies": "1", "size": "1803", "license": "mit", "hash": -4991408758448454000, "line_mean": 35.7959183673, "line_max": 74, "alpha_frac": 0.6727676095, "autogenerated": false, "ra...
from django.test.utils import override_settings from waffle.testutils import override_switch from olympia.amo.tests import addon_factory, TestCase, user_factory from olympia.versions.compare import MAX_VERSION_PART from ..models import Block, BlocklistSubmission class TestBlock(TestCase): def test_is_version_bl...
{ "repo_name": "bqbn/addons-server", "path": "src/olympia/blocklist/tests/test_models.py", "copies": "1", "size": "7008", "license": "bsd-3-clause", "hash": 4337431199902577700, "line_mean": 39.5086705202, "line_max": 79, "alpha_frac": 0.6452625571, "autogenerated": false, "ratio": 3.8998330550918...
from django_thermostat.mappings import get_mappings from pypelib.RuleTable import RuleTable from django_thermostat.utils import gen_comparing_time from django_thermostat.models import Rule import logging from django.conf import settings logger = logging.getLogger("thermostat.rules") logger.setLevel(settings.LOG_LEVEL)...
{ "repo_name": "jpardobl/django-thermostat", "path": "django_thermostat/rules.py", "copies": "1", "size": "2966", "license": "bsd-3-clause", "hash": 6609365446975107000, "line_mean": 28.9595959596, "line_max": 85, "alpha_frac": 0.6271072151, "autogenerated": false, "ratio": 3.730817610062893, "c...
from django_thermostat.models import Context, Thermometer, ThermometerData from django.shortcuts import render_to_response, redirect, render from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseServerError from django.conf import settings from django.core.urlresolvers import reverse from django_the...
{ "repo_name": "jpardobl/django-thermostat", "path": "django_thermostat/views.py", "copies": "1", "size": "8354", "license": "bsd-3-clause", "hash": -2744034976944630000, "line_mean": 30.4060150376, "line_max": 109, "alpha_frac": 0.6006703376, "autogenerated": false, "ratio": 3.7294642857142857, ...
from djangotoolbox.db.basecompiler import ( NonrelCompiler, NonrelInsertCompiler, NonrelUpdateCompiler, NonrelDeleteCompiler) from django_riak_engine import query from django_riak_engine.util import decorators class SQLCompiler(NonrelCompiler): query_class = query.BackendQuery # This gets called fo...
{ "repo_name": "oubiwann-unsupported/django-riak-engine", "path": "django_riak_engine/compiler.py", "copies": "1", "size": "2424", "license": "bsd-2-clause", "hash": -1551822877606176800, "line_mean": 34.1304347826, "line_max": 73, "alpha_frac": 0.6373762376, "autogenerated": false, "ratio": 4.101...
from djangotoolbox.db.base import NonrelDatabaseFeatures, \ NonrelDatabaseOperations, NonrelDatabaseWrapper, NonrelDatabaseClient, \ NonrelDatabaseValidation, NonrelDatabaseIntrospection, \ NonrelDatabaseCreation # We don't use this, but `model` needs to be imported first due to a # relative import in boto...
{ "repo_name": "danfairs/django-simpledb", "path": "simpledb/base.py", "copies": "1", "size": "3672", "license": "bsd-3-clause", "hash": 7951566850137705000, "line_mean": 36.4693877551, "line_max": 77, "alpha_frac": 0.6323529412, "autogenerated": false, "ratio": 4.163265306122449, "config_test":...
from djangotoolbox.db.creation import NonrelDatabaseCreation from .db_settings import get_model_indexes from .stubs import stub_manager class DatabaseCreation(NonrelDatabaseCreation): # For TextFields and XMLFields we'll default to the unindexable, # but not length-limited, db.Text (db_type of "string" fiel...
{ "repo_name": "potatolondon/djangoappengine-1-4", "path": "db/creation.py", "copies": "1", "size": "3131", "license": "bsd-3-clause", "hash": -5799694567600122000, "line_mean": 40.1973684211, "line_max": 76, "alpha_frac": 0.6176940275, "autogenerated": false, "ratio": 4.202684563758389, "config...
from djangotoolbox.fields import EmbeddedModelField from django_mongodb_engine.contrib import MongoDBManager from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django import forms from django.db import models from django.utils.translation import ugettext as _...
{ "repo_name": "fragro/Open-Assembly", "path": "ver1_0/openassembly/oa_location/models.py", "copies": "1", "size": "1448", "license": "bsd-3-clause", "hash": 891110828085545300, "line_mean": 28.5510204082, "line_max": 90, "alpha_frac": 0.760359116, "autogenerated": false, "ratio": 3.77083333333333...
from djangotoolbox.fields import ListField, DictField, EmbeddedModelField, AbstractIterableField from django.db.models.signals import m2m_changed from django.db.models import get_model from django.db.models.fields.related import add_lazy_relation from django.utils.translation import ugettext_lazy as _ from django_mongo...
{ "repo_name": "kennu/django-mongom2m", "path": "mongom2m/fields.py", "copies": "1", "size": "28606", "license": "bsd-2-clause", "hash": -8489780568898247000, "line_mean": 45.5895765472, "line_max": 284, "alpha_frac": 0.6196602111, "autogenerated": false, "ratio": 4.1284456631548565, "config_tes...
from djangotoolbox.fields import ListField from django.db import models from student.models import Student from random import random OPERATION_CHOICES = ( ('0',u'addition'), ('1',u'subtraction'), ('2',u'multiplication'), ('3',u'division'), ) ASK_CHANCE = 0.1 def ask_anyway(): return random < ASK_CHANCE class Q...
{ "repo_name": "bernardokyotoku/skillplant", "path": "game/models.py", "copies": "1", "size": "2184", "license": "bsd-3-clause", "hash": -7814819920887558000, "line_mean": 29.3333333333, "line_max": 79, "alpha_frac": 0.7371794872, "autogenerated": false, "ratio": 3.192982456140351, "config_test"...
from django_town.http import http_json_response class RestError(Exception): """ Default Exception. ============= =================== http code message ============= =================== 500 internal_error ============= =================== """ error = "internal_er...
{ "repo_name": "uptown/django-town", "path": "django_town/rest/exceptions.py", "copies": "1", "size": "5862", "license": "mit", "hash": 4717904751934932000, "line_mean": 21.288973384, "line_max": 86, "alpha_frac": 0.4155578301, "autogenerated": false, "ratio": 4.568978955572876, "config_test": f...
from django_town.rest import RestApiView, rest_api_manager from django_town.http import http_json_response from django_town.cache.utlis import SimpleCache from django_town.oauth2.swagger import swagger_authorizations_data from django_town.social.oauth2.permissions import OAuth2Authenticated, OAuth2AuthenticatedOrReadOn...
{ "repo_name": "uptown/django-town", "path": "django_town/rest_swagger/views.py", "copies": "1", "size": "9473", "license": "mit", "hash": -822884215880542600, "line_mean": 42.2557077626, "line_max": 108, "alpha_frac": 0.3224955136, "autogenerated": false, "ratio": 6.26521164021164, "config_test...
from django_town.rest import RestCollectionApiView, RestDocumentApiView, RestSpecifiedDocumentApiView, \ RestApiView, RestFormRequired, RestFormInvalid from django_town.social.resources.user import UserResource from django_town.social.resources.page import PageLikeResource from django_town.social.oauth2.permissions...
{ "repo_name": "uptown/django-town", "path": "django_town/social/apis/user.py", "copies": "1", "size": "8352", "license": "mit", "hash": -5160795127179245000, "line_mean": 38.5876777251, "line_max": 118, "alpha_frac": 0.6039272031, "autogenerated": false, "ratio": 4.169745381927109, "config_test...
from django_town.rest import RestDocumentApiView, RestQuerySetCollectionApiView from django_town.social.resources.link import LinkResource from django_town.social.oauth2.permissions import OAuth2AuthenticatedOrReadOnly class LinkApiView(RestDocumentApiView): resource = LinkResource(name='link') crud_method_na...
{ "repo_name": "uptown/django-town", "path": "django_town/social/apis/link.py", "copies": "1", "size": "1206", "license": "mit", "hash": -7153219400935541000, "line_mean": 35.5757575758, "line_max": 122, "alpha_frac": 0.7429519071, "autogenerated": false, "ratio": 3.9155844155844157, "config_tes...
from django_town.rest import RestDocumentApiView, RestQuerySetCollectionApiView from django_town.social.resources.page import PageResource, PageLikeResource, PageFeedResource, page_feeds_cache from django_town.social.resources.post import PostResource from django_town.social.oauth2.permissions import OAuth2Authenticate...
{ "repo_name": "uptown/django-town", "path": "django_town/social/apis/page.py", "copies": "1", "size": "2708", "license": "mit", "hash": 1025959434578496500, "line_mean": 33.7179487179, "line_max": 112, "alpha_frac": 0.6617429838, "autogenerated": false, "ratio": 3.8964028776978417, "config_test...
from django_town.rest import RestDocumentApiView, RestQuerySetCollectionApiView from django_town.social.resources.place import PlaceResource from django_town.social.define.place_categories import PLACE_CATEGORIES class PlaceApiView(RestDocumentApiView): resource = PlaceResource(name='place') crud_method_names...
{ "repo_name": "uptown/django-town", "path": "django_town/social/apis/place.py", "copies": "1", "size": "1102", "license": "mit", "hash": -4506397303081234400, "line_mean": 38.3571428571, "line_max": 86, "alpha_frac": 0.6624319419, "autogenerated": false, "ratio": 3.921708185053381, "config_test...
from django_town.rest import RestDocumentApiView, RestQuerySetCollectionApiView from django_town.social.resources.post import PostResource, CommentResource, PostLikeResource, PostDeleteAuthorized from django_town.social.oauth2.permissions import OAuth2AuthenticatedOrReadOnly class PostApiView(RestDocumentApiView): ...
{ "repo_name": "uptown/django-town", "path": "django_town/social/apis/post.py", "copies": "1", "size": "2037", "license": "mit", "hash": -2288237397322268400, "line_mean": 36.0545454545, "line_max": 115, "alpha_frac": 0.7108492882, "autogenerated": false, "ratio": 3.8726235741444865, "config_tes...
from django_town.rest import RestDocumentApiView, RestQuerySetCollectionApiView, RestApiView from django_town.social.models.feed import FeedTokenAuthenticated from django_town.social.resources.feed import FeedResource, FeedFollowResource, FeedTokenResource, feed_public_resource from django_town.social.resources.post im...
{ "repo_name": "uptown/django-town", "path": "django_town/social/apis/feed.py", "copies": "1", "size": "2413", "license": "mit", "hash": -6448619340212744000, "line_mean": 35.0298507463, "line_max": 119, "alpha_frac": 0.6945710734, "autogenerated": false, "ratio": 3.9108589951377635, "config_tes...
from django_town.rest import RestFormInvalid from django_town.rest.resources import MongoResource from django_town.social.documents import Place, Address, AdministrativeArea from django_town.social.resources.region import RegionResource from django_town.utils.with3 import urlopen import json class PlaceResource(Mongo...
{ "repo_name": "uptown/django-town", "path": "django_town/social/resources/place.py", "copies": "1", "size": "6482", "license": "mit", "hash": -1415248627103740700, "line_mean": 50.4444444444, "line_max": 189, "alpha_frac": 0.5876272755, "autogenerated": false, "ratio": 3.84916864608076, "config...
from django_town.rest.resources.exceptions import ValidationError from django_town.rest.resources.base import resource_by_name, resource_cache_manager from django.utils import six from django_town.cache.utlis import SimpleCache class VirtualField(object): """ VirtualField will allow a resource has a virtual f...
{ "repo_name": "uptown/django-town", "path": "django_town/rest/resources/fields.py", "copies": "1", "size": "3805", "license": "mit", "hash": 234011296468291330, "line_mean": 29.44, "line_max": 108, "alpha_frac": 0.6331143233, "autogenerated": false, "ratio": 3.9801255230125525, "config_test": f...
from django_town.rest.resources import ModelResource, VirtualField, Resource, VirtualRequestField from django_town.cache.utlis import SimpleCache from django_town.social.models import Feed, FeedFollow, FeedOwner from django_town.rest.exceptions import RestNotFound, RestForbidden from django_town.social.resources.user i...
{ "repo_name": "uptown/django-town", "path": "django_town/social/resources/feed.py", "copies": "1", "size": "3294", "license": "mit", "hash": 3029020426556188700, "line_mean": 39.6790123457, "line_max": 126, "alpha_frac": 0.674863388, "autogenerated": false, "ratio": 3.7905638665132337, "config_...
from django_town.rest.resources import ModelResource, VirtualField, VirtualRequestField from django_town.cache.utlis import SimpleCache from django_town.social.models import Page, PageOwner, PageLike, PageFeed def load_page_like_cache(**_kwargs): return PageLike.objects.filter(page=_kwargs['pk']).values_list('pk'...
{ "repo_name": "uptown/django-town", "path": "django_town/social/resources/page.py", "copies": "1", "size": "2989", "license": "mit", "hash": -9041345449370807000, "line_mean": 39.9589041096, "line_max": 122, "alpha_frac": 0.6791569087, "autogenerated": false, "ratio": 3.5796407185628745, "confi...
from django_town.rest.resources import MongoResource from django_town.rest.exceptions import RestBadRequest from django_town.social.documents import Link, EmbeddedPhoto from django_town.utils.rand import generate_random_from_vschar_set from django_town.utils.with3 import urlopen from django.utils.six import StringIO fr...
{ "repo_name": "uptown/django-town", "path": "django_town/social/resources/link.py", "copies": "1", "size": "1499", "license": "mit", "hash": -4267369689726790700, "line_mean": 37.4615384615, "line_max": 104, "alpha_frac": 0.6224149433, "autogenerated": false, "ratio": 4.118131868131868, "config...
from django_town.utils import CurrentTimestamp from django_town.oauth2.server import oauth2_server from django.utils.functional import SimpleLazyObject from django_town.cache.utlis import SimpleCache __all__ = ['OAuth2Middleware'] class AuthorizationInfo(object): def __init__(self): self.secret_key = N...
{ "repo_name": "uptown/django-town", "path": "django_town/oauth2/middleware.py", "copies": "1", "size": "5398", "license": "mit", "hash": 497079536845754000, "line_mean": 44.3613445378, "line_max": 117, "alpha_frac": 0.5829937014, "autogenerated": false, "ratio": 3.925818181818182, "config_test"...
from django_town.utils import json from django_town.rest.resources import MongoResource, VirtualField, VirtualRequestField, resource_cache_manager from django_town.social.documents import Post, Comment, PostLike from django_town.cache.utlis import SimpleCache from django_town.social.resources.user import user_public_re...
{ "repo_name": "uptown/django-town", "path": "django_town/social/resources/post.py", "copies": "1", "size": "4189", "license": "mit", "hash": 4215098185499629000, "line_mean": 38.1495327103, "line_max": 122, "alpha_frac": 0.658868465, "autogenerated": false, "ratio": 3.8185961713764813, "config_...
from django_town.utils import json import datetime from django.utils.functional import cached_property from mongoengine import ListField, SortedListField, EmbeddedDocumentField, PointField, EmbeddedDocument, \ NotUniqueError, ValidationError, DateTimeField from django.utils.http import urlsafe_base64_decode, urlsaf...
{ "repo_name": "uptown/django-town", "path": "django_town/rest/resources/mongo_resource.py", "copies": "1", "size": "9136", "license": "mit", "hash": -1613808769664755500, "line_mean": 41.4976744186, "line_max": 122, "alpha_frac": 0.6063922942, "autogenerated": false, "ratio": 4.340142517814727, ...
from django_tqdm import BaseCommand from moviesapp.exceptions import MovieNotInDb from moviesapp.models import Movie from moviesapp.utils import add_movie_to_db class Command(BaseCommand): help = """Updates movie data If one argument is used then the movie with the selected movie_id is updated If no argu...
{ "repo_name": "desecho/movies", "path": "src/moviesapp/management/commands/update_movie_data.py", "copies": "1", "size": "2456", "license": "mit", "hash": -3523951523785647000, "line_mean": 38.6129032258, "line_max": 99, "alpha_frac": 0.582247557, "autogenerated": false, "ratio": 3.96129032258064...
from django.urls.base import reverse_lazy from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic.list import ListView from misc.models import SubjectSector, Faculty class SubjectSectorList(ListView): model = SubjectSec...
{ "repo_name": "jmoreman/eTrack", "path": "misc/views.py", "copies": "1", "size": "1372", "license": "mit", "hash": -1135235612252681600, "line_mean": 22.2542372881, "line_max": 72, "alpha_frac": 0.7259475219, "autogenerated": false, "ratio": 3.5729166666666665, "config_test": false, "has_no_k...
from django.urls.base import reverse from rest_framework import status from rest_framework.test import APITestCase from core.tests.mixins import HTTPMethodStatusCodeTestMixin from bank_accounts.tests.factories import AccountFactory class TestAccountAPIViewsUnauthorizedUser(HTTPMethodStatusCodeTestMixin, ...
{ "repo_name": "krayevidi/IBANapp", "path": "src/backend/bank_accounts/tests/api_views_unauthorized_user_tests.py", "copies": "1", "size": "1157", "license": "mit", "hash": 8137703870479782000, "line_mean": 35.15625, "line_max": 74, "alpha_frac": 0.6300777874, "autogenerated": false, "ratio": 4.45...
from django.urls.conf import path from .views.frontend import ( TopicCommentListingView, TopicExpandCommentsDownView, TopicExpandCommentsUpView, TopicExpandRepliesUpRecursive, TopicListView) urlpatterns_base = [ path(route=r'', view=TopicListView.as_view(), name='topic-listing'), path( route='...
{ "repo_name": "karolyi/forum-django", "path": "backend/forum/base/urls.py", "copies": "1", "size": "1172", "license": "mit", "hash": 900596630363574900, "line_mean": 39.4137931034, "line_max": 78, "alpha_frac": 0.6450511945, "autogenerated": false, "ratio": 3.639751552795031, "config_test": fal...
from django.urls import get_script_prefix, resolve def get_breadcrumbs(url, request=None): """ Given a url returns a list of breadcrumbs, which are each a tuple of (name, url). """ from rest_framework.reverse import preserve_builtin_query_params from rest_framework.views import APIView de...
{ "repo_name": "tomchristie/django-rest-framework", "path": "rest_framework/utils/breadcrumbs.py", "copies": "5", "size": "2039", "license": "bsd-2-clause", "hash": 7893265082722913000, "line_mean": 37.4716981132, "line_max": 85, "alpha_frac": 0.5723393821, "autogenerated": false, "ratio": 4.25678...
from django.urls import include, path from django.contrib import admin from django.contrib.staticfiles.templatetags.staticfiles import static from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions from rest_framework.routers import SimpleRouter from artist.view...
{ "repo_name": "FedorSelitsky/eventrack", "path": "eventrack/urls.py", "copies": "1", "size": "1140", "license": "mit", "hash": -8932507765897483000, "line_mean": 27.5, "line_max": 78, "alpha_frac": 0.6850877193, "autogenerated": false, "ratio": 3.6774193548387095, "config_test": false, "has_n...
from django.urls import include, path from django.contrib import admin from django_filters.rest_framework import DjangoFilterBackend from rest_framework import routers, serializers, viewsets from vehicles.models import Vehicle class VehicleSerializer(serializers.ModelSerializer): operator = serializers.Serializer...
{ "repo_name": "jclgoodwin/bustimes.org.uk", "path": "buses/urls.py", "copies": "1", "size": "1656", "license": "mpl-2.0", "hash": -4986528780855606000, "line_mean": 29.6666666667, "line_max": 89, "alpha_frac": 0.6346618357, "autogenerated": false, "ratio": 3.9056603773584904, "config_test": fal...
from django.urls import include, path from django.contrib import admin from django.views.generic import TemplateView,RedirectView urlpatterns = [ # Examples: # url(r'^$', 'akwriters.views.home', name='home'), # url(r'^blog/', include('blog.urls')), path('', RedirectView.as_view(pattern_name='forum:ind...
{ "repo_name": "Kromey/fbxnano", "path": "akwriters/urls.py", "copies": "2", "size": "1189", "license": "mit", "hash": -7742661576206199000, "line_mean": 48.5416666667, "line_max": 94, "alpha_frac": 0.6602186712, "autogenerated": false, "ratio": 3.9501661129568104, "config_test": false, "has_n...
from django.urls import include, path from django.views.generic import RedirectView from . import views urlpatterns = [ # Localization teams path("teams/", views.teams, name="pontoon.teams"), # AJAX: Request team to be added to Pontoon path("teams/request/", views.request_item, name="pontoon.teams.re...
{ "repo_name": "mathjazz/pontoon", "path": "pontoon/teams/urls.py", "copies": "3", "size": "3569", "license": "bsd-3-clause", "hash": -5293501459651152000, "line_mean": 37.7934782609, "line_max": 86, "alpha_frac": 0.3648080695, "autogenerated": false, "ratio": 5.860426929392447, "config_test": f...
from django.urls import include, path from django.views.generic import TemplateView from rest_framework.documentation import include_docs_urls from rest_framework.routers import DefaultRouter from rest_framework.schemas import get_schema_view from . import views router = DefaultRouter() router.register("business_un...
{ "repo_name": "salopensource/sal", "path": "api/v2/urls.py", "copies": "1", "size": "1640", "license": "apache-2.0", "hash": -3658917902706750500, "line_mean": 33.1666666667, "line_max": 86, "alpha_frac": 0.731097561, "autogenerated": false, "ratio": 3.9140811455847255, "config_test": false, ...
from django.urls import include, path from rest_framework_extensions.routers import ExtendedDefaultRouter from ..viewsets import (IntegrationViewSet, IssueViewSet, MembershipViewSet, ProjectIntegrationViewSet, ProjectIssueViewSet, ProjectMembershipViewSet, ProjectQuestio...
{ "repo_name": "rdmorganiser/rdmo", "path": "rdmo/projects/urls/v1.py", "copies": "1", "size": "1901", "license": "apache-2.0", "hash": -304019841374275260, "line_mean": 53.3142857143, "line_max": 98, "alpha_frac": 0.7133087849, "autogenerated": false, "ratio": 4.659313725490196, "config_test": ...
from django.urls import include, path from rest_framework import routers from .views import (AbstractExportView, EmailExportView, ManagementView, ParticipantExportView, contributions, participants, registration, registration_done) from .viewsets import (ContributionTypeViewSet, ...
{ "repo_name": "aipescience/django-daiquiri", "path": "daiquiri/meetings/urls.py", "copies": "1", "size": "1716", "license": "apache-2.0", "hash": 2345621380230875600, "line_mean": 54.3548387097, "line_max": 120, "alpha_frac": 0.7313519814, "autogenerated": false, "ratio": 4.205882352941177, "co...
from django.urls import include, path from rest_framework.routers import Route from manager.api.routers import OptionalSlashRouter from projects.api.views.files import ProjectsFilesViewSet from projects.api.views.nodes import NodesViewSet from projects.api.views.projects import ProjectsAgentsViewSet, ProjectsViewSet f...
{ "repo_name": "stencila/hub", "path": "manager/projects/api/urls.py", "copies": "1", "size": "2997", "license": "apache-2.0", "hash": -1241653984572897300, "line_mean": 32.3, "line_max": 84, "alpha_frac": 0.6646646647, "autogenerated": false, "ratio": 4.12242090784044, "config_test": false, "...
from django.urls import include, path from rest_framework.urlpatterns import format_suffix_patterns from . import views app_name = 'api' course_list = views.CourseViewSet.as_view({ 'get': 'list', 'post': 'create', }) course_detail = views.CourseViewSet.as_view({ 'get': 'retrieve', 'put': 'update', ...
{ "repo_name": "Harvard-ATG/media_management_api", "path": "media_management_api/media_service/urls.py", "copies": "1", "size": "2187", "license": "bsd-3-clause", "hash": 440076502861774500, "line_mean": 36.0677966102, "line_max": 117, "alpha_frac": 0.6748971193, "autogenerated": false, "ratio": 3...
from django.urls import include, path from rest_framework.urlpatterns import format_suffix_patterns from rest_framework_nested import routers from api import views app_name = 'api' # routers generate URLs for methods like `.list` or `.retrieve` router = routers.SimpleRouter(trailing_slash=False) router.register('per...
{ "repo_name": "pbanaszkiewicz/amy", "path": "amy/api/urls.py", "copies": "1", "size": "2331", "license": "mit", "hash": -546701447135617700, "line_mean": 45.62, "line_max": 121, "alpha_frac": 0.7027027027, "autogenerated": false, "ratio": 4.2, "config_test": false, "has_no_keywords": false, ...
from django.urls import include, path from extrequests import views urlpatterns = [ # training requests path('training_requests/', views.all_trainingrequests, name='all_trainingrequests'), path('training_requests/merge', views.trainingrequests_merge, name='trainingrequests_merge'), path('training_requ...
{ "repo_name": "pbanaszkiewicz/amy", "path": "amy/extrequests/urls.py", "copies": "1", "size": "3401", "license": "mit", "hash": 1257751537584736800, "line_mean": 69.8541666667, "line_max": 170, "alpha_frac": 0.7224345781, "autogenerated": false, "ratio": 3.6257995735607675, "config_test": false...
from django.urls import include, path from .forms import ( AddressChainedSelect2WidgetForm, AlbumModelSelect2WidgetForm, HeavySelect2MultipleWidgetForm, HeavySelect2WidgetForm, ModelSelect2TagWidgetForm, Select2WidgetForm, ) from .views import TemplateFormView, heavy_data_1, heavy_data_2 urlpa...
{ "repo_name": "applegrew/django-select2", "path": "tests/testapp/urls.py", "copies": "1", "size": "1528", "license": "mit", "hash": -2727346696427755000, "line_mean": 30.1836734694, "line_max": 77, "alpha_frac": 0.6603403141, "autogenerated": false, "ratio": 3.403118040089087, "config_test": fa...
from django.urls import include, path from hc.front import views check_urls = [ path("name/", views.update_name, name="hc-update-name"), path("details/", views.details, name="hc-details"), path("filtering_rules/", views.filtering_rules, name="hc-filtering-rules"), path("timeout/", views.update_timeout...
{ "repo_name": "iphoting/healthchecks", "path": "hc/front/urls.py", "copies": "1", "size": "5254", "license": "bsd-3-clause", "hash": -8084250077206770000, "line_mean": 51.0198019802, "line_max": 86, "alpha_frac": 0.6497906357, "autogenerated": false, "ratio": 3.101534828807556, "config_test": f...
from django.urls import include, path from jobs.api.views import ( AccountsBrokerView, AccountsQueuesViewSet, AccountsWorkersHeartbeatsViewSet, AccountsWorkersViewSet, AccountsZonesViewSet, JobsViewSet, ProjectsJobsViewSet, WorkersViewSet, ) from manager.api.routers import OptionalSlash...
{ "repo_name": "stencila/hub", "path": "manager/jobs/api/urls.py", "copies": "1", "size": "1809", "license": "apache-2.0", "hash": 7815526776256592000, "line_mean": 30.7368421053, "line_max": 85, "alpha_frac": 0.7346600332, "autogenerated": false, "ratio": 3.7145790554414786, "config_test": fals...
from django.urls import include, path from rest_framework import routers from resolwe.api_urls import api_router as resolwe_router from resolwe.flow.views import EntityViewSet from resolwe_bio.filters import BioEntityFilter from resolwe_bio.kb.views import ( FeatureSearchViewSet, FeatureAutocompleteViewSet, Mappi...
{ "repo_name": "genialis/resolwe-bio", "path": "tests/urls.py", "copies": "1", "size": "1300", "license": "apache-2.0", "hash": -164269893958967550, "line_mean": 40.935483871, "line_max": 112, "alpha_frac": 0.7815384615, "autogenerated": false, "ratio": 3.6619718309859155, "config_test": false, ...
from django.urls import include, path from rest_framework.renderers import ( CoreJSONRenderer, DocumentationRenderer, SchemaJSRenderer ) from rest_framework.schemas import SchemaGenerator, get_schema_view from rest_framework.settings import api_settings def get_docs_view( title=None, description=None, sc...
{ "repo_name": "tomchristie/django-rest-framework", "path": "rest_framework/documentation.py", "copies": "3", "size": "3054", "license": "bsd-2-clause", "hash": -1029632505154584300, "line_mean": 33.7045454545, "line_max": 75, "alpha_frac": 0.6856581532, "autogenerated": false, "ratio": 4.35042735...
from django.urls import include, path # # On Reversing URLs # ================= # # Recommended Usage: # Always use rest_framework.reverse.reverse, do not directly use django.urls.reverse. # If a request object r is available, use reverse(name, request=r). With the name as defined # in desecapi.urls.v1 or desecapi.ur...
{ "repo_name": "desec-io/desec-stack", "path": "api/api/urls.py", "copies": "1", "size": "3132", "license": "mit", "hash": 2008526625764859600, "line_mean": 48.7142857143, "line_max": 113, "alpha_frac": 0.7104086845, "autogenerated": false, "ratio": 3.667447306791569, "config_test": false, "ha...
from django.urls import include, path, register_converter from django.urls.converters import StringConverter from django.contrib import admin from django.contrib.auth import logout from django.views.generic import RedirectView, TemplateView from pontoon.teams.views import team class LocaleConverter(StringConverter):...
{ "repo_name": "jotes/pontoon", "path": "pontoon/urls.py", "copies": "1", "size": "4307", "license": "bsd-3-clause", "hash": -2220947590033261800, "line_mean": 34.8916666667, "line_max": 84, "alpha_frac": 0.6301369863, "autogenerated": false, "ratio": 3.456661316211878, "config_test": false, "...
from django.urls import include, path, re_path from django.contrib import admin from course.views import index, subject, course, enroll, time, news handler404 = 'course.views.index.handler404' handler500 = 'course.views.index.handler500' urlpatterns = [ path('admin/', admin.site.urls), re_path(r'^$', index.i...
{ "repo_name": "fsr/course-management", "path": "course/urls.py", "copies": "1", "size": "3475", "license": "bsd-3-clause", "hash": -8358385332305616000, "line_mean": 45.3333333333, "line_max": 83, "alpha_frac": 0.5654676259, "autogenerated": false, "ratio": 3.527918781725888, "config_test": fal...
from django.urls import include, path, re_path from django.views.generic import RedirectView from django.urls import reverse_lazy from django.http import QueryDict from rest_framework.urlpatterns import format_suffix_patterns from django_cas_ng.views import login as cas_login, logout as cas_logout, callback as cas_cal...
{ "repo_name": "creativecommons/open-ledger", "path": "imageledger/urls.py", "copies": "1", "size": "3386", "license": "mit", "hash": 6040459446489799000, "line_mean": 38.3720930233, "line_max": 104, "alpha_frac": 0.6825162434, "autogenerated": false, "ratio": 3.3294001966568336, "config_test": ...
from django.urls import include, path, re_path from rest_framework import routers from .views import ManagementView, SchemaView, TableView from .viewsets import (AccessLevelViewSet, ColumnViewSet, FunctionViewSet, LicenseViewSet, SchemaViewSet, TableTypeViewSet, TableViewS...
{ "repo_name": "aipescience/django-daiquiri", "path": "daiquiri/metadata/urls.py", "copies": "1", "size": "1150", "license": "apache-2.0", "hash": -6753941490695135000, "line_mean": 41.5925925926, "line_max": 95, "alpha_frac": 0.7217391304, "autogenerated": false, "ratio": 3.8461538461538463, "c...
from django.urls import include, path, re_path from .views import ( absolute_kwargs_view, defaults_view, empty_view, empty_view_nested_partial, empty_view_partial, empty_view_wrapped, nested_view, ) other_patterns = [ path('non_path_include/', empty_view, name='non_path_include'), path('nested_path/',...
{ "repo_name": "EmadMokhtar/Django", "path": "tests/urlpatterns_reverse/urls.py", "copies": "61", "size": "4778", "license": "mit", "hash": 7808203278246935000, "line_mean": 59.4810126582, "line_max": 117, "alpha_frac": 0.5948095437, "autogenerated": false, "ratio": 2.878313253012048, "config_te...
from django.urls import include, path, reverse from django.utils.html import format_html from django.utils.translation import gettext as _ import wagtail.admin.rich_text.editors.draftail.features as draftail_features from wagtail.admin.rich_text import HalloPlugin from wagtail.core import hooks from wagtail.embeds imp...
{ "repo_name": "takeflight/wagtail", "path": "wagtail/embeds/wagtail_hooks.py", "copies": "2", "size": "2418", "license": "bsd-3-clause", "hash": -5798241989642341000, "line_mean": 34.5588235294, "line_max": 94, "alpha_frac": 0.6898263027, "autogenerated": false, "ratio": 3.9317073170731707, "co...
from django.urls import include, path, reverse from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext, ngettext import wagtail.admin.rich_text.editors.draftail.features as draftail_features from wagtail.admin.menu import MenuItem fr...
{ "repo_name": "takeflight/wagtail", "path": "wagtail/images/wagtail_hooks.py", "copies": "2", "size": "6263", "license": "bsd-3-clause", "hash": 254521406410628130, "line_mean": 33.4120879121, "line_max": 94, "alpha_frac": 0.6704454734, "autogenerated": false, "ratio": 4.048480930833872, "confi...
from django.urls import include, path, reverse from django.utils.html import format_html from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ from django.utils.translation import ngettext import wagtail.admin.rich_text.editors.draftail.features as draftail_features from ...
{ "repo_name": "wagtail/wagtail", "path": "wagtail/images/wagtail_hooks.py", "copies": "5", "size": "6289", "license": "bsd-3-clause", "hash": -4776349579545196000, "line_mean": 33.1793478261, "line_max": 94, "alpha_frac": 0.6711718874, "autogenerated": false, "ratio": 4.049581455247908, "config...
from django.urls import include, re_path from django.contrib.sitemaps.views import sitemap from django.contrib.sitemaps import GenericSitemap, Sitemap from django.urls import reverse from django.contrib import admin from blog.models import Article, News, Category, Column class StaticViewSitemap(Sitemap): priori...
{ "repo_name": "billvsme/vmaig_blog", "path": "vmaig_blog/urls.py", "copies": "1", "size": "2120", "license": "bsd-3-clause", "hash": 4931377786738668000, "line_mean": 28.0410958904, "line_max": 71, "alpha_frac": 0.4820754717, "autogenerated": false, "ratio": 4.371134020618556, "config_test": fa...
from django.urls import include, re_path from django.shortcuts import redirect from olympia.addons.urls import ADDON_ID from olympia.amo.decorators import use_primary_db from olympia.amo.utils import partial from olympia.lib.misc.urlconf_decorator import decorate from . import views # These will all start with /add...
{ "repo_name": "mozilla/addons-server", "path": "src/olympia/devhub/urls.py", "copies": "4", "size": "9416", "license": "bsd-3-clause", "hash": 3242686577811209000, "line_mean": 34.8022813688, "line_max": 88, "alpha_frac": 0.5756159728, "autogenerated": false, "ratio": 3.582952815829528, "config...
from django.urls import include, re_path from django.views.decorators.cache import never_cache from . import views from .utils import render_xml services_patterns = [ re_path(r'^monitor\.json$', never_cache(views.monitor), name='amo.monitor'), re_path(r'^loaded$', never_cache(views.loaded), name='amo.loaded'...
{ "repo_name": "mozilla/olympia", "path": "src/olympia/amo/urls.py", "copies": "1", "size": "1110", "license": "bsd-3-clause", "hash": 5682521808342137000, "line_mean": 29.8333333333, "line_max": 80, "alpha_frac": 0.6342342342, "autogenerated": false, "ratio": 3.3134328358208953, "config_test": ...
from django.urls import include, re_path from rest_framework import routers from treeherder.webapp.api import ( auth, bug, bugzilla, changelog, csp_report, infra_compare, intermittents_view, investigated_test, job_log_url, jobs, machine_platforms, note, performance_d...
{ "repo_name": "mozilla/treeherder", "path": "treeherder/webapp/api/urls.py", "copies": "2", "size": "4726", "license": "mpl-2.0", "hash": 6346716788893185000, "line_mean": 29.2948717949, "line_max": 97, "alpha_frac": 0.7395260262, "autogenerated": false, "ratio": 3.6921875, "config_test": false...
from django.urls import include, re_path from olympia.amo.views import frontend_view from olympia.stats.urls import stats_patterns from . import views ADDON_ID = r"""(?P<addon_id>[^/<>"']+)""" # These will all start with /addon/<addon_id>/ detail_patterns = [ re_path(r'^$', frontend_view, name='addons.detail')...
{ "repo_name": "wagnerand/addons-server", "path": "src/olympia/addons/urls.py", "copies": "3", "size": "1067", "license": "bsd-3-clause", "hash": 1966613575211743700, "line_mean": 32.34375, "line_max": 85, "alpha_frac": 0.6438612933, "autogenerated": false, "ratio": 3.194610778443114, "config_te...
from django.urls import include, re_path from rest_framework.routers import SimpleRouter from rest_framework_nested.routers import NestedSimpleRouter from olympia.activity.views import VersionReviewNotesViewSet from .views import ( AddonAutoCompleteSearchView, AddonFeaturedView, AddonRecommendationView, Addo...
{ "repo_name": "eviljeff/olympia", "path": "src/olympia/addons/api_urls.py", "copies": "1", "size": "1930", "license": "bsd-3-clause", "hash": 8567064278356264000, "line_mean": 38.387755102, "line_max": 78, "alpha_frac": 0.707253886, "autogenerated": false, "ratio": 3.754863813229572, "config_te...
from django.urls import include, re_path from rest_framework.urlpatterns import format_suffix_patterns from django_comments_xtd import api, views urlpatterns = [ re_path(r'^sent/$', views.sent, name='comments-xtd-sent'), re_path(r'^confirm/(?P<key>[^/]+)/$', views.confirm, name='comments-xtd-conf...
{ "repo_name": "danirus/django-comments-xtd", "path": "django_comments_xtd/urls.py", "copies": "1", "size": "1860", "license": "bsd-2-clause", "hash": -4353933812543363000, "line_mean": 43.2857142857, "line_max": 80, "alpha_frac": 0.6182795699, "autogenerated": false, "ratio": 3.1103678929765888, ...
from django.urls import include, re_path import cd.views as views app_name = 'cd' urlpatterns = [ re_path(r'^$', views.index, name='index'), re_path(r'^s/$', views.teste_som, name='teste_som'), re_path(r'^estoque/(?P<ordem>.)/(?P<filtro>.+)/$', views.Estoque.as_view(), name='estoque_filtro'), ...
{ "repo_name": "anselmobd/fo2", "path": "src/cd/urls/urls.py", "copies": "1", "size": "4034", "license": "mit", "hash": 2876340312409435600, "line_mean": 37.0566037736, "line_max": 81, "alpha_frac": 0.593951413, "autogenerated": false, "ratio": 2.594212218649518, "config_test": false, "has_no_...
from django.urls import NoReverseMatch from django.db import models from olympia import activity, amo from olympia.amo.fields import PositiveAutoField from olympia.amo.models import ManagerBase, ModelBase from olympia.amo.urlresolvers import reverse class TagManager(ManagerBase): def not_denied(self): "...
{ "repo_name": "atiqueahmedziad/addons-server", "path": "src/olympia/tags/models.py", "copies": "1", "size": "2686", "license": "bsd-3-clause", "hash": 6119637966976299000, "line_mean": 29.1797752809, "line_max": 75, "alpha_frac": 0.6373790022, "autogenerated": false, "ratio": 3.8045325779036827, ...
from django.urls import NoReverseMatch from django.template.defaultfilters import strip_tags from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from mezzanine.blog.models import BlogPost as Post, BlogCategory from mezzanine.pages.models import Page from mezzanine.generic.models...
{ "repo_name": "gcushen/mezzanine-api", "path": "mezzanine_api/serializers.py", "copies": "1", "size": "9932", "license": "mit", "hash": 6040459443879515000, "line_mean": 34.4714285714, "line_max": 120, "alpha_frac": 0.6415626259, "autogenerated": false, "ratio": 4.447828034034931, "config_test"...
from django.urls import NoReverseMatch from django.utils.encoding import smart_text, force_text from django_filters import OrderingFilter, ChoiceFilter, ModelMultipleChoiceFilter from rest_framework import exceptions, schemas from rest_framework.compat import coreapi from rest_framework.fields import ChoiceField, Model...
{ "repo_name": "opennode/nodeconductor", "path": "waldur_core/core/schemas.py", "copies": "1", "size": "13304", "license": "mit", "hash": 8275202235963472000, "line_mean": 35.054200542, "line_max": 108, "alpha_frac": 0.629134095, "autogenerated": false, "ratio": 4.462931902046293, "config_test":...
from django.urls import NoReverseMatch, reverse from docutils import nodes, utils from ..utils import split_explicit_title def site_url_role(name, rawtext, text, lineno, inliner, options={}, content=[]): name = name.lower() has_explicit_title, title, target = split_explicit_title(text) title = utils.un...
{ "repo_name": "tony/django-docutils", "path": "django_docutils/lib/roles/develtech.py", "copies": "1", "size": "1937", "license": "mit", "hash": -934844244764956700, "line_mean": 32.9824561404, "line_max": 80, "alpha_frac": 0.642230253, "autogenerated": false, "ratio": 3.4775583482944343, "conf...
from django.urls import path, converters, register_converter from mapentity.registry import MapEntityOptions from .views import (JSSettings, admin_check_extents, DocumentPublic, DocumentBookletPublic, import_view, import_update_json, ThemeViewSet, MarkupPublic, sync_view, sync_update_json, SyncRand...
{ "repo_name": "makinacorpus/Geotrek", "path": "geotrek/common/urls.py", "copies": "2", "size": "2202", "license": "bsd-2-clause", "hash": -6913668696725017000, "line_mean": 46.8695652174, "line_max": 124, "alpha_frac": 0.6693914623, "autogenerated": false, "ratio": 3.592169657422512, "config_te...
from django.urls import path, include from cradmin_legacy.apps.cradmin_authenticate.views import logout from devilry.devilry_authenticate.views import CustomLoginView, allauth_views urlpatterns = [ path('login', CustomLoginView.as_view(), name='cradmin-authenticate-login'), path('logout', logout.cradmin_logou...
{ "repo_name": "devilry/devilry-django", "path": "devilry/devilry_authenticate/urls.py", "copies": "1", "size": "1308", "license": "bsd-3-clause", "hash": 5771579714288635000, "line_mean": 36.3714285714, "line_max": 86, "alpha_frac": 0.6918960245, "autogenerated": false, "ratio": 3.213759213759214...
from django.urls import path, include from django.contrib.auth.decorators import user_passes_test from django.contrib.sitemaps.views import sitemap from django.apps import apps from cms.sitemaps import CMSSitemap from dynamic_preferences.views import PreferenceFormView from dynamic_preferences.registries import globa...
{ "repo_name": "django-danceschool/django-danceschool", "path": "danceschool/urls.py", "copies": "1", "size": "3767", "license": "bsd-3-clause", "hash": 2822706962858807000, "line_mean": 39.0744680851, "line_max": 94, "alpha_frac": 0.7260419432, "autogenerated": false, "ratio": 3.812753036437247, ...
from django.urls import path, include from django.contrib import admin from django.contrib.auth.decorators import login_required from django.urls import reverse from django.http import HttpResponseBadRequest, HttpResponsePermanentRedirect from devilry.project.common.http_error_handlers import * # noqa from devilry.de...
{ "repo_name": "devilry/devilry-django", "path": "devilry/project/common/default_urls.py", "copies": "1", "size": "4806", "license": "bsd-3-clause", "hash": -1913947598647163000, "line_mean": 55.5411764706, "line_max": 119, "alpha_frac": 0.7226383687, "autogenerated": false, "ratio": 3.11471160077...
from django.urls import path, include from rest_framework_nested import routers from rest_framework.urlpatterns import format_suffix_patterns from api import views app_name = 'api' # routers generate URLs for methods like `.list` or `.retrieve` router = routers.SimpleRouter() router.register('persons', views.PersonV...
{ "repo_name": "swcarpentry/amy", "path": "amy/api/urls.py", "copies": "1", "size": "1688", "license": "mit", "hash": 3216454153644198400, "line_mean": 40.1707317073, "line_max": 78, "alpha_frac": 0.7031990521, "autogenerated": false, "ratio": 4.137254901960785, "config_test": false, "has_no_k...
from django.urls import path from club.views.account_views import * from club.views.info_views import * # URLs for logged in club members urlpatterns = [ path("", ClubHomeView.as_view(), name="club_home"), path("person/", PersonView.as_view(), name="club_person"), path("person/<int:pk>/", PersonView.as_vi...
{ "repo_name": "ianastewart/cwltc-admin", "path": "club/urls.py", "copies": "1", "size": "1968", "license": "mit", "hash": -4860814961012174000, "line_mean": 66.8620689655, "line_max": 101, "alpha_frac": 0.6920731707, "autogenerated": false, "ratio": 3.1488, "config_test": false, "has_no_keywo...
from django.urls import path from django.conf import settings from django.conf.urls.static import static from django.contrib.auth import views as auth_views from core import views urlpatterns = [ path('', views.HomeView.as_view(), name='home'), path('create-account/', views.UserCreateView.as_view(template_name...
{ "repo_name": "dvcolgan/tomatoestogether", "path": "tomatoestogether/urls.py", "copies": "1", "size": "1182", "license": "mit", "hash": -2887726175924212000, "line_mean": 50.3913043478, "line_max": 112, "alpha_frac": 0.7157360406, "autogenerated": false, "ratio": 3.456140350877193, "config_test...
from django.urls import path from django.conf.urls import url, include from django.views.decorators.cache import cache_page from .models import WebTweet from .serializers import WebTweetSerializer from rest_framework import routers, viewsets from . import views app_name = 'display' # ViewSets define the view behavi...
{ "repo_name": "jeromecc/doctoctocbot", "path": "src/display/urls.py", "copies": "1", "size": "1112", "license": "mpl-2.0", "hash": -2412538979548460000, "line_mean": 34.9032258065, "line_max": 83, "alpha_frac": 0.7185251799, "autogenerated": false, "ratio": 3.475, "config_test": false, "has_n...
from django.urls import path from django.contrib import admin from django.contrib.auth.models import User from django.core.signals import request_started from django.db import IntegrityError from django.dispatch import receiver from django_sysinfo.views import ( admin_sysinfo, check, echo, http_basic_login, sysinf...
{ "repo_name": "saxix/django-sysinfo", "path": "tests/demo/demoproject/urls.py", "copies": "1", "size": "1335", "license": "bsd-3-clause", "hash": 5078098067066412000, "line_mean": 33.2307692308, "line_max": 83, "alpha_frac": 0.6397003745, "autogenerated": false, "ratio": 3.3542713567839195, "co...
from django.urls import path from django.urls import reverse_lazy from django.views.generic import RedirectView, TemplateView app_name = "projects" urlpatterns = [ path( "", TemplateView.as_view(template_name="projects/projects_home.html"), name="home", ), path( "past/", ...
{ "repo_name": "DemocracyClub/Website", "path": "democracy_club/apps/projects/urls.py", "copies": "1", "size": "3028", "license": "bsd-3-clause", "hash": 751369312142655600, "line_mean": 26.7798165138, "line_max": 77, "alpha_frac": 0.5772787318, "autogenerated": false, "ratio": 3.837769328263625, ...
from django.urls import path from django.utils.translation import ugettext_lazy as _ from . import views urlpatterns = [ path("", views.StatsIndexView.as_view(), name="index"), path( "api/sprawy/czas_reakcji", views.StatsCaseReactionApiView.as_view(), name="case_reaction_api", ), ...
{ "repo_name": "watchdogpolska/poradnia.siecobywatelska.pl", "path": "poradnia/stats/urls.py", "copies": "3", "size": "3140", "license": "bsd-3-clause", "hash": 8497198082661349000, "line_mean": 28.0740740741, "line_max": 88, "alpha_frac": 0.5894904459, "autogenerated": false, "ratio": 3.376344086...
from django.urls import path from django.views.generic.base import RedirectView, TemplateView from . import views from .views import news, tavern app_name = "ddcz" urlpatterns = [ path("", RedirectView.as_view(url="aktuality/", permanent=True)), ### Creations and Creative Pages path( "rubriky/<c...
{ "repo_name": "dracidoupe/graveyard", "path": "ddcz/urls.py", "copies": "1", "size": "3598", "license": "mit", "hash": 4274641659744695300, "line_mean": 31.7090909091, "line_max": 88, "alpha_frac": 0.6050583658, "autogenerated": false, "ratio": 3.279854147675479, "config_test": false, "has_no...
from django.urls import path from django.views.generic import RedirectView from . import views urlpatterns = [ # Machinery Metasearch path("machinery/", views.machinery, name="pontoon.machinery"), # Legacy: Redirect to /machinery path( "search/", RedirectView.as_view(pattern_name="pont...
{ "repo_name": "mathjazz/pontoon", "path": "pontoon/machinery/urls.py", "copies": "2", "size": "1270", "license": "bsd-3-clause", "hash": 6451571022456542000, "line_mean": 27.8636363636, "line_max": 88, "alpha_frac": 0.6338582677, "autogenerated": false, "ratio": 3.7026239067055395, "config_test...
from django.urls import path from django.views.generic import RedirectView, TemplateView from . import views urlpatterns = [ # Terms path( "terms/", TemplateView.as_view(template_name="terms.html"), name="pontoon.terms", ), # TRANSLATE URLs # Legacy: Translate project's pag...
{ "repo_name": "mathjazz/pontoon", "path": "pontoon/base/urls.py", "copies": "3", "size": "2815", "license": "bsd-3-clause", "hash": -5095701468174838000, "line_mean": 33.7530864198, "line_max": 88, "alpha_frac": 0.6241563055, "autogenerated": false, "ratio": 3.558786346396966, "config_test": fa...
from django.urls import path from django.views.generic import TemplateView import app6_template_tools.views urlpatterns = [ path("filters/", app6_template_tools.views.filters, name="template_filters"), path("tags/", app6_template_tools.views.tags, name="template_tags"), path( "inheritance/", ...
{ "repo_name": "sametmax/Django--an-app-at-a-time", "path": "apps/app6_template_tools/urls.py", "copies": "1", "size": "1193", "license": "mit", "hash": -2591908888270585000, "line_mean": 38.7666666667, "line_max": 84, "alpha_frac": 0.6873428332, "autogenerated": false, "ratio": 4.003355704697986,...
from django.urls import path from grandchallenge.retina_importers import views app_name = "importers" urlpatterns = [ path("check_image/", views.CheckImage.as_view(), name="check-image"), path("upload_image/", views.UploadImage.as_view(), name="upload-image"), path( "upload_image_registration_land...
{ "repo_name": "comic/comic-django", "path": "app/grandchallenge/retina_importers/urls.py", "copies": "1", "size": "1094", "license": "apache-2.0", "hash": 4070439849582263300, "line_mean": 31.1764705882, "line_max": 76, "alpha_frac": 0.6590493601, "autogenerated": false, "ratio": 4.00732600732600...
from django.urls import path from hc.accounts import views urlpatterns = [ path("login/", views.login, name="hc-login"), path("login/two_factor/", views.login_webauthn, name="hc-login-webauthn"), path("logout/", views.logout, name="hc-logout"), path("signup/", views.signup, name="hc-signup"), path(...
{ "repo_name": "healthchecks/healthchecks", "path": "hc/accounts/urls.py", "copies": "1", "size": "1361", "license": "bsd-3-clause", "hash": -1969165307473944800, "line_mean": 40.2424242424, "line_max": 85, "alpha_frac": 0.6429096253, "autogenerated": false, "ratio": 3.553524804177546, "config_t...