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/forms_tests/field_tests/test_emailfield.py
tests/forms_tests/field_tests/test_emailfield.py
from django.core.exceptions import ValidationError from django.forms import EmailField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class EmailFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_emailfield_1(self): f = EmailField() self.assertEqual(f.max...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_decimalfield.py
tests/forms_tests/field_tests/test_decimalfield.py
import decimal from django.core.exceptions import ValidationError from django.forms import DecimalField, NumberInput, Widget from django.test import SimpleTestCase, override_settings from django.utils import formats, translation from . import FormFieldAssertionsMixin class DecimalFieldTest(FormFieldAssertionsMixin,...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_uuidfield.py
tests/forms_tests/field_tests/test_uuidfield.py
import uuid from django.core.exceptions import ValidationError from django.forms import UUIDField from django.test import SimpleTestCase class UUIDFieldTest(SimpleTestCase): def test_uuidfield_1(self): field = UUIDField() value = field.clean("550e8400e29b41d4a716446655440000") self.assert...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/__init__.py
tests/forms_tests/field_tests/__init__.py
from django import forms class FormFieldAssertionsMixin: def assertWidgetRendersTo(self, field, to): class Form(forms.Form): f = field self.assertHTMLEqual(str(Form()["f"]), to)
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_floatfield.py
tests/forms_tests/field_tests/test_floatfield.py
from django.core.exceptions import ValidationError from django.forms import FloatField, NumberInput from django.test import SimpleTestCase from django.test.selenium import SeleniumTestCase from django.test.utils import override_settings from django.urls import reverse from django.utils import formats, translation from...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_datefield.py
tests/forms_tests/field_tests/test_datefield.py
import sys from datetime import date, datetime from django.core.exceptions import ValidationError from django.forms import DateField, Form, HiddenInput, SelectDateWidget from django.test import SimpleTestCase from django.utils import translation class GetDate(Form): mydate = DateField(widget=SelectDateWidget) ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_timefield.py
tests/forms_tests/field_tests/test_timefield.py
import datetime from django.core.exceptions import ValidationError from django.forms import TimeField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class TimeFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_timefield_1(self): f = TimeField() self.asse...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_urlfield.py
tests/forms_tests/field_tests/test_urlfield.py
from django.core.exceptions import ValidationError from django.forms import URLField from django.test import SimpleTestCase from . import FormFieldAssertionsMixin class URLFieldTest(FormFieldAssertionsMixin, SimpleTestCase): def test_urlfield_widget(self): f = URLField() self.assertWidgetRendersT...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_imagefield.py
tests/forms_tests/field_tests/test_imagefield.py
import os import unittest from django.core.exceptions import ValidationError from django.core.files.uploadedfile import SimpleUploadedFile, TemporaryUploadedFile from django.forms import ClearableFileInput, FileInput, ImageField, Widget from django.test import SimpleTestCase from . import FormFieldAssertionsMixin tr...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/test_filefield.py
tests/forms_tests/field_tests/test_filefield.py
import pickle import unittest from django.core.exceptions import ValidationError from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import validate_image_file_extension from django.forms import FileField, FileInput from django.test import SimpleTestCase try: from PIL import ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/ab.py
tests/forms_tests/field_tests/filepathfield_test_dir/ab.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/b.py
tests/forms_tests/field_tests/filepathfield_test_dir/b.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/a.py
tests/forms_tests/field_tests/filepathfield_test_dir/a.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/__init__.py
tests/forms_tests/field_tests/filepathfield_test_dir/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/c/d.py
tests/forms_tests/field_tests/filepathfield_test_dir/c/d.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/c/e.py
tests/forms_tests/field_tests/filepathfield_test_dir/c/e.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/c/__init__.py
tests/forms_tests/field_tests/filepathfield_test_dir/c/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/c/f/__init__.py
tests/forms_tests/field_tests/filepathfield_test_dir/c/f/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/c/f/g.py
tests/forms_tests/field_tests/filepathfield_test_dir/c/f/g.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/h/__init__.py
tests/forms_tests/field_tests/filepathfield_test_dir/h/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/field_tests/filepathfield_test_dir/j/__init__.py
tests/forms_tests/field_tests/filepathfield_test_dir/j/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_searchinput.py
tests/forms_tests/widget_tests/test_searchinput.py
from django.forms import SearchInput from .base import WidgetTest class SearchInputTest(WidgetTest): widget = SearchInput() def test_render(self): self.check_html( self.widget, "search", "", html='<input type="search" name="search">' )
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_splitdatetimewidget.py
tests/forms_tests/widget_tests/test_splitdatetimewidget.py
from datetime import date, datetime, time from django.forms import Form, SplitDateTimeField, SplitDateTimeWidget from .base import WidgetTest class SplitDateTimeWidgetTest(WidgetTest): widget = SplitDateTimeWidget() def test_render_empty(self): self.check_html( self.widget, ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_passwordinput.py
tests/forms_tests/widget_tests/test_passwordinput.py
from django.forms import CharField, Form, PasswordInput from .base import WidgetTest class PasswordInputTest(WidgetTest): widget = PasswordInput() def test_render(self): self.check_html( self.widget, "password", "", html='<input type="password" name="password">' ) def test_r...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_numberinput.py
tests/forms_tests/widget_tests/test_numberinput.py
from django.forms import CharField, Form, NumberInput from django.test import override_settings from .base import WidgetTest class NumberInputTests(WidgetTest): widget = NumberInput(attrs={"max": 12345, "min": 1234, "step": 9999}) @override_settings(USE_THOUSAND_SEPARATOR=True) def test_attrs_not_locali...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_input.py
tests/forms_tests/widget_tests/test_input.py
from django.forms.widgets import Input from .base import WidgetTest class InputTests(WidgetTest): def test_attrs_with_type(self): attrs = {"type": "date"} widget = Input(attrs) self.check_html( widget, "name", "value", '<input type="date" name="name" value="value">' ) ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_nullbooleanselect.py
tests/forms_tests/widget_tests/test_nullbooleanselect.py
from django.forms import Form, NullBooleanField, NullBooleanSelect from django.utils import translation from .base import WidgetTest class NullBooleanSelectTest(WidgetTest): widget = NullBooleanSelect() def test_render_true(self): self.check_html( self.widget, "is_cool", ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_multiwidget.py
tests/forms_tests/widget_tests/test_multiwidget.py
import copy from datetime import datetime from django.forms import ( CharField, FileInput, Form, MultipleChoiceField, MultiValueField, MultiWidget, RadioSelect, SelectMultiple, SplitDateTimeField, SplitDateTimeWidget, TextInput, ) from .base import WidgetTest class MyMult...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_choicewidget.py
tests/forms_tests/widget_tests/test_choicewidget.py
import copy from django.forms.widgets import ChoiceWidget from .base import WidgetTest class ChoiceWidgetTest(WidgetTest): widget = ChoiceWidget @property def nested_widgets(self): nested_widget = self.widget( choices=( ("outer1", "Outer 1"), ('Group ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_selectdatewidget.py
tests/forms_tests/widget_tests/test_selectdatewidget.py
import sys from datetime import date from django.forms import DateField, Form, SelectDateWidget from django.test import override_settings from django.utils import translation from django.utils.dates import MONTHS_AP from django.utils.version import PYPY from .base import WidgetTest class SelectDateWidgetTest(Widget...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_multiplehiddeninput.py
tests/forms_tests/widget_tests/test_multiplehiddeninput.py
from django.forms import Form, MultipleChoiceField, MultipleHiddenInput from django.utils.datastructures import MultiValueDict from .base import WidgetTest class MultipleHiddenInputTest(WidgetTest): widget = MultipleHiddenInput() def test_render_single(self): self.check_html( self.widget...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_splithiddendatetimewidget.py
tests/forms_tests/widget_tests/test_splithiddendatetimewidget.py
from datetime import datetime from django.forms import Form, SplitDateTimeField, SplitHiddenDateTimeWidget from django.utils import translation from .base import WidgetTest class SplitHiddenDateTimeWidgetTest(WidgetTest): widget = SplitHiddenDateTimeWidget() def test_render_empty(self): self.check_...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_telinput.py
tests/forms_tests/widget_tests/test_telinput.py
from django.forms import TelInput from .base import WidgetTest class TelInputTest(WidgetTest): widget = TelInput() def test_render(self): self.check_html( self.widget, "telephone", "", html='<input type="tel" name="telephone">' )
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_select.py
tests/forms_tests/widget_tests/test_select.py
import datetime from django.forms import ChoiceField, Form, MultiWidget, Select, TextInput from django.test import override_settings from django.utils.safestring import mark_safe from .test_choicewidget import ChoiceWidgetTest class SelectTest(ChoiceWidgetTest): widget = Select def test_render(self): ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_fileinput.py
tests/forms_tests/widget_tests/test_fileinput.py
from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import FileField, FileInput, Form from django.utils.datastructures import MultiValueDict from .base import WidgetTest class FileInputTest(WidgetTest): widget = FileInput() def test_render(self): """ FileInput wid...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_textarea.py
tests/forms_tests/widget_tests/test_textarea.py
from django.forms import CharField, Form, Textarea from django.utils.safestring import mark_safe from .base import WidgetTest class TextareaTest(WidgetTest): widget = Textarea() def test_render(self): self.check_html( self.widget, "msg", "value", html=...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_hiddeninput.py
tests/forms_tests/widget_tests/test_hiddeninput.py
from django.forms import CharField, Form, HiddenInput from .base import WidgetTest class HiddenInputTest(WidgetTest): widget = HiddenInput() def test_render(self): self.check_html( self.widget, "email", "", html='<input type="hidden" name="email">' ) def test_use_required_at...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_dateinput.py
tests/forms_tests/widget_tests/test_dateinput.py
from datetime import date from django.forms import CharField, DateInput, Form from django.utils import translation from .base import WidgetTest class DateInputTest(WidgetTest): widget = DateInput() def test_render_none(self): self.check_html( self.widget, "date", None, html='<input type...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_checkboxselectmultiple.py
tests/forms_tests/widget_tests/test_checkboxselectmultiple.py
import datetime from django import forms from django.forms import CheckboxSelectMultiple, ChoiceField, Form from django.test import override_settings from .base import WidgetTest class CheckboxSelectMultipleTest(WidgetTest): widget = CheckboxSelectMultiple def test_render_value(self): self.check_ht...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/__init__.py
tests/forms_tests/widget_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/forms_tests/widget_tests/test_colorinput.py
tests/forms_tests/widget_tests/test_colorinput.py
from django.forms import ColorInput from .base import WidgetTest class ColorInputTest(WidgetTest): widget = ColorInput() def test_render(self): self.check_html( self.widget, "color", "", html="<input type='color' name='color'>", )
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_timeinput.py
tests/forms_tests/widget_tests/test_timeinput.py
from datetime import time from django.forms import CharField, Form, TimeInput from django.utils import translation from .base import WidgetTest class TimeInputTest(WidgetTest): widget = TimeInput() def test_render_none(self): self.check_html( self.widget, "time", None, html='<input type...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_widget.py
tests/forms_tests/widget_tests/test_widget.py
from django.forms import Widget from django.forms.widgets import Input from .base import WidgetTest class WidgetTests(WidgetTest): def test_format_value(self): widget = Widget() self.assertIsNone(widget.format_value(None)) self.assertIsNone(widget.format_value("")) self.assertEqua...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_datetimeinput.py
tests/forms_tests/widget_tests/test_datetimeinput.py
from datetime import datetime from django.forms import CharField, DateTimeInput, Form from django.utils import translation from .base import WidgetTest class DateTimeInputTest(WidgetTest): widget = DateTimeInput() def test_render_none(self): self.check_html(self.widget, "date", None, '<input type="...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_radioselect.py
tests/forms_tests/widget_tests/test_radioselect.py
import datetime from django.forms import ChoiceField, Form, MultiWidget, RadioSelect, TextInput from django.test import override_settings from django.utils.safestring import mark_safe from .test_choicewidget import ChoiceWidgetTest BLANK_CHOICE_DASH = (("", "------"),) class RadioSelectTest(ChoiceWidgetTest): ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_checkboxinput.py
tests/forms_tests/widget_tests/test_checkboxinput.py
from django.forms import BooleanField, CheckboxInput, Form from .base import WidgetTest class CheckboxInputTest(WidgetTest): widget = CheckboxInput() def test_render_empty(self): self.check_html( self.widget, "is_cool", "", html='<input type="checkbox" name="is_cool">' ) def...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/base.py
tests/forms_tests/widget_tests/base.py
from django.forms.renderers import DjangoTemplates, Jinja2 from django.test import SimpleTestCase try: import jinja2 except ImportError: jinja2 = None class WidgetTest(SimpleTestCase): beatles = (("J", "John"), ("P", "Paul"), ("G", "George"), ("R", "Ringo")) @classmethod def setUpClass(cls): ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_clearablefileinput.py
tests/forms_tests/widget_tests/test_clearablefileinput.py
from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import ClearableFileInput, FileField, Form, MultiWidget from .base import WidgetTest class FakeFieldFile: """ Quacks like a FieldFile (has a .url and string representation), but doesn't require us to care about storages etc. ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_textinput.py
tests/forms_tests/widget_tests/test_textinput.py
from django.forms import CharField, Form, TextInput from django.utils.safestring import mark_safe from .base import WidgetTest class TextInputTest(WidgetTest): widget = TextInput() def test_render(self): self.check_html( self.widget, "email", "", html='<input type="text" name="email">' ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/forms_tests/widget_tests/test_selectmultiple.py
tests/forms_tests/widget_tests/test_selectmultiple.py
from django.forms import ChoiceField, Form, SelectMultiple from .base import WidgetTest class SelectMultipleTest(WidgetTest): widget = SelectMultiple numeric_choices = (("0", "0"), ("1", "1"), ("2", "2"), ("3", "3"), ("0", "extra")) def test_format_value(self): widget = self.widget(choices=self....
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/views.py
tests/test_client/views.py
import json from urllib.parse import urlencode from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.core.exceptions import ValidationError from django.forms import fields from django.forms.forms import Form from ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/test_conditional_content_removal.py
tests/test_client/test_conditional_content_removal.py
import gzip from django.http import HttpRequest, HttpResponse, StreamingHttpResponse from django.test import SimpleTestCase from django.test.client import conditional_content_removal class ConditionalContentTests(SimpleTestCase): def test_conditional_content_removal(self): """ Content is removed ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/auth_backends.py
tests/test_client/auth_backends.py
from django.contrib.auth.backends import ModelBackend class TestClientBackend(ModelBackend): pass class BackendWithoutGetUserMethod: pass
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/test_fakepayload.py
tests/test_client/test_fakepayload.py
from django.test import SimpleTestCase from django.test.client import FakePayload class FakePayloadTests(SimpleTestCase): def test_write_after_read(self): payload = FakePayload() for operation in [payload.read, payload.readline]: with self.subTest(operation=operation.__name__): ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/__init__.py
tests/test_client/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/tests.py
tests/test_client/tests.py
""" Testing using the Test Client The test client is a class that can act like a simple browser for testing purposes. It allows the user to compose GET and POST requests, and obtain the response that the server gave to those requests. The server Response objects are annotated with the details of the contexts and temp...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/urls_middleware_urlconf.py
tests/test_client/urls_middleware_urlconf.py
from django.http import HttpResponse from django.urls import path def empty_response(request): return HttpResponse() urlpatterns = [ path("middleware_urlconf_view/", empty_response, name="middleware_urlconf_view"), ]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/test_client/urls.py
tests/test_client/urls.py
from django.contrib.auth import views as auth_views from django.urls import path from django.views.generic import RedirectView from . import views urlpatterns = [ path("upload_view/", views.upload_view, name="upload_view"), path("get_view/", views.get_view, name="get_view"), path("cbv_view/", views.CBView...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/absolute_url_overrides/__init__.py
tests/absolute_url_overrides/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/absolute_url_overrides/tests.py
tests/absolute_url_overrides/tests.py
from django.db import models from django.test import SimpleTestCase from django.test.utils import isolate_apps @isolate_apps("absolute_url_overrides") class AbsoluteUrlOverrideTests(SimpleTestCase): def test_get_absolute_url(self): """ get_absolute_url() functions as a normal method. """ ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/test_extraction.py
tests/i18n/test_extraction.py
import os import re import shutil import tempfile import time import warnings from io import StringIO from pathlib import Path from unittest import mock, skipUnless from admin_scripts.tests import AdminScriptTestCase from django.core import management from django.core.management import execute_from_command_line from ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/models.py
tests/i18n/models.py
from datetime import datetime from django.db import models from django.utils.translation import gettext_lazy as _ class TestModel(models.Model): text = models.CharField(max_length=10, default=_("Anything")) class Company(models.Model): name = models.CharField(max_length=50) date_added = models.DateTime...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/urls_default_unprefixed.py
tests/i18n/urls_default_unprefixed.py
from django.conf.urls.i18n import i18n_patterns from django.http import HttpResponse from django.urls import path, re_path from django.utils.translation import gettext_lazy as _ urlpatterns = i18n_patterns( re_path(r"^(?P<arg>[\w-]+)-page", lambda request, **arg: HttpResponse(_("Yes"))), path("simple/", lambda...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/test_management.py
tests/i18n/test_management.py
import os from django.core.management.commands.makemessages import TranslatableFile from django.test import SimpleTestCase class TranslatableFileTests(SimpleTestCase): def test_repr(self): dirpath = "dir" file_name = "example" trans_file = TranslatableFile( dirpath=dirpath, fi...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/utils.py
tests/i18n/utils.py
import os import re import shutil import tempfile source_code_dir = os.path.dirname(__file__) def copytree(src, dst): shutil.copytree(src, dst, ignore=shutil.ignore_patterns("__pycache__")) class POFileAssertionMixin: def _assertPoKeyword(self, keyword, expected_value, haystack, use_quotes=True): q...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/test_compilation.py
tests/i18n/test_compilation.py
import gettext as gettext_module import os import re import stat import unittest from io import StringIO from pathlib import Path from subprocess import run from unittest import mock from django.core.management import CommandError, call_command, execute_from_command_line from django.core.management.utils import find_c...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/__init__.py
tests/i18n/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/tests.py
tests/i18n/tests.py
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, skipUnless from asgiref.local import Local from django import forms from djang...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
true
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/forms.py
tests/i18n/forms.py
from django import forms from .models import Company class I18nForm(forms.Form): decimal_field = forms.DecimalField(localize=True) float_field = forms.FloatField(localize=True) date_field = forms.DateField(localize=True) datetime_field = forms.DateTimeField(localize=True) time_field = forms.TimeF...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/test_percents.py
tests/i18n/test_percents.py
import os from django.template import Context, Template from django.test import SimpleTestCase, override_settings from django.utils.translation import activate, get_language, trans_real from .utils import POFileAssertionMixin SAMPLEPROJECT_DIR = os.path.join( os.path.dirname(os.path.abspath(__file__)), "samplepr...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/urls.py
tests/i18n/urls.py
from django.conf.urls.i18n import i18n_patterns from django.http import HttpResponse, StreamingHttpResponse from django.urls import path from django.utils.translation import gettext_lazy as _ urlpatterns = i18n_patterns( path("simple/", lambda r: HttpResponse()), path("streaming/", lambda r: StreamingHttpRespo...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/loading_app/__init__.py
tests/i18n/loading_app/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/loading_app/apps.py
tests/i18n/loading_app/apps.py
from django.apps import AppConfig class LoadingAppConfig(AppConfig): name = "i18n.loading_app"
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/other2/__init__.py
tests/i18n/other2/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/other2/locale/__init__.py
tests/i18n/other2/locale/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/other2/locale/de/formats.py
tests/i18n/other2/locale/de/formats.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/other2/locale/de/__init__.py
tests/i18n/other2/locale/de/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/commands/__init__.py
tests/i18n/commands/__init__.py
from django.utils.translation import gettext as _ from django.utils.translation import ngettext # Translators: This comment should be extracted dummy1 = _("This is a translatable string.") # This comment should not be extracted dummy2 = _("This is another translatable string.") # This file has a literal with plural ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/commands/app_with_locale/some_file.py
tests/i18n/commands/app_with_locale/some_file.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/obsolete_translations/__init__.py
tests/i18n/obsolete_translations/__init__.py
from django.utils.translation import gettext as _ string1 = _("This is a translatable string.") # Obsolete string. # string2 = _("Obsolete string.")
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/__init__.py
tests/i18n/patterns/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/tests.py
tests/i18n/patterns/tests.py
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponse, HttpResponsePermanentRedirect from django.middleware.locale import LocaleMiddleware from django.template import Context, Template from django.test import SimpleTestCase, override_set...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/wrong_namespace.py
tests/i18n/patterns/urls/wrong_namespace.py
from django.conf.urls.i18n import i18n_patterns from django.urls import re_path from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name="dummy.html") app_name = "account" urlpatterns = i18n_patterns( re_path(_(r"^register/$"), ...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/wrong.py
tests/i18n/patterns/urls/wrong.py
from django.conf.urls.i18n import i18n_patterns from django.urls import include, re_path from django.utils.translation import gettext_lazy as _ urlpatterns = i18n_patterns( re_path( _(r"^account/"), include("i18n.patterns.urls.wrong_namespace", namespace="account"), ), )
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/default.py
tests/i18n/patterns/urls/default.py
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.generic import TemplateView view = TemplateView.as_view(template_name="dummy.html") urlpatterns = [ path("not-prefixed/", view, name="not-prefixed...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/disabled.py
tests/i18n/patterns/urls/disabled.py
from django.conf.urls.i18n import i18n_patterns from django.urls import path from django.views.generic import TemplateView view = TemplateView.as_view(template_name="dummy.html") urlpatterns = i18n_patterns( path("prefixed/", view, name="prefixed"), )
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/included.py
tests/i18n/patterns/urls/included.py
from django.urls import path from django.views.generic import TemplateView view = TemplateView.as_view(template_name="dummy.html") urlpatterns = [ path("foo/", view, name="not-prefixed-included-url"), ]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/namespace.py
tests/i18n/patterns/urls/namespace.py
from django.urls import path, re_path from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name="dummy.html") app_name = "account" urlpatterns = [ re_path(_(r"^register/$"), view, name="register"), re_path(_(r"^register-witho...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/__init__.py
tests/i18n/patterns/urls/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/patterns/urls/path_unused.py
tests/i18n/patterns/urls/path_unused.py
from django.urls import re_path from django.views.generic import TemplateView view = TemplateView.as_view(template_name="dummy.html") urlpatterns = [ re_path("^nl/foo/", view, name="not-translated"), ]
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/territorial_fallback/__init__.py
tests/i18n/territorial_fallback/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/exclude/__init__.py
tests/i18n/exclude/__init__.py
# This package is used to test the --exclude option of # the makemessages and compilemessages management commands. # The locale directory for this app is generated automatically # by the test cases. from django.utils.translation import gettext as _ # Translators: This comment should be extracted dummy1 = _("This is a...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/contenttypes/__init__.py
tests/i18n/contenttypes/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/contenttypes/tests.py
tests/i18n/contenttypes/tests.py
import os from django.contrib.contenttypes.models import ContentType from django.test import TestCase, override_settings from django.utils import translation @override_settings( USE_I18N=True, LOCALE_PATHS=[ os.path.join(os.path.dirname(__file__), "locale"), ], LANGUAGE_CODE="en", LANGUAG...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/unchanged/__init__.py
tests/i18n/unchanged/__init__.py
from django.utils.translation import gettext as _ string1 = _("This is a translatable string.") string2 = _("This is another translatable string.")
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/sampleproject/manage.py
tests/i18n/sampleproject/manage.py
#!/usr/bin/env python import os import sys sys.path.append(os.path.abspath(os.path.join("..", "..", ".."))) if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sampleproject.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/sampleproject/update_catalogs.py
tests/i18n/sampleproject/update_catalogs.py
#!/usr/bin/env python """ Helper script to update sampleproject's translation catalogs. When a bug has been identified related to i18n, this helps capture the issue by using catalogs created from management commands. Example: The string "Two %% Three %%%" renders differently using translate and blocktranslate. This...
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/sampleproject/sampleproject/settings.py
tests/i18n/sampleproject/sampleproject/settings.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/sampleproject/sampleproject/__init__.py
tests/i18n/sampleproject/sampleproject/__init__.py
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false
django/django
https://github.com/django/django/blob/3201a895cba335000827b28768a7b7105c81b415/tests/i18n/project_dir/__init__.py
tests/i18n/project_dir/__init__.py
# Sample project used by test_extraction.CustomLayoutExtractionTests from django.utils.translation import gettext as _ string = _("This is a project-level string")
python
BSD-3-Clause
3201a895cba335000827b28768a7b7105c81b415
2026-01-04T14:38:15.489092Z
false