hash
stringlengths
64
64
content
stringlengths
0
1.51M
78879c629cc001785334572cf3eb9681a7d678301540658d92dafc7582870a97
import ctypes import faulthandler import io import itertools import logging import multiprocessing import os import pickle import sys import textwrap import unittest from importlib import import_module from io import StringIO from django.core.management import call_command from django.db import connections from django...
171a709ea1833b4af0f6d74af0ab0d2b20e547be77cccc1eff272e3330de4c49
""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ import logging import re import string from collections import defaultdict from urllib.parse import urlparse from django.conf import settings from django.core.excepti...
b46ff7e5773190527fb12b1db6236def3f6c28a7fc55725b296ec233678f2042
import re from django.conf import settings from django.contrib.sessions.backends.cache import SessionStore from django.core.exceptions import ImproperlyConfigured from django.http import HttpRequest, HttpResponse from django.middleware.csrf import ( CSRF_SESSION_KEY, CSRF_TOKEN_LENGTH, REASON_BAD_ORIGIN, REASON_BA...
98d66e96c15882c0cd86c58eebc93ffa25c0c3fe94ca355ecf835402f1b13bec
import os from argparse import ArgumentParser from contextlib import contextmanager from unittest import TestSuite, TextTestRunner, defaultTestLoader, mock from django.db import connections from django.test import SimpleTestCase from django.test.runner import DiscoverRunner from django.test.utils import ( NullTime...
5689fc7435fe3c833f048e496ea26e9db8024e67f7c293540b3b48d9e0776fc0
import pickle import unittest from django.test import SimpleTestCase from django.test.runner import RemoteTestResult try: import tblib except ImportError: tblib = None class ExceptionThatFailsUnpickling(Exception): """ After pickling, this class fails unpickling with an error about incorrect arg...
3ed7add28a9057f004b7a0034549d9525c4ece9d2d84fdaf62466bb320b1ea24
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
22a2c25482c54a7244618d95067773507096248847b9657d94694dc2038a0c83
#!/usr/bin/env python import argparse import atexit import copy import gc import os import shutil import socket import subprocess import sys import tempfile import warnings try: import django except ImportError as e: raise RuntimeError( 'Django module not found, reference tests/README.rst for instructi...
dd0e2527f4d0a4ba45e8183a451130325cbdc9230a96444e5b2fce9758688222
# Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't picklable (module imports are okay...
4761190a11c44c8828fabef749004ad8b853ca0dcbfae46d150740e655e38ae9
import ctypes import faulthandler import io import itertools import logging import multiprocessing import os import pickle import sys import textwrap import unittest from importlib import import_module from io import StringIO from django.core.management import call_command from django.db import connections from django...
bba49ba034567c0012523ba5a8050af310644382f240d52b7dc64816b36067e7
import asyncio import difflib import json import logging import posixpath import sys import threading import unittest import warnings from collections import Counter from contextlib import contextmanager from copy import copy, deepcopy from difflib import get_close_matches from functools import wraps from unittest.suit...
7ac04d10d49f2e91582ee00179bd0c6f1e502292da88631156be347c986a92cc
""" Default Django settings. Override these with settings in the module pointed to by the DJANGO_SETTINGS_MODULE environment variable. """ # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. def gettext_noop(s): return s ####...
3778f90fb9b98daf4cb605676ccd1519ddc13a948829ea75fc8590391959a2d2
import functools import itertools import logging import os import signal import subprocess import sys import threading import time import traceback import weakref from collections import defaultdict from pathlib import Path from types import ModuleType from zipimport import zipimporter import django from django.apps i...
f5a03581321ee39d83cf75352a897eb5c0e9c443742248927e76dc68eb11ece1
import html.entities import re import unicodedata from gzip import GzipFile from io import BytesIO from django.core.exceptions import SuspiciousFileOperation from django.utils.functional import SimpleLazyObject, keep_lazy_text, lazy from django.utils.regex_helper import _lazy_re_compile from django.utils.translation i...
7fa19b9ae2d17ab3b35795717d6a46f0f87ce5a0dded1761642b3a78bbc16721
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ import copy from django.utils.hashable import make_hashable class Node: """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or...
55753641e4958f255d070410befd483f3af32a54848ba3e1aaed035eb3995843
""" PHP date() style date formatting See http://www.php.net/date for format strings Usage: >>> import datetime >>> d = datetime.datetime.now() >>> df = DateFormat(d) >>> print(df.format('jS F Y H:i')) 7th October 2003 11:39 >>> """ import calendar import datetime from email.utils import format_datetime as format_datet...
711e4624739b7f4c09a5d8660ee08b652668886a3af1f4cd790c38f8a777872c
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title="Poynter E-Media Tidbits", ... link="http://www.poynter.org/column.asp?id=31", ... description="A group Weblog by the sharpes...
f7d85ae10a53520b259b8f608ed23c3a8e919c0d4c8bede479268525750a9660
import asyncio import functools import os from django.core.exceptions import SynchronousOnlyOperation def async_unsafe(message): """ Decorator to mark functions as async-unsafe. Someone trying to access the function while in an async context will get an error message. """ def decorator(func): ...
aaaa7711663d99400acb75b1d7f0c5768c1a98846d8631fdeb9d6b509cb1e080
import datetime import decimal import functools import re import unicodedata from importlib import import_module from django.conf import settings from django.utils import dateformat, numberformat from django.utils.functional import lazy from django.utils.translation import ( check_for_language, get_language, to_lo...
73d4e52c96e3c3234da7bcfdbe3cb33c172b63f3059afe54add8d52818111ba0
""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ import logging import string from collections import defaultdict from urllib.parse import urlparse from django.conf import settings from django.core.exceptions import...
24367c3137a21b241ff67f3b486c11019e3e6b2943076570c28bcc464ddf5ffd
""" HTML Widget classes """ import copy import datetime import warnings from collections import defaultdict from itertools import chain from django.forms.utils import to_current_timezone from django.templatetags.static import static from django.utils import formats from django.utils.datastructures import OrderedSet f...
d361ecea65ce03894cd236e0a8433533c2e44bead53ac765bea9839b3e96babc
import ipaddress import re import warnings from pathlib import Path from urllib.parse import urlsplit, urlunsplit from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.deprecation import RemovedInDjango41Warning from django.utils.encoding import punyc...
3a97d51040285eacd98bd7967577275d5c2eda2bef990c6f995b62c214bb3fa5
import datetime import json import mimetypes import os import re import sys import time from collections.abc import Mapping from email.header import Header from http.client import responses from urllib.parse import quote, urlparse from django.conf import settings from django.core import signals, signing from django.co...
9621721d8e4b886eeb9f96d9940e4ba80d79668f52555a90d6f6ce4d43b8f574
from urllib.parse import quote, urljoin from django import template from django.apps import apps from django.utils.encoding import iri_to_uri from django.utils.html import conditional_escape register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" ...
b365b9d601bbb504c79dd5a1645784b22ca9dd17f66defe9a2269fd7de53091a
import copy from collections import defaultdict from contextlib import contextmanager from functools import partial from django.apps import AppConfig from django.apps.registry import Apps, apps as global_apps from django.conf import settings from django.db import models from django.db.models.fields.related import RECU...
1a6bfbd7cb66801e205ca750e9ffaab8ed101f5acc11e0ac979f2bf9c9a0f6c6
import functools import re from itertools import chain from django.conf import settings from django.db import models from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.operations.models import AlterModelOptions from django.db.migrations.optimizer ...
571b25b9b823bd72d67c76e9b934e0f12fcc5053a286c9c63fc271fb49441a81
import datetime import re from django.db.models.fields.related import RECURSIVE_RELATIONSHIP_CONSTANT COMPILED_REGEX_TYPE = type(re.compile('')) class RegexObject: def __init__(self, obj): self.pattern = obj.pattern self.flags = obj.flags def __eq__(self, other): return self.pattern...
eb74d9d243be69405249301843e43f5bf94d2c458e5ce27e88e19a234504907e
import copy import inspect import warnings from functools import partialmethod from itertools import chain import django from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjects...
52a22883cc5bc2af01363aebbf5a1879d160fe85c99b540ca5636ad80052c211
import copy import datetime import functools import inspect from decimal import Decimal from uuid import UUID from django.core.exceptions import EmptyResultSet, FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import fields from django.db.models.constants import LOOKU...
98656ca21b5ed821a5222cc4be0fa1f3d7ea4f6cc65f55ff65237f4c42aa3d6b
import itertools import math from copy import copy from django.core.exceptions import EmptyResultSet from django.db.models.expressions import Case, Func, Value, When from django.db.models.fields import ( CharField, DateTimeField, Field, IntegerField, UUIDField, ) from django.db.models.query_utils import RegisterLo...
116e874ca8cdb29d3728ee2b2ebe6482cb7269b7e4a60c0b0d820c0c571cbaa9
from django.db import models from django.db.migrations.operations.base import Operation from django.db.migrations.state import ModelState from django.db.migrations.utils import resolve_relation from django.db.models.options import normalize_together from django.utils.functional import cached_property from .fields impo...
5006922b865041c80e69c0a27851278a762be658e2db1660ce9f8142f36190a8
from collections import namedtuple from django.db.migrations.utils import resolve_relation FieldReference = namedtuple('FieldReference', 'to through') def field_references( model_tuple, field, reference_model_tuple, reference_field_name=None, reference_field=None, ): """ Return either Fa...
4e2c39f237021dd450943c5e9703edec9a21d3a617bc900f5cec78d882aadcc7
import collections.abc import copy import datetime import decimal import operator import uuid import warnings from base64 import b64decode, b64encode from functools import partialmethod, total_ordering from django import forms from django.apps import apps from django.conf import settings from django.core import checks...
b6e0cf1f49e2c84e26345b0c085503b6d6857bee2857dfb84a16a6da14f4d54f
from datetime import datetime from django.conf import settings from django.db.models.expressions import Func from django.db.models.fields import ( DateField, DateTimeField, DurationField, Field, IntegerField, TimeField, ) from django.db.models.lookups import ( Transform, YearExact, YearGt, YearGte, YearLt, Yea...
d5e933f629df8ab8a3af9d11a4063152b5ea68b446c3e4e67cc527bec28a37a0
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
b48dafa9547ce8784a9f63ba7ee636a0f69be9481cc7073c38b5ed2895ffeace
import collections import re from functools import partial from itertools import chain from django.core.exceptions import EmptyResultSet, FieldError from django.db import DatabaseError, NotSupportedError from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import F, OrderBy, RawSQL, Ref,...
6fe99ade5793f82e8070ae32c3bc31cf09b281e11630c81b8656bbebc2ec183f
""" Useful auxiliary data structures for query construction. Not useful outside the SQL domain. """ from django.db.models.sql.constants import INNER, LOUTER class MultiJoin(Exception): """ Used by join construction code to indicate the point at which a multi-valued join was attempted (if the caller wants ...
e8e1a35df8f3d36394f274aa3b0c2860266071d0786e039e536aba4e8c6d62a8
import datetime import uuid from functools import lru_cache from django.conf import settings from django.db import DatabaseError, NotSupportedError from django.db.backends.base.operations import BaseDatabaseOperations from django.db.backends.utils import strip_quotes, truncate_name from django.db.models import AutoFie...
690da4b41c69b2270d8cb9a3c953aba1b314b93f35569a1110083769e667fc49
import logging from datetime import datetime from django.db.backends.ddl_references import ( Columns, Expressions, ForeignKeyName, IndexName, Statement, Table, ) from django.db.backends.utils import names_digest, split_identifier from django.db.models import Deferrable, Index from django.db.models.sql import Query...
3398552b7d196759e9b9f146642952df1dc3cd3eba3faf47358ac4ab0061676d
import operator from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): empty_fetchmany_value = () allows_group_by_pk = True related_fields_match_type = True # MySQL doesn't support sliced subq...
68f96395b0d59b7b2db53e696379616339864c64336c09f492b81e8a6243dea0
import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import timezone from django.utils.encoding import force_str class DatabaseOperations(BaseDatabaseOperations): compiler_module = "django.db.backends.mysql.compiler" # MySQL sto...
391804f8cc6ab991d5cfe823935b48799c20abeba08fd35b152b0e9bc2325867
import copy from decimal import Decimal from django.apps.registry import Apps from django.db import NotSupportedError from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.backends.ddl_references import Statement from django.db.backends.utils import strip_quotes from django.db.models impor...
ce3fa7dde189a5b12aedf9eb5cca0c7f913542444cf513d70391465bf196d58e
import os import pathlib from datetime import datetime from urllib.parse import urljoin from django.conf import settings from django.core.exceptions import SuspiciousFileOperation from django.core.files import File, locks from django.core.files.move import file_move_safe from django.core.files.utils import validate_fi...
9341b90b8567e9bce7551afc3860b0d0533809b475eb61945b1a9010f6d60097
import copy import json import operator import re from functools import partial, reduce, update_wrapper from urllib.parse import quote as urlquote from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.ch...
b846d949fb3577dca131a6ad252b33e9ebf2b22b2caa7f16c033da25771ab261
import re from functools import update_wrapper from weakref import WeakSet from django.apps import apps from django.conf import settings from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.views.autocomplete import AutocompleteJsonView from django.contrib.auth import REDIRECT_FIELD_NAME from...
d21a2b51ab8894eb2b9ed121b3be6a1230eb702a106694099f81c3af02fb94bd
import datetime import decimal import json from collections import defaultdict from django.core.exceptions import FieldDoesNotExist from django.db import models, router from django.db.models.constants import LOOKUP_SEP from django.db.models.deletion import Collector from django.forms.utils import pretty_name from djan...
8705ee7c0cdc7026cd7512f32e98c2be15110fc970ded9449c1106738ea6a62c
from datetime import datetime, timedelta from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import FieldListFilter from django.contrib.admin.exceptions import ( DisallowedModelAdminLookup, DisallowedModelAdminToField, ) from django.contrib.admin....
06fcdbbe16ed7cafaca03336aa38a6b705cb9bc1866bfd2f7a446218802c8f2a
""" GDAL - Constant definitions """ from ctypes import ( c_double, c_float, c_int16, c_int32, c_ubyte, c_uint16, c_uint32, ) # See https://www.gdal.org/gdal_8h.html#a22e22ce0a55036a96f652765793fb7a4 GDAL_PIXEL_TYPES = { 0: 'GDT_Unknown', # Unknown or unspecified type 1: 'GDT_Byte', # Eight bit unsigned i...
d86b1e40620f374f1477a316c93c0d6cc6b53f5e551cc928ebe3120418557108
import datetime import importlib import io import os import sys from unittest import mock from django.apps import apps from django.core.management import CommandError, call_command from django.db import ( ConnectionHandler, DatabaseError, OperationalError, connection, connections, models, ) from django.db.back...
db1a15623a06623f8d8886b7f127c493dea861cce98b9c1f225cb4e7ad24f580
import datetime import decimal import enum import functools import math import os import pathlib import re import sys import uuid from unittest import mock import custom_migration_operations.more_operations import custom_migration_operations.operations from django import get_version from django.conf import SettingsRe...
ce900af454630df8f7f153f046955fa086452474eeee99d771cc03ef37a0f0fc
from django.core.exceptions import FieldDoesNotExist from django.db import ( IntegrityError, connection, migrations, models, transaction, ) from django.db.migrations.migration import Migration from django.db.migrations.operations.fields import FieldOperation from django.db.migrations.state import ModelState, Projec...
5133a1da08d436c61c53d7d35e598a1811ac6036e7625807771cfb467d406363
import datetime import re from unittest import mock from django.contrib.auth.forms import ( AdminPasswordChangeForm, AuthenticationForm, PasswordChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm, UserChangeForm, UserCreationForm, ) from django.contrib.aut...
1a502972748f75e1ddc37ec6ccc3580d7a6c822dce8b4db0ec43972f964908b1
import datetime import os import re import unittest from unittest import mock from urllib.parse import parse_qsl, urljoin, urlparse import pytz try: import zoneinfo except ImportError: try: from backports import zoneinfo except ImportError: zoneinfo = None from django.contrib import admin...
5ea2417678ab498a5adc1a02f0e1697760ecd36886f0147841d31119f79f5a8c
import os import re import types from datetime import datetime, timedelta from decimal import Decimal from unittest import TestCase, mock from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.core.validators import ( BaseValidator, DecimalValidator, EmailVali...
bc0f4492713ad9adb2d8b559f31fb86043bc96c375be504a777732604a56e9f9
import os import shutil import sys import tempfile import unittest from io import StringIO from pathlib import Path from unittest import mock from django.conf import settings from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles.management.commands.collectstatic import ( Command a...
38a64e9ba577a47ac1704292d406b8af80ae27d8419249a7ddfcd6c685b6da7e
from datetime import date, datetime from django.test import SimpleTestCase, override_settings from django.test.utils import TZ_SUPPORT, requires_tz_support from django.utils import dateformat, translation from django.utils.dateformat import format from django.utils.timezone import ( get_default_timezone, get_fixed...
bca6ab18d03f9cdb446cb4d56a4f04ed97a49a2f97acac13b45f5ac435ed4a96
import contextlib import os import py_compile import shutil import sys import tempfile import threading import time import types import weakref import zipfile from importlib import import_module from pathlib import Path from subprocess import CompletedProcess from unittest import mock, skip, skipIf import pytz import...
abdce12fea7b8bb81b5ce9af69e43bf5bd3672a152a33bfe25e532fa95354d73
import os import unittest.loader from argparse import ArgumentParser from contextlib import contextmanager from importlib import import_module from unittest import TestSuite, TextTestRunner, defaultTestLoader, mock from django.db import connections from django.test import SimpleTestCase from django.test.runner import ...
e31c2925b8832256f38379a45730f7912dca7b50f8cf3d9f846fc2975bea0938
import datetime import pickle import sys import unittest from operator import attrgetter from threading import Lock from django.core.exceptions import EmptyResultSet, FieldError from django.db import DEFAULT_DB_ALIAS, connection from django.db.models import Count, Exists, F, Max, OuterRef, Q from django.db.models.expr...
0209c62dc1832706093c4af0998111bd32308eda39189a05894df1279c82b465
import datetime import itertools import unittest from copy import copy from unittest import mock from django.core.exceptions import FieldError from django.core.management.color import no_style from django.db import ( DatabaseError, DataError, IntegrityError, OperationalError, connection, ) from django.db.models im...
8c6e7c1e58563ab17682baca64789a08f839a348103e829ada0b9039ca53167d
from unittest import mock from django.core import checks from django.core.checks import Error, Warning from django.db import models from django.test import SimpleTestCase, TestCase, skipUnlessDBFeature from django.test.utils import ( isolate_apps, modify_settings, override_settings, override_system_checks, ) cla...
0b0d03abcdcfb9d6d05d54a141e3dc00e35cd56269895185e837f9baeedd8454
import base64 import hashlib import os import shutil import sys import tempfile as sys_tempfile import unittest from io import BytesIO, StringIO from unittest import mock from urllib.parse import quote from django.core.exceptions import SuspiciousFileOperation from django.core.files import temp as tempfile from django...
5acf37beb904ee30cebf0e4dd5eed09eaab924f885e011dae2abdc61e05718ed
import unittest from django.core.checks import Error, Warning from django.core.checks.model_checks import _check_lazy_references from django.db import connection, connections, models from django.db.models.functions import Abs, Lower, Round from django.db.models.signals import post_init from django.test import SimpleTe...
d13bfd211f75b55a6b071cb6f342ceb91e1434eab248f2035afbbac6f5e468f9
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
548f79befa97ba9b4eb580170acc3f88247dae663c8f02c5b67734fc976d2c0c
""" Tests for F() query expression syntax. """ import uuid from django.db import models class Manager(models.Model): name = models.CharField(max_length=50) class Employee(models.Model): firstname = models.CharField(max_length=50) lastname = models.CharField(max_length=50) salary = models.IntegerFie...
e17ec1fdfcd62e40eed1f3d15ef32f18296c5d8451817de5f863fe4d4fdd0d7f
import os import re import shutil import tempfile import time import warnings from io import StringIO from pathlib import Path from unittest import mock, skipIf, skipUnless from admin_scripts.tests import AdminScriptTestCase from django.core import management from django.core.management import execute_from_command_li...
886421da972d2ba40cecb42dd154f313e9eb200a7af95a09d195c173e3e0f0e6
import datetime import decimal import gettext as gettext_module import os import pickle import re import tempfile from contextlib import contextmanager from importlib import import_module from pathlib import Path from unittest import mock from asgiref.local import Local from django import forms from django.apps impor...
36c0d58a52cfef8ac4d60fddbc1a0bbbb18457619134bda8eccabea6e591dc10
import collections.abc from datetime import datetime from math import ceil from operator import attrgetter from django.core.exceptions import FieldError from django.db import connection, models from django.db.models import ( BooleanField, Exists, ExpressionWrapper, F, Max, OuterRef, Q, ) from django.db.models.func...
98fb4fa2d77dfa4bee491fa0cbc3bbeee86c4939a42b6f297270bdc749765b83
import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin...
5433c79d382a88ab941d275464261656fcbb868cf513b6a044f73b875a4d684e
import importlib import inspect import os import re import sys import tempfile import threading from io import StringIO from pathlib import Path from unittest import mock from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.db import DatabaseError, connection from djan...
101218f9dc441013f17e99f3d8dbbac12ef8ef9bb795185e48c9f8879c9cfcc9
from datetime import datetime, timedelta, timezone as datetime_timezone import pytz try: import zoneinfo except ImportError: try: from backports import zoneinfo except ImportError: zoneinfo = None from django.conf import settings from django.db.models import ( DateField, DateTimeField...
2877effffdf0955575a3026fff789305aa0926876d80d113b8015a42225383c2
import copy import inspect import warnings from functools import partialmethod from itertools import chain import django from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjects...
c79e9137176aa991683886e4470c07459bfcfd6bea4fcbc8742962e6e7ebe87b
import copy import datetime import functools import inspect from decimal import Decimal from uuid import UUID from django.core.exceptions import EmptyResultSet, FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import fields from django.db.models.constants import LOOKU...
3e573e5a31e68d2e435f0d3b50b0d1ad7f5edf4c23b68a0ea642d6212e4bca82
import itertools import math from copy import copy from django.core.exceptions import EmptyResultSet from django.db.models.expressions import Case, Func, Value, When from django.db.models.fields import ( CharField, DateTimeField, Field, IntegerField, UUIDField, ) from django.db.models.query_utils import RegisterLo...
1edae775705bc0a38d3856b22044a336ee69c8a6f529f34434f4b33096bb873b
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
e026987035117f14a9d5156526114c9e25b68f38b8a9801291e12257f66468d5
import collections import re from functools import partial from itertools import chain from django.core.exceptions import EmptyResultSet, FieldError from django.db import DatabaseError, NotSupportedError from django.db.models.constants import LOOKUP_SEP from django.db.models.expressions import F, OrderBy, RawSQL, Ref,...
034753ac0bc085a1b741ba49581cd54ee402f7e7022a232d3b6d4c0de4d01db5
import logging from datetime import datetime from django.db.backends.ddl_references import ( Columns, Expressions, ForeignKeyName, IndexName, Statement, Table, ) from django.db.backends.utils import names_digest, split_identifier from django.db.models import Deferrable, Index from django.db.models.sql import Query...
26280f798f0d1d5b558d9707336a7491f234fc8d28e0ba1796f8e9390e0d595e
from urllib.parse import urlencode from urllib.request import urlopen from django.apps import apps as django_apps from django.conf import settings from django.core import paginator from django.core.exceptions import ImproperlyConfigured from django.urls import NoReverseMatch, reverse from django.utils import translati...
13dea5043c0694a35f2e3e1549aefe7bf6db1fe8666a0354d98717a6642d4167
import copy import json import operator import re from functools import partial, reduce, update_wrapper from urllib.parse import quote as urlquote from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.ch...
023314e8cbbf3a982bf0513747157007db04f354d0f38ae8ff560ebd5e25fd6b
import re from functools import update_wrapper from weakref import WeakSet from django.apps import apps from django.conf import settings from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.views.autocomplete import AutocompleteJsonView from django.contrib.auth import REDIRECT_FIELD_NAME from...
4ffb6ae8d55877127a7e3684ff725f6371bf8f0103f2072992475ebaab09603f
from datetime import datetime, timedelta from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import FieldListFilter from django.contrib.admin.exceptions import ( DisallowedModelAdminLookup, DisallowedModelAdminToField, ) from django.contrib.admin....
4456b957ecd7419b41bf689154773b1d274d8a6d745bb2b5b2fff22aeb871138
from django.core.exceptions import FieldDoesNotExist from django.db import ( IntegrityError, connection, migrations, models, transaction, ) from django.db.migrations.migration import Migration from django.db.migrations.operations.fields import FieldOperation from django.db.migrations.state import ModelState, Projec...
aa2bfb6362ea23714f1cdcef77b96d2c8c724e30c12f69392d5a3b7ea1b509eb
import datetime import os import re import unittest from unittest import mock from urllib.parse import parse_qsl, urljoin, urlparse import pytz try: import zoneinfo except ImportError: try: from backports import zoneinfo except ImportError: zoneinfo = None from django.contrib import admin...
2d4f1e2b17a93dc4a1c4b0cbdee22a8026e1e3a50a81352a3eea3586941db8e4
import datetime import pickle import sys import unittest from operator import attrgetter from threading import Lock from django.core.exceptions import EmptyResultSet, FieldError from django.db import DEFAULT_DB_ALIAS, connection from django.db.models import Count, Exists, F, OuterRef, Q from django.db.models.expressio...
3da8a38196c0d54ec308fa47ab589d87acd3b2e2d21c53a25a4b5ee3d8407403
import os from datetime import date from django.contrib.sitemaps import Sitemap from django.contrib.sites.models import Site from django.core.exceptions import ImproperlyConfigured from django.test import modify_settings, override_settings from django.utils import translation from django.utils.formats import localize ...
f9f0043d797f2519041ed16b565383626b9c5ebf01269ccf71e61f50ff992589
import datetime import itertools import unittest from copy import copy from unittest import mock from django.core.exceptions import FieldError from django.core.management.color import no_style from django.db import ( DatabaseError, DataError, IntegrityError, OperationalError, connection, ) from django.db.models im...
29aefe3bbbcd90b9a20b6c105768e4703f1a0387b6d1bbe1f3a1c2d986e9a268
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
3ce676fa8c31dc053f9f14c2510b5af90261c008d00310ed0acc61b527b62b25
import datetime import decimal import gettext as gettext_module import os import pickle import re import tempfile from contextlib import contextmanager from importlib import import_module from pathlib import Path from unittest import mock from asgiref.local import Local from django import forms from django.apps impor...
851a0e89ae1e1be11b46c032cc071ae87e093adc98a34e134a20cbe60899f9ee
import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin...
405076a9b29af9d0096836dc51f01f2052dfb3345788a6610f7fedf0c2e9d117
import importlib import inspect import os import re import sys import tempfile import threading from io import StringIO from pathlib import Path from unittest import mock from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.db import DatabaseError, connection from djan...
4c42d7b1809b6a2b2cbcf9920a6bb747ab0be2f5473a869d93402615b6e4ee2e
import functools import itertools import logging import os import signal import subprocess import sys import threading import time import traceback import weakref from collections import defaultdict from pathlib import Path from types import ModuleType from zipimport import zipimporter import django from django.apps i...
eb32591bf4b696927d5a8e9d55181cd013c710624c631b01121f854fec561703
# Copyright (c) 2010 Guilherme Gondim. All rights reserved. # Copyright (c) 2009 Simon Willison. All rights reserved. # Copyright (c) 2002 Drew Perttula. All rights reserved. # # License: # Python Software Foundation License version 2 # # See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF # ...
c30986a75ff77f14969245473d42434fb96e60748efeafd2bf593459f5936c7d
import datetime import json import mimetypes import os import re import sys import time from collections.abc import Mapping from email.header import Header from http.client import responses from urllib.parse import quote, urlparse from django.conf import settings from django.core import signals, signing from django.co...
42a8d6d6718072e40993b7cd81ce9c186e5dc91b8ab48ec5a033e42a7d3a980d
import copy import datetime import functools import inspect from decimal import Decimal from uuid import UUID from django.core.exceptions import EmptyResultSet, FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import fields from django.db.models.constants import LOOKU...
005e698a6a23891ebfadf7ec2490f96a365a7c9aa22cab28cf44f4b498df20e2
import itertools import math from copy import copy from django.core.exceptions import EmptyResultSet from django.db.models.expressions import Case, Func, Value, When from django.db.models.fields import ( CharField, DateTimeField, Field, IntegerField, UUIDField, ) from django.db.models.query_utils import RegisterLo...
ecd9fa7ff99cd6b795176244b201a37fe12b0c4cea562a42c11212f36c1fb07d
import datetime import posixpath from django import forms from django.core import checks from django.core.files.base import File from django.core.files.images import ImageFile from django.core.files.storage import Storage, default_storage from django.core.files.utils import validate_file_name from django.db.models imp...
9041fe3da2d9f42ddd159ebe5fede61bd8c61ae8b487d6c38208b0fe8520e8ab
import datetime import uuid from functools import lru_cache from django.conf import settings from django.db import DatabaseError, NotSupportedError from django.db.backends.base.operations import BaseDatabaseOperations from django.db.backends.utils import strip_quotes, truncate_name from django.db.models import AutoFie...
a674796a46ed147ac31f44e32ac344ebcc34e7c924d1befdaa15556df24a2429
import os from django.core.exceptions import SuspiciousFileOperation def validate_file_name(name): if name != os.path.basename(name): raise SuspiciousFileOperation("File name '%s' includes path elements" % name) # Remove potentially dangerous names if name in {'', '.', '..'}: raise Suspi...
abde1bd0b160dfae6b0522b56825cc448875955685f97605a8b11fe9f31b4745
import os import pathlib from datetime import datetime from urllib.parse import urljoin from django.conf import settings from django.core.exceptions import SuspiciousFileOperation from django.core.files import File, locks from django.core.files.move import file_move_safe from django.core.files.utils import validate_fi...
28e3c3fcfc5010795551aa6733ab39b9c956e3c3d0230da129f81402882a8b28
"Database cache backend." import base64 import pickle from datetime import datetime from django.conf import settings from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.db import DatabaseError, connections, models, router, transaction from django.utils import timezone class Options: ...
cce09f3c929b5a340519eeac120ce9f58ae0177e88623876cc2e86507d94c720
import copy import json import operator import re from functools import partial, reduce, update_wrapper from urllib.parse import quote as urlquote from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.ch...