hash
stringlengths
64
64
content
stringlengths
0
1.51M
8fe439a9385cf399a091efab926f6f234eec2f8aec49f39414dfac89cde2e19e
import datetime import os import re import unittest from unittest import mock from urllib.parse import parse_qsl, urljoin, urlparse try: import zoneinfo except ImportError: from backports import zoneinfo try: import pytz except ImportError: pytz = None from django.contrib import admin from django.con...
6c76984a0a00116c396ac67e34d3f5988a3fad9838a0bee8334adb7a544c120e
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 ( ...
0edbdf7cc3e9a2f6a93da466da428626d8b89c9e47e7ae5b60cef12f4bfd942d
import asyncio import difflib import json import logging import posixpath import sys import threading import unittest 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.suite import _DebugR...
a306338eef8f61cde525e0c20db5b58fa7db6258367999791cc7945e7eb4ff1c
import bisect import copy import inspect from collections import defaultdict from django.apps import apps from django.conf import settings from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.db import connections from django.db.models import AutoField, Manager, OrderWrt, UniqueConstr...
91939acc8ef7a9206c2695f4891204cbaf3f17ee36459362f47bb50a20c5c4ba
import functools import inspect from functools import partial from django import forms from django.apps import apps from django.conf import SettingsReference, settings from django.core import checks, exceptions from django.db import connection, router from django.db.backends import utils from django.db.models import Q...
917171a702d8e114db8755f2e48b20159767b0cf1e9f5105ab051b331f44a419
""" 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 ...
119936012b0ac3c1aca23349abbaeaadfe4be721bddff9b1743b031cba76df11
from django.db import DatabaseError, InterfaceError from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): # Oracle crashes with "ORA-00932: inconsistent datatypes: expected - got # BLOB" when grouping...
65dd8a0ee5ccad058f5789889e874271d1ba68d80478e1163a38a73aa86d498e
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 ( split_tzname_delta, strip_quotes, truncate_name, ) from dj...
4a3c7b897dd25b3d94ef555abeb74dd7ffeb8bae85d60a9e30f941c983fd0d29
import datetime import decimal from importlib import import_module import sqlparse from django.conf import settings from django.db import NotSupportedError, transaction from django.db.backends import utils from django.utils import timezone from django.utils.encoding import force_str class BaseDatabaseOperations: ...
a1fc9bdf33773f6f16ec6a533d55f01766f7ed9336b8f473143f89b41d489e88
import operator import platform from django.db import transaction from django.db.backends.base.features import BaseDatabaseFeatures from django.db.utils import OperationalError from django.utils.functional import cached_property from .base import Database class DatabaseFeatures(BaseDatabaseFeatures): test_db_al...
d9297e970ac2d0e7a27b86914f7e29813ca45765cb9749c804198e253ca931ed
""" SQLite backend for the sqlite3 module in the standard library. """ import datetime import decimal import functools import hashlib import math import operator import random import re import statistics import warnings from itertools import chain from sqlite3 import dbapi2 as Database from django.core.exceptions impo...
cde61ea9788ba5ce634e55257fc4a566d639a6e8c3ee162d9c7bc610f418d807
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...
4037b35f4eb21cd545aa3ca23661122600913031ef474ac4716d6fa7bc5735db
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...
b23877f5939960c5087aebb7e51a5ecbf1599f79579a2326048cc4b4cb0de65e
import logging import os import unittest import warnings from io import StringIO from unittest import mock from django.conf import settings from django.contrib.staticfiles.finders import get_finder, get_finders from django.contrib.staticfiles.storage import staticfiles_storage from django.core.exceptions import Improp...
a8bc159e7d48476f6798336f77447a0b6a53d0d89c35c00ccccdb7219aebee31
import datetime import pickle import django from django.db import models from django.test import TestCase from .models import Container, Event, Group, Happening, M2MModel, MyEvent class PickleabilityTestCase(TestCase): @classmethod def setUpTestData(cls): cls.happening = Happening.objects.create() ...
f6015b15c92adabcf787bb1853577dc1c610e46bdec425232d2bc94b63d0d0a2
import datetime from django.db import DJANGO_VERSION_PICKLE_KEY, models from django.utils.translation import gettext_lazy as _ def standalone_number(): return 1 class Numbers: @staticmethod def get_static_number(): return 2 class PreviousDjangoVersionQuerySet(models.QuerySet): def __getst...
3810503e9cc17ae4ecadd974e78d632cf7f60d50aac8de845fa061f96be0cbfd
import os import re from io import StringIO from unittest import mock, skipUnless from django.core.management import call_command from django.db import connection from django.db.backends.base.introspection import TableInfo from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature from .models import ...
6abf102433e27642080c72590a5f8f5d06de673754ec6e9a6f80a22b8009adcd
# Unit tests for cache framework # Uses whatever cache backend is set in the test settings file. import copy import io import os import pickle import re import shutil import sys import tempfile import threading import time import unittest from pathlib import Path from unittest import mock, skipIf from django.conf impo...
4882c47605df8a17a61b4ab6cc8e04f3edfe34c3913b5ca8453696000d4c5ab5
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...
91e48b0273584fe70ca8ac59de55030b3312effe0c2c45f4c4e23406c3677782
import unittest from datetime import datetime, timedelta, timezone as datetime_timezone try: import zoneinfo except ImportError: from backports import zoneinfo try: import pytz except ImportError: pytz = None from django.conf import settings from django.db.models import ( DateField, DateTimeField...
6de52ac9bfac867f37ffd5e2191802b3bb26f0e42a80115198e7a823aea538b7
import asyncio import difflib import json import logging import posixpath import sys import threading import unittest 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.suite import _DebugR...
cef8b4d21e9b3fc050eb266e814f617ac6bdb78b4cdf94e0f0feab9049448492
""" 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 ####...
7ef6ccf364b2edd8fe43d8edc1cfafa47d592a73510c31a297197953845f227d
"""HTML utilities suitable for global use.""" import html import json import re from html.parser import HTMLParser from urllib.parse import ( parse_qsl, quote, unquote, urlencode, urlsplit, urlunsplit, ) from django.utils.encoding import punycode from django.utils.functional import Promise, keep_lazy, keep_lazy_t...
df3d04e7248d59c728fb08111fda5c3ea7de33f08b2f8f4b5cbfb67b154ec6c4
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...
6dca94becbf424a3d3af9dc4bc3079027925da6b39c420a94a99e687c1d41f52
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...
baa7dbe03156e42057ebf11febcec4a1d46e939488152b6d52d6b50d0626ab7e
from django.db.models.lookups import ( Exact, GreaterThan, GreaterThanOrEqual, In, IsNull, LessThan, LessThanOrEqual, ) class MultiColSource: contains_aggregate = False def __init__(self, alias, targets, sources, field): self.targets, self.sources, self.field, self.alias = targets, sources, f...
aca6f86a38de73efea4569e42834205c5ecb8542c1c8762b4cc6865e683466dc
""" 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 ...
b4c4879fb0626dbfe1df7d809c3c88ebeeb89bd0a5f700e8b1fbd6da1e2768f2
import collections import json 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, ...
9120603a9d4b7d448b55375e9e70277677960d0ca3d697c5ff7761e912a9dd3d
import _thread import copy import threading import time import warnings from collections import deque from contextlib import contextmanager try: import zoneinfo except ImportError: from backports import zoneinfo from django.conf import settings from django.core.exceptions import ImproperlyConfigured from djan...
ed470fcd0be138bdd2775593c6a2618eac23de241cc718f872d700134ea34db0
from django.db.models import F, OrderBy class OrderableAggMixin: def __init__(self, *expressions, ordering=(), **extra): if not isinstance(ordering, (list, tuple)): ordering = [ordering] ordering = ordering or [] # Transform minus sign prefixed strings into an OrderBy() expres...
15ce966c9f0d4559c1b984b0eaf6ac9360269e8ad8c18cbadf8428e48c861d5f
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, UnreadablePostError from django.middleware.csrf import ( CSRF_ALLOWED_CHARS, CSRF_SECRET_LENGTH, CSRF...
c2eae464ec550afc483075ea32ce4241639b794fdd2af774ce432056f4be5c94
from django.http import HttpRequest from django.template.context_processors import csrf from django.test import SimpleTestCase from .tests import CsrfFunctionTestMixin class TestContextProcessor(CsrfFunctionTestMixin, SimpleTestCase): def test_force_token_to_string(self): request = HttpRequest() ...
089a9366f24d32f26246d6e6adf6160fceacb44fa87fe17b8aa86a57cede1c0d
from functools import wraps from django.db import IntegrityError, connections, transaction from django.test import TestCase, skipUnlessDBFeature from django.test.testcases import DatabaseOperationForbidden, TestData from .models import Car, Person, PossessedCar class TestTestCase(TestCase): @skipUnlessDBFeatur...
06b29509db564a93499f727dd6125a96a296d265434216f1947d1bec343be87f
import logging import os import unittest import warnings from io import StringIO from unittest import mock from django.conf import settings from django.contrib.staticfiles.finders import get_finder, get_finders from django.contrib.staticfiles.storage import staticfiles_storage from django.core.exceptions import Improp...
e28692e6d05b23335608301eb1343a873f780e63d5316343eecede208fe357f1
import datetime import os import re import unittest from unittest import mock from urllib.parse import parse_qsl, urljoin, urlparse try: import zoneinfo except ImportError: from backports import zoneinfo try: import pytz except ImportError: pytz = None from django.contrib import admin from django.con...
f03ce3463028a804af913133e7dbfa93b9541cb99fe27b95331efffc05262369
import datetime from io import StringIO from wsgiref.util import FileWrapper from django import forms from django.contrib import admin from django.contrib.admin import BooleanFieldListFilter from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin import GroupAdmin, UserAdmin from django.c...
4514a356a07fedf9e6cd5ab16acf5b1d5550eb89cf7006bbd8ea5998ed86b365
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...
07594d8b7d4d20363b1aa083d85c0662e190e5c96b9b66a73be17f663cedb109
from unittest.mock import MagicMock from django.db import DEFAULT_DB_ALIAS, connection, connections from django.db.backends.base.base import BaseDatabaseWrapper from django.test import SimpleTestCase, TestCase from ..models import Square class DatabaseWrapperTests(SimpleTestCase): def test_repr(self): ...
2029d2be6f66dc58253cf55cc1e29758f8a3306b86af9a261c73059aea2c56a6
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...
4eda78fee26bcd309476c247ff1489c27141b35439f3e6e06439981f610ae8c2
""" 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 ...
e35486fd25bb2c4b39e295213068cf94dcd74987a63647da99e33231b95afa03
import operator from django.db import transaction from django.db.backends.base.features import BaseDatabaseFeatures from django.db.utils import OperationalError from django.utils.functional import cached_property from .base import Database class DatabaseFeatures(BaseDatabaseFeatures): test_db_allows_multiple_co...
63d792e0c954f9dea56b759c30523756a7ca8ec5ec85dbee2a33bc6efe0fe197
""" SQLite backend for the sqlite3 module in the standard library. """ import datetime import decimal import functools import hashlib import math import operator import random import re import statistics import warnings from itertools import chain from sqlite3 import dbapi2 as Database from django.core.exceptions impo...
18c3a046ce79541f7793905754b9411a495ed46daec81e0312b3329f527f5d65
import string import uuid from django.core.exceptions import ImproperlyConfigured from django.test import SimpleTestCase from django.test.utils import override_settings from django.urls import NoReverseMatch, Resolver404, path, resolve, reverse from django.views import View from .converters import DynamicConverter fr...
f6ef8608c60317159600f01183dd81a63a09c14789d61820c14ebc7bbf0cce54
from django.forms import ( CharField, ChoiceField, Form, IntegerField, RadioSelect, Select, TextInput, ) from django.test import SimpleTestCase from django.utils import translation from django.utils.translation import gettext_lazy from tests.forms_tests.tests import jinja2_tests class FormsI18nTests(SimpleTestCas...
99cdada46c2a7006da052aef8c8b7e7117c501b4b603ad5346bd73ebc198e7dd
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...
b5d2385d31e910730acf5943129ac540d2ed55cd6ffc9ccbe3b526eaa117ff87
"""Functions to parse datetime objects.""" # We're using regular expressions rather than time.strptime because: # - They provide both validation and parsing. # - They're more flexible for datetimes. # - The date/datetime/time constructors produce friendlier error messages. import datetime from django.utils.regex_hel...
72b981617ce144223bd4316c46caf81f14c6857d061774eb75e7c04418e2d984
"""Default variable filters.""" import random as random_module import re import types from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation from functools import wraps from operator import itemgetter from pprint import pformat from urllib.parse import quote from django.utils import formats from django....
f1dfb309bb6bf28498eec13815881336ebd9a2f291c200455744323b6768ad9c
""" 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...
6a3fe295ace6f0303b74bd84cc72342d948d6b18195ddb420644967aca4bbfa8
import ipaddress import re 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.encoding import punycode from django.utils.ipv6 import is_valid_ipv6_address from django.utils.rege...
17786fab1ddea9c3f76409074454d169f67d98172b0186628f3f7bedba7d3703
"""Translation helper functions.""" import functools import gettext as gettext_module import os import re import sys import warnings from asgiref.local import Local from django.apps import apps from django.conf import settings from django.conf.locale import LANG_INFO from django.core.exceptions import AppRegistryNotR...
9b225372cb92bec1b04aa9164140a3c057f2063a0fd8e069f8236e28408ca05d
import collections.abc import copy import datetime import decimal import math 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 i...
495bea63b2e90216e85efc17cc6fe07d10d4119069ad529174921c030e99f75d
import operator from django.db import transaction from django.db.backends.base.features import BaseDatabaseFeatures from django.db.utils import OperationalError from django.utils.functional import cached_property from .base import Database class DatabaseFeatures(BaseDatabaseFeatures): test_db_allows_multiple_co...
5d6024d39e29732ec01bd2c8adb2feb9305fb90e84ad56af9c0e8187543f9213
import os import sys import warnings from itertools import takewhile from django.apps import apps from django.conf import settings from django.core.management.base import ( BaseCommand, CommandError, no_translations, ) from django.db import DEFAULT_DB_ALIAS, OperationalError, connections, router from django.db.mig...
390d806f0a899e5c1e7cc695d0e4df9a76e3c1bbbf9b48be5350bf8183c3aa9c
import copy import json import re from functools import partial, 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.checks import ( BaseMo...
7653b57ad8bdcf8dfd097fc072433b0c4f1244a05e371c4a42c472488cc3ae93
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...
93c4143f2256f9dc974d0b925960d8d0528800624d89bfc0000e7072d2b255ce
import datetime import os import re import unittest from unittest import mock from urllib.parse import parse_qsl, urljoin, urlparse try: import zoneinfo except ImportError: from backports import zoneinfo try: import pytz except ImportError: pytz = None from django.contrib import admin from django.con...
d56e2ae6be2abaac4cd887a3272a064190e5201b76936b5185f01a49b80dec63
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 ( ...
22ef3ae429def204e991904960e8b8139d42c1995abf5504dfc748a05a49d87b
from unittest import mock from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db.models import Prefetch, QuerySet, prefetch_related_objects from django.db.models.query import get_prefetcher from django.db.models.s...
05fe8c1f5fe1d862f206f94a4618c775477bbbda1c3e6f343afdc7fc8c6e86a3
import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import MaxValueValidator, RegexValidator from django.forms import ( BooleanField, CharField, CheckboxSelectMultiple, Choi...
ef941b510e2db54d74f93866d7aabc7f7e23fde03c0ab095b8470b297aa18b66
import collections.abc import copy import datetime import decimal import math 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 i...
3bf8a0d3beefa3f464f1ef303a381fc97f8320b3710165bb3eb850467b4557e4
import datetime from unittest import mock from django.db.migrations.questioner import ( InteractiveMigrationQuestioner, MigrationQuestioner, ) from django.db.models import NOT_PROVIDED from django.test import SimpleTestCase from django.test.utils import captured_stdout, override_settings class QuestionerTests(Si...
a91312d8468fddfdb34c81f19c89cf5dd12561a5c99c586e88153543ee193881
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...
c26b5a87996b8b15480b0f7bfc2929d3a3dd865606b56980267a37bdcdcb45e7
import functools import re from unittest import mock from django.apps import apps from django.conf import settings from django.contrib.auth.models import AbstractBaseUser from django.core.validators import RegexValidator, validate_slug from django.db import connection, migrations, models from django.db.migrations.auto...
9076f2712da1178e597a510c3675a0d9f5293682e413217e7330fc4ddb6fecba
import datetime import os import re import unittest from unittest import mock from urllib.parse import parse_qsl, urljoin, urlparse try: import zoneinfo except ImportError: from backports import zoneinfo try: import pytz except ImportError: pytz = None from django.contrib import admin from django.con...
59ae3078f0b0e84a8c00bf42329cefcbd9c013b30896923db0c5c35e7de8c655
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 ( ...
18526b494f85d3b58ac8aa42acca1c1d19ed38d641ff74d5370d35353d259258
import datetime from collections import Counter from unittest import mock from django.core.exceptions import ValidationError from django.forms import ( BaseForm, CharField, DateField, FileField, Form, IntegerField, SplitDateTimeField, formsets, ) from django.forms.formsets import ( INITIAL_FORM_COUNT, MAX_...
f0abd50a1f64d1db8b37f17c8a24a8213dbc1ba154ea49bb80d0ef4fb6aa58c3
import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import MaxValueValidator, RegexValidator from django.forms import ( BooleanField, CharField, CheckboxSelectMultiple, Choi...
b393700e167e702c21c578bf08b32c935b9daf1eb7c55925f4d7695561594d51
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import operator import warnings from itertools import chain import django from django.conf import settings from django.core import exceptions from django.db import ( DJANGO_VERSION_PICKLE_KEY, IntegrityError, NotSuppor...
54e2488746e47a5b796039e38710feafe373c2e2ccab9d025570601d53975d5c
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...
a17c4869917dad95be7d2653692c7ec4585b2da85b0bac7f41a8a03a06fcad02
"Misc. utility functions/classes for admin documentation generator." import re from email.errors import HeaderParseError from email.parser import HeaderParser from inspect import cleandoc from django.urls import reverse from django.utils.regex_helper import _lazy_re_compile from django.utils.safestring import mark_sa...
4666f5de2b7326af87232fc2f0e38fff85f497a648aae9d056a006d5cbcd6c67
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...
6644cd41b693d123fb654b5f17a80409c08b01d87a6f54d0d99c324d46c538cc
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 ( ...
8725aba74342721e88a09cafc48a1cf284b7c097067bcfd6451ddc4553e06724
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import operator import warnings from itertools import chain, islice import django from django.conf import settings from django.core import exceptions from django.db import ( DJANGO_VERSION_PICKLE_KEY, IntegrityError, N...
9ec026b4a9da9869113644e3e1250a2cc219c897d56344f9816e2ed8cad0dd20
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ ...
0de18feeefd73a0cc6ba066ce8632fb1afbafb61b9704a6ca12437f5b13857d4
""" Helper functions for creating Form classes from Django models and database field objects. """ from itertools import chain from django.core.exceptions import ( NON_FIELD_ERRORS, FieldError, ImproperlyConfigured, ValidationError, ) from django.forms.fields import ChoiceField, Field from django.forms.forms import...
8669807ab606184587d71310a9be257a2108c40b290b792a81adad070ea11576
import os from functools import partial from django.conf.urls.i18n import i18n_patterns from django.urls import include, path, re_path from django.utils.translation import gettext_lazy as _ from django.views import defaults, i18n, static from . import views base_dir = os.path.dirname(os.path.abspath(__file__)) media...
82aec78481481f967017d20da70c6979a1eac90ed6e7dce4142b75d47b8155e1
import datetime import decimal import logging import sys from pathlib import Path from django.core.exceptions import ( BadRequest, PermissionDenied, SuspiciousOperation, ) from django.http import Http404, HttpResponse, JsonResponse from django.shortcuts import render from django.template import Context, Template, ...
1c5cf5b0037fc2802b395b22d874df36c4104638c6c4e003f503d2e0a5ea473f
from django.template import Context, Template from django.test import SimpleTestCase from django.utils import html from django.utils.functional import lazy, lazystr from django.utils.safestring import SafeData, SafeString, mark_safe class customescape(str): def __html__(self): # Implement specific and wro...
a85f8f5afb3d91ce5b166e51b5bc3e8d2686a1ae297d37ba46357b91bbb53f2f
import datetime import re from datetime import date from decimal import Decimal from django import forms from django.core.exceptions import ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelFormSet, _get_foreign_key, inlineformset_factory, modelformset_factory, ) from...
2da6f821290a11522edd19322822ffbb7ed68cb355a3409ae5906711f780d862
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, skipIf from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.db import DatabaseError, connection f...
f1cc42fe39a27d7cd274cfa52b7cbe5e5bdf4dc33c7c6802c700680fcf227fad
""" Classes to represent the definitions of aggregate functions. """ from django.core.exceptions import FieldError from django.db.models.expressions import Case, Func, Star, When from django.db.models.fields import IntegerField from django.db.models.functions.comparison import Coalesce from django.db.models.functions.m...
fb1f9ec763b19a6f8f4a6021b85d4b6526e36ba070b29ba723580f8ad5749630
import datetime import math import re from decimal import Decimal from django.core.exceptions import FieldError from django.db import connection from django.db.models import ( Avg, Case, Count, DateField, DateTimeField, DecimalField, DurationField, Exists, F, FloatField, IntegerField, Max, Min, OuterRef, Q, St...
a97042a68e57cda1772d2d8ec1b292d336e175c61a2b08d41aea79886de5dde1
""" Settings and configuration for Django. Read values from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global_settings.py for a list of all possible variables. """ import importlib import os import time import traceback import warnings f...
251ebc33e15d39c0ad8d22a50393f5cca0440ef1ef6f4fa672afc01c9230781f
""" 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 ####...
3f1da9e3222ef813294681a56b9550f610617b39ae5340cdc7ae86d38785c3cd
"""Default tags used by the template system, available to all templates.""" import re import sys import warnings from collections import namedtuple from datetime import datetime from itertools import cycle as itertools_cycle, groupby from django.conf import settings from django.utils import timezone from django.utils....
fbcb4c1264f4943e44fe8e20d024259f484db6b1998cb0209c64692deb6c2a59
""" Functions for creating and restoring url-safe signed JSON objects. The format used looks like this: >>> signing.dumps("hello") 'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk' There are two components here, separated by a ':'. The first component is a URLsafe base64 encoded JSON of the object passed to dumps(). T...
f6a186d1dab98d5587d6f4ee7a2a9073abbd82315ffe54017e371a8ecfe82a72
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ import base64 import binascii import cgi import collections import html from urllib.parse import unquote from django.conf import settings from django.core.ex...
af88103ef6536bdbf24d642cc3c1ba539c80cd5f035d5e3e7e61c0ddaccd88db
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y.' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_FORMAT = 'F Y.' MONTH_DAY_F...
cd47df750226f63f1b421f963f509c1ca1300381a5fa73922f1e7889ffea1a1e
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORM...
d5b160a60d4c93028cc2e05d3098d5cef305bbc0a0d6a7304dfc191e816050cc
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # Formatting for date objects. DATE_FORMAT = 'N j, Y' # Formatting for time objects. TIME_FORMAT = 'P' # Formatti...
620a72f56d86768349e2a442eae1067b099291643aeb7bd711c274d6f3a631e6
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i' YEAR_MONTH_FORMA...
df09edf553417dfb43ad3ffcf0a0e7678b6e70bb2c0ad523745aea56d0652f61
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y. H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FOR...
61475b454f92cfd93bdf844ece76e248b35ab103eac8f63537fe6d8723824e36
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \d\e F \d\e Y à\s H:i' YEAR_MONTH_FORMA...
b3751455e015f87d6c9ed38d4b9fd586f33567a62a4fbf5f7f8d7ca825a01df9
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'l, j F, Y' TIME_FORMAT = 'h:i a' DATETIME_FORMAT = 'j F, Y h:i a' YEAR_MONTH_FORMAT = 'F, Y' MONTH_...
e5ca05775d401b47b11d4cf46066c0d9d1d662547a042ab070d92f4e3396c9e1
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'G:i' DATETIME_FORMAT = 'j. F Y G:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORM...
2fd70afb178d8d01576cc44f502596ac8c512814780d6b03540a6662809da6f5
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORM...
bc4e92326d37d61512985649084ba7fd550e481239a441507e0e65cebb2cfab1
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'd F Y H:i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT...
7922490301509c7ad3789572950fc841232bbd6121215a5c66434b06b894ab43
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '20 januari 2009' TIME_FORMAT = 'H:i' # '15:23' DATE...
33f9abd2255270e53d5f33cd4d3c25318f7f2e5d14c7de210fab6766f3b520d7
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j M Y' # '25 Oct 2006' TIME_FORMAT = 'P' # '2:30 p.m.' DATE...
8ce5d61377d22ab8f2348baf820f94f97578bc834d5dfc8f20ac31dc8c40ed4e
# This file is distributed under the same license as the Django package. # DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \d\e Y' MONTH_DAY_FORMAT = r'j \d\e F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/m/Y H:i' FIRST_DAY_OF_W...