repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_decimalfield.py
tests/model_fields/test_decimalfield.py
import math from decimal import Decimal from unittest import mock from django.core import validators from django.core.exceptions import ValidationError from django.db import connection, models from django.test import TestCase from .models import BigD, Foo class DecimalFieldTests(TestCase): def test_to_python(se...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/__init__.py
tests/model_fields/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_mixins.py
tests/model_fields/test_mixins.py
from django.db.models.fields.mixins import FieldCacheMixin from django.test import SimpleTestCase from django.utils.functional import cached_property from .models import Foo class Example(FieldCacheMixin): @cached_property def cache_name(self): return "example" class FieldCacheMixinTests(SimpleTest...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_textfield.py
tests/model_fields/test_textfield.py
from django import forms from django.db import models from django.test import SimpleTestCase, TestCase from .models import Post class TextFieldTests(TestCase): def test_max_length_passed_to_formfield(self): """ TextField passes its max_length attribute to form fields created using their f...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/tests.py
tests/model_fields/tests.py
import pickle from django import forms from django.core.exceptions import ValidationError from django.db import models from django.test import SimpleTestCase, TestCase from django.utils.choices import CallableChoiceIterator from django.utils.functional import lazy from .models import ( Bar, Choiceful, Foo...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_floatfield.py
tests/model_fields/test_floatfield.py
from django.db import transaction from django.test import TestCase from .models import FloatModel class TestFloatField(TestCase): def test_float_validates_object(self): instance = FloatModel(size=2.5) # Try setting float field to unsaved object instance.size = instance with transa...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_field_flags.py
tests/model_fields/test_field_flags.py
from django import test from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.db import models from .models import AllFieldsModel NON_CONCRETE_FIELDS = ( models.ForeignObject, models.ManyToManyField, GenericForeignKey, GenericRelation, ) NON_EDITABLE_FIELDS = (...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_imagefield.py
tests/model_fields/test_imagefield.py
import os import shutil from unittest import skipIf from django.core.exceptions import ImproperlyConfigured from django.core.files import File from django.core.files.images import ImageFile from django.db.models import signals from django.test import TestCase from django.test.testcases import SerializeMixin try: ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_fields/test_filefield.py
tests/model_fields/test_filefield.py
import os import pickle import sys import tempfile import unittest from pathlib import Path from django.core.exceptions import FieldError, SuspiciousFileOperation from django.core.files import File, temp from django.core.files.base import ContentFile from django.core.files.uploadedfile import TemporaryUploadedFile fro...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/logging_tests/views.py
tests/logging_tests/views.py
from django.core.exceptions import DisallowedHost, PermissionDenied, SuspiciousOperation from django.http import ( Http404, HttpResponse, HttpResponseRedirect, HttpResponseServerError, ) from django.http.multipartparser import MultiPartParserError def innocent(request): return HttpResponse("innoce...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/logging_tests/logconfig.py
tests/logging_tests/logconfig.py
import logging from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.views.debug import ExceptionReporter class MyHandler(logging.Handler): def __init__(self): logging.Handler.__init__(self) self.config = settings.LOGGING class MyEmailBackend(B...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/logging_tests/urls_i18n.py
tests/logging_tests/urls_i18n.py
from django.conf.urls.i18n import i18n_patterns from django.http import HttpResponse from django.urls import path urlpatterns = i18n_patterns( path("exists/", lambda r: HttpResponse()), )
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/logging_tests/__init__.py
tests/logging_tests/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/logging_tests/tests.py
tests/logging_tests/tests.py
import logging from contextlib import contextmanager from io import StringIO from unittest import TestCase, mock from admin_scripts.tests import AdminScriptTestCase from django.conf import settings from django.core import mail from django.core.exceptions import DisallowedHost, PermissionDenied, SuspiciousOperation fr...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/logging_tests/urls.py
tests/logging_tests/urls.py
from django.urls import path from . import views urlpatterns = [ path("innocent/", views.innocent), path("redirect/", views.redirect), path("suspicious/", views.suspicious), path("suspicious_spec/", views.suspicious_spec), path("internal_server_error/", views.internal_server_error), path("unca...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/null_fk/models.py
tests/null_fk/models.py
""" Regression tests for proper working of ForeignKey(null=True). """ from django.db import models class SystemDetails(models.Model): details = models.TextField() class SystemInfo(models.Model): system_details = models.ForeignKey(SystemDetails, models.CASCADE) system_name = models.CharField(max_length=...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/null_fk/__init__.py
tests/null_fk/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/null_fk/tests.py
tests/null_fk/tests.py
from django.db.models import Q from django.test import TestCase from .models import Comment, Forum, Item, Post, PropertyValue, SystemDetails, SystemInfo class NullFkTests(TestCase): def test_null_fk(self): d = SystemDetails.objects.create(details="First details") s = SystemInfo.objects.create(sys...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/delete_regress/models.py
tests/delete_regress/models.py
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = models.Foreig...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/delete_regress/__init__.py
tests/delete_regress/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/delete_regress/tests.py
tests/delete_regress/tests.py
import datetime from django.db import connection, models, transaction from django.db.models import Exists, OuterRef from django.test import ( SimpleTestCase, TestCase, TransactionTestCase, skipUnlessDBFeature, ) from .models import ( Award, AwardNote, Book, Child, Contact, Eate...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/httpwrappers/__init__.py
tests/httpwrappers/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/httpwrappers/tests.py
tests/httpwrappers/tests.py
import copy import json import os import pickle import unittest import uuid from django.core.exceptions import DisallowedRedirect from django.core.serializers.json import DjangoJSONEncoder from django.core.signals import request_finished from django.db import close_old_connections from django.http import ( BadHead...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/null_queries/models.py
tests/null_queries/models.py
from django.db import models class Poll(models.Model): question = models.CharField(max_length=200) class Choice(models.Model): poll = models.ForeignKey(Poll, models.CASCADE) choice = models.CharField(max_length=200) # A set of models with an inner one pointing to two outer ones. class OuterA(models....
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/null_queries/__init__.py
tests/null_queries/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/null_queries/tests.py
tests/null_queries/tests.py
from django.core.exceptions import FieldError from django.test import TestCase from .models import Choice, Inner, OuterA, OuterB, Poll class NullQueriesTests(TestCase): def test_none_as_null(self): """ Regression test for the use of None as a query value. None is interpreted as an SQL NU...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_adminsite.py
tests/admin_views/test_adminsite.py
from django.contrib import admin from django.contrib.admin.actions import delete_selected from django.contrib.auth.models import User from django.test import SimpleTestCase, TestCase, override_settings from django.test.client import RequestFactory from django.urls import path, reverse from .models import Article site...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/custom_has_permission_admin.py
tests/admin_views/custom_has_permission_admin.py
""" A custom AdminSite for AdminViewPermissionsTest.test_login_has_permission(). """ from django.contrib import admin from django.contrib.auth import get_permission_codename from django.contrib.auth.forms import AuthenticationForm from django.core.exceptions import ValidationError from . import admin as base_admin fr...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_actions.py
tests/admin_views/test_actions.py
import json from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.views.main import IS_POPUP_VAR from django.contrib.auth.models import Permission, User from django.core import mail from django.db import connection from django.template.loader import render_to_string from django.templa...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_related_object_lookups.py
tests/admin_views/test_related_object_lookups.py
from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse from .models import CamelCaseModel @override_settings(ROOT_URLCONF="admin_views.urls") class SeleniumTests(AdminSeleniumTestCase): ava...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/views.py
tests/admin_views/views.py
from django.contrib.admin.views.decorators import staff_member_required from django.http import HttpResponse @staff_member_required def secure_view(request): return HttpResponse(str(request.POST)) @staff_member_required(redirect_field_name="myfield") def secure_view2(request): return HttpResponse(str(reques...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_nav_sidebar.py
tests/admin_views/test_nav_sidebar.py
from django.contrib import admin from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import User from django.test import TestCase, override_settings from django.urls import path, reverse from .models import Héllo class AdminSiteWithSidebar(admin.AdminSite): pass class A...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/admin.py
tests/admin_views/admin.py
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...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_multidb.py
tests/admin_views/test_multidb.py
from unittest import mock from django.contrib import admin from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.http import HttpResponse from django.test import TestCase, override_settings from django.urls import path, reverse from .models import Book cl...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_forms.py
tests/admin_views/test_forms.py
from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.admin.helpers import AdminForm from django.contrib.auth.models import User from django.test import SimpleTestCase, TestCase, override_settings from .admin import ArticleForm # To verify that the login form rejects inactive users, use ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/models.py
tests/admin_views/models.py
import datetime import tempfile import uuid from django.contrib import admin from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from d...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_history_view.py
tests/admin_views/test_history_view.py
from django.contrib.admin.models import CHANGE, LogEntry from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import User from django.core.paginator import Paginator from django.test import TestCase, override_settings from django.urls import reverse from .models import City, Sta...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_skip_link_to_content.py
tests/admin_views/test_skip_link_to_content.py
from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse from .models import Podcast @override_settings(ROOT_URLCONF="admin_views.urls") class SeleniumTests(AdminSeleniumTestCase): available_...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_templatetags.py
tests/admin_views/test_templatetags.py
import datetime import unittest from django.contrib.admin import ModelAdmin from django.contrib.admin.templatetags.admin_list import date_hierarchy from django.contrib.admin.templatetags.admin_modify import submit_row from django.contrib.admin.templatetags.base import InclusionAdminNode from django.contrib.auth import...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_autocomplete_view.py
tests/admin_views/test_autocomplete_view.py
import datetime import json from contextlib import contextmanager from django.contrib import admin from django.contrib.admin.exceptions import NotRegistered from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.admin.views.autocomplete import AutocompleteJsonView from django.contrib.auth.mod...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/__init__.py
tests/admin_views/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/tests.py
tests/admin_views/tests.py
import datetime import os import re import unittest import zoneinfo from unittest import mock from urllib.parse import parse_qsl, urljoin, urlsplit from django import forms from django.contrib import admin from django.contrib.admin import AdminSite, ModelAdmin from django.contrib.admin.helpers import ACTION_CHECKBOX_N...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_breadcrumbs.py
tests/admin_views/test_breadcrumbs.py
from django.contrib.auth.models import User from django.test import TestCase, override_settings from django.urls import reverse @override_settings(ROOT_URLCONF="admin_views.urls") class AdminBreadcrumbsTests(TestCase): @classmethod def setUpTestData(cls): cls.superuser = User.objects.create_superuser(...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/test_password_form.py
tests/admin_views/test_password_form.py
from django.contrib.admin.tests import AdminSeleniumTestCase from django.contrib.auth.models import User from django.test import override_settings from django.urls import reverse @override_settings(ROOT_URLCONF="auth_tests.urls_admin") class SeleniumAuthTests(AdminSeleniumTestCase): available_apps = AdminSelenium...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/forms.py
tests/admin_views/forms.py
from django.contrib.admin.forms import AdminAuthenticationForm, AdminPasswordChangeForm from django.contrib.admin.helpers import ActionForm from django.core.exceptions import ValidationError class CustomAdminAuthenticationForm(AdminAuthenticationForm): class Media: css = {"all": ("path/to/media.css",)} ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/urls.py
tests/admin_views/urls.py
from django.http import HttpResponse from django.urls import include, path from . import admin, custom_has_permission_admin, customadmin, views from .test_autocomplete_view import site as autocomplete_site def non_admin_view(request): return HttpResponse() urlpatterns = [ path("test_admin/admin/doc/", incl...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/admin_views/customadmin.py
tests/admin_views/customadmin.py
""" A second, custom AdminSite -- see tests.CustomAdminSiteTests. """ from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.http import HttpResponse from django.urls import path from . import admin as base_admin from . import forms, mo...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/one_to_one/models.py
tests/one_to_one/models.py
""" One-to-one relationships To define a one-to-one relationship, use ``OneToOneField()``. In this example, a ``Place`` optionally can be a ``Restaurant``. """ from django.db import models class Place(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=80) def _...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/one_to_one/__init__.py
tests/one_to_one/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/one_to_one/tests.py
tests/one_to_one/tests.py
from django.core.exceptions import FieldFetchBlocked from django.db import IntegrityError, connection, transaction from django.db.models import FETCH_PEERS, RAISE from django.test import TestCase from .models import ( Bar, Director, Favorites, HiddenPointer, ManualPrimaryKey, MultiModel, Pl...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/defer_regress/models.py
tests/defer_regress/models.py
""" Regression tests for defer() / only() behavior. """ from django.db import models class Item(models.Model): name = models.CharField(max_length=15) text = models.TextField(default="xyzzy") value = models.IntegerField() other_value = models.IntegerField(default=0) source = models.OneToOneField( ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/defer_regress/__init__.py
tests/defer_regress/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/defer_regress/tests.py
tests/defer_regress/tests.py
from operator import attrgetter from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import Count from django.test import TestCase from .models import ( Base, Child, Derived, Feature, Item, ItemAndSimpleItem, Leaf, Location, ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_formsets/test_uuid.py
tests/model_formsets/test_uuid.py
from django.forms.models import inlineformset_factory from django.test import TestCase from .models import ( AutoPKChildOfUUIDPKParent, AutoPKParent, ChildRelatedViaAK, ChildWithEditablePK, ParentWithUUIDAlternateKey, UUIDPKChild, UUIDPKChildOfAutoPKParent, UUIDPKParent, ) class Inlin...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_formsets/models.py
tests/model_formsets/models.py
import datetime import uuid from django.db import models class Author(models.Model): name = models.CharField(max_length=100) class Meta: ordering = ("name",) def __str__(self): return self.name class BetterAuthor(Author): write_speed = models.IntegerField() class Book(models.Mod...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_formsets/__init__.py
tests/model_formsets/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/model_formsets/tests.py
tests/model_formsets/tests.py
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.formsets import formset_factory from django.forms.models import ( BaseModelFormSet, ModelForm, _get...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_writer.py
tests/migrations/test_writer.py
import datetime import decimal import enum import functools import math import os import pathlib import re import sys import time import uuid import zoneinfo from types import NoneType from unittest import mock import custom_migration_operations.more_operations import custom_migration_operations.operations from djang...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_loader.py
tests/migrations/test_loader.py
import compileall import os import subprocess import sys import tempfile from importlib import import_module from pathlib import Path from django.conf import settings from django.db import connection, connections from django.db.migrations.exceptions import ( AmbiguityError, InconsistentMigrationHistory, No...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_operations.py
tests/migrations/test_operations.py
import math from decimal import Decimal 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.base import Operation from django.db.migrations.operat...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_autodetector.py
tests/migrations/test_autodetector.py
import copy 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.mig...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_questioner.py
tests/migrations/test_questioner.py
import datetime from io import StringIO from unittest import mock from django.core.management.base import OutputWrapper from django.db.migrations.questioner import ( InteractiveMigrationQuestioner, MigrationQuestioner, ) from django.db.models import NOT_PROVIDED from django.test import SimpleTestCase from djan...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_optimizer.py
tests/migrations/test_optimizer.py
from django.db import migrations, models from django.db.migrations import operations from django.db.migrations.optimizer import MigrationOptimizer from django.db.models.functions import Abs from .models import EmptyManager, UnicodeModel from .test_base import OptimizerTestBase class OptimizerTests(OptimizerTestBase)...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_executor.py
tests/migrations/test_executor.py
from unittest import mock from django.apps.registry import apps as global_apps from django.db import DatabaseError, connection, migrations, models from django.db.migrations.exceptions import InvalidMigrationPlan from django.db.migrations.executor import MigrationExecutor from django.db.migrations.graph import Migratio...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_multidb.py
tests/migrations/test_multidb.py
from django.db import connection, migrations, models from django.db.migrations.state import ProjectState from django.test import override_settings from .test_base import OperationTestBase class AgnosticRouter: """ A router that doesn't have an opinion regarding migrating. """ def allow_migrate(self,...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_base.py
tests/migrations/test_base.py
import os import shutil import tempfile from contextlib import contextmanager from importlib import import_module from user_commands.utils import AssertFormatterFailureCaughtContext from django.apps import apps from django.core.management import call_command from django.db import connection, connections, migrations, ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/models.py
tests/migrations/models.py
from django.apps.registry import Apps from django.db import models class CustomModelBase(models.base.ModelBase): pass class ModelWithCustomBase(models.Model, metaclass=CustomModelBase): pass class UnicodeModel(models.Model): title = models.CharField("ÚÑÍ¢ÓÐÉ", max_length=20, default="“Ðjáñgó”") c...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_state.py
tests/migrations/test_state.py
from django.apps.registry import Apps from django.contrib.contenttypes.fields import GenericForeignKey from django.db import models from django.db.migrations.exceptions import InvalidBasesError from django.db.migrations.operations import ( AddField, AlterField, DeleteModel, RemoveField, ) from django.db...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_graph.py
tests/migrations/test_graph.py
from django.db.migrations.exceptions import CircularDependencyError, NodeNotFoundError from django.db.migrations.graph import DummyNode, MigrationGraph, Node from django.test import SimpleTestCase class GraphTests(SimpleTestCase): """ Tests the digraph structure. """ def test_simple_graph(self): ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_deprecated_fields.py
tests/migrations/test_deprecated_fields.py
from django.core.management import call_command from django.test import override_settings from .test_base import MigrationTestBase class Tests(MigrationTestBase): """ Deprecated model fields should still be usable in historic migrations. """ @override_settings( MIGRATION_MODULES={"migrations...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/__init__.py
tests/migrations/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_exceptions.py
tests/migrations/test_exceptions.py
from django.db.migrations.exceptions import NodeNotFoundError from django.test import SimpleTestCase class ExceptionTests(SimpleTestCase): def test_node_not_found_error_repr(self): node = ("some_app_label", "some_migration_label") error_repr = repr(NodeNotFoundError("some message", node)) ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/routers.py
tests/migrations/routers.py
class DefaultOtherRouter: def allow_migrate(self, db, app_label, model_name=None, **hints): return db in {"default", "other"} class TestRouter: def allow_migrate(self, db, app_label, model_name=None, **hints): """ The Tribble model should be the only one to appear in the 'other' db. ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_commands.py
tests/migrations/test_commands.py
import datetime import importlib import io import os import re import shutil import sys from pathlib import Path from unittest import mock from django.apps import apps from django.core.checks import Error, Tags, register from django.core.checks.registry import registry from django.core.management import CommandError, ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/3_auto.py
tests/migrations/test_migrations_squashed_complex/3_auto.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "2_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/1_auto.py
tests/migrations/test_migrations_squashed_complex/1_auto.py
from django.db import migrations class Migration(migrations.Migration): operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/4_auto.py
tests/migrations/test_migrations_squashed_complex/4_auto.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "3_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/2_auto.py
tests/migrations/test_migrations_squashed_complex/2_auto.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "1_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/6_auto.py
tests/migrations/test_migrations_squashed_complex/6_auto.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "5_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/5_auto.py
tests/migrations/test_migrations_squashed_complex/5_auto.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "4_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/7_auto.py
tests/migrations/test_migrations_squashed_complex/7_auto.py
from django.db import migrations class Migration(migrations.Migration): dependencies = [("migrations", "6_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/__init__.py
tests/migrations/test_migrations_squashed_complex/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_squashed_complex/3_squashed_5.py
tests/migrations/test_migrations_squashed_complex/3_squashed_5.py
from django.db import migrations class Migration(migrations.Migration): replaces = [ ("migrations", "3_auto"), ("migrations", "4_auto"), ("migrations", "5_auto"), ] dependencies = [("migrations", "2_auto")] operations = [migrations.RunPython(migrations.RunPython.noop)]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_fake_initial_case_insensitive/initial/0001_initial.py
tests/migrations/test_fake_initial_case_insensitive/initial/0001_initial.py
from django.db import migrations, models class Migration(migrations.Migration): initial = True operations = [ migrations.CreateModel( name="fakeinitialmodel", fields=[ ("id", models.AutoField(primary_key=True)), ("field", models.CharField(max_le...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_fake_initial_case_insensitive/initial/__init__.py
tests/migrations/test_fake_initial_case_insensitive/initial/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_fake_initial_case_insensitive/fake_initial/0001_initial.py
tests/migrations/test_fake_initial_case_insensitive/fake_initial/0001_initial.py
from django.db import migrations, models class Migration(migrations.Migration): initial = True operations = [ migrations.CreateModel( "fakeinitialmodel", [ ("id", models.AutoField(primary_key=True)), ("field", models.CharField(max_length=20)), ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_fake_initial_case_insensitive/fake_initial/__init__.py
tests/migrations/test_fake_initial_case_insensitive/fake_initial/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/faulty_migrations/file.py
tests/migrations/faulty_migrations/file.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/faulty_migrations/__init__.py
tests/migrations/faulty_migrations/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/faulty_migrations/namespace/foo/__init__.py
tests/migrations/faulty_migrations/namespace/foo/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_private/.util.py
tests/migrations/test_migrations_private/.util.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_private/~util.py
tests/migrations/test_migrations_private/~util.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_private/0001_initial.py
tests/migrations/test_migrations_private/0001_initial.py
from django.db import migrations class Migration(migrations.Migration): pass
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_private/_util.py
tests/migrations/test_migrations_private/_util.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_private/__init__.py
tests/migrations/test_migrations_private/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_add_many_to_many_field_initial/0001_initial.py
tests/migrations/test_add_many_to_many_field_initial/0001_initial.py
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="Project", fields=[ ( "id", models.AutoField( ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_add_many_to_many_field_initial/0002_initial.py
tests/migrations/test_add_many_to_many_field_initial/0002_initial.py
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("migrations", "0001_initial"), ] operations = [ migrations.AddField( model_name="task", name="projects", field=models.ManyToManyField(t...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_add_many_to_many_field_initial/__init__.py
tests/migrations/test_add_many_to_many_field_initial/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_conflict_long_name/0002_conflicting_second_migration_with_long_name.py
tests/migrations/test_migrations_conflict_long_name/0002_conflicting_second_migration_with_long_name.py
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("migrations", "0001_initial")] operations = [ migrations.CreateModel( "SomethingElse", [ ("id", models.AutoField(primary_key=True)), ], ), ]...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/migrations/test_migrations_conflict_long_name/0001_initial.py
tests/migrations/test_migrations_conflict_long_name/0001_initial.py
from django.db import migrations, models class Migration(migrations.Migration): initial = True operations = [ migrations.CreateModel( "Author", [ ("id", models.AutoField(primary_key=True)), ], ), ]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false