data_source
stringclasses
1 value
prompt
listlengths
2
2
ability
stringclasses
1 value
reward_model
dict
extra_info
dict
agent_name
stringclasses
1 value
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 4, "item": { "add_info": { "had_tests": true }, "class_code": "class ConfirmDeleteForm(forms.Form):\n confirm = forms.BooleanField()\n\n def clean(self):\n cleaned_data = super().clean()\n if \"co...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 9, "item": { "add_info": { "had_tests": true }, "class_code": "class AuthorCustomDetail(generic.DetailView):\n template_name = \"generic_views/author_detail.html\"\n queryset = Author.objects.all()\n\n def g...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 10, "item": { "add_info": { "had_tests": true }, "class_code": "class TemplateResponseWithoutTemplate(\n generic.detail.SingleObjectTemplateResponseMixin, generic.View\n):\n # we don't define the usual template...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 12, "item": { "add_info": { "had_tests": true }, "class_code": "class AuthorUpdate(generic.UpdateView):\n get_form_called_count = 0 # Used to ensure get_form() is called once.\n model = Author\n success_url...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 33, "item": { "add_info": { "had_tests": true }, "class_code": "class StrictAssignmentFieldSpecific(models.Model):\n title = models.CharField(max_length=30)\n _should_error = False\n\n def __setattr__(self, ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 34, "item": { "add_info": { "had_tests": true }, "class_code": "class StrictAssignmentAll(models.Model):\n title = models.CharField(max_length=30)\n _should_error = False\n\n def __setattr__(self, key, value...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 35, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomMetaclass(ModelFormMetaclass):\n def __new__(cls, name, bases, attrs):\n new = super().__new__(cls, name, bases, attrs)\n n...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 37, "item": { "add_info": { "had_tests": true }, "class_code": "class Person(models.Model):\n name = models.CharField(max_length=255, unique=True)\n\n objects = TestManager()\n\n class Meta:\n orderin...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 38, "item": { "add_info": { "had_tests": true }, "class_code": "class Book(models.Model):\n name = models.CharField(max_length=255)\n author = models.ForeignKey(Person, models.CASCADE)\n stores = models.Many...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 40, "item": { "add_info": { "had_tests": true }, "class_code": "class Circle2(models.Model):\n name = models.CharField(max_length=255, unique=True)\n\n def natural_key(self):\n return (self.name,)\n\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 41, "item": { "add_info": { "had_tests": true }, "class_code": "class Circle3(models.Model):\n name = models.CharField(max_length=255, unique=True)\n\n def natural_key(self):\n return (self.name,)\n\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 45, "item": { "add_info": { "had_tests": true }, "class_code": "class ExceptionThatFailsUnpickling(Exception):\n \"\"\"\n After pickling, this class fails unpickling with an error about incorrect\n arguments...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 49, "item": { "add_info": { "had_tests": true }, "class_code": "class MySuite:\n def __init__(self):\n self.tests = []\n\n def addTest(self, test):\n self.tests.append(test)\n\n def __iter__(se...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 51, "item": { "add_info": { "had_tests": true }, "class_code": "class ArticleAdminForm(forms.ModelForm):\n nolabel_form_field = forms.BooleanField(required=False)\n\n class Meta:\n model = Article\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 53, "item": { "add_info": { "had_tests": true }, "class_code": "class PasswordResetConfirmClient(Client):\n \"\"\"\n This client eases testing the password reset flow by emulating the\n PasswordResetConfirmV...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 61, "item": { "add_info": { "had_tests": true }, "class_code": "class SimpleBackend(BaseBackend):\n def get_user_permissions(self, user_obj, obj=None):\n return [\"user_perm\"]\n\n def get_group_permissi...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 64, "item": { "add_info": { "had_tests": true }, "class_code": "class SimpleRowlevelBackend:\n def has_perm(self, user, perm, obj=None):\n if not obj:\n return # We only support row level perms\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 65, "item": { "add_info": { "had_tests": true }, "class_code": "class SimpleRowlevelBackend:\n def has_perm(self, user, perm, obj=None):\n if not obj:\n return # We only support row level perms\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 66, "item": { "add_info": { "had_tests": true }, "class_code": "class SimpleRowlevelBackend:\n def has_perm(self, user, perm, obj=None):\n if not obj:\n return # We only support row level perms\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 73, "item": { "add_info": { "had_tests": true }, "class_code": "class Router:\n target_db = None\n\n def db_for_read(self, model, **hints):\n return self.target_db\n\n db_for_write = db_for_read", ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 78, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomEmailFieldUserManager(BaseUserManager):\n def create_user(self, username, password, email):\n user = self.model(username=username)...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 79, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomUserWithM2MManager(BaseUserManager):\n def create_superuser(self, username, orgs, password):\n user = self.model(username=username...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 80, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomPermissionsUserManager(CustomUserManager):\n def create_superuser(self, email, password, date_of_birth):\n u = self.create_user(em...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 81, "item": { "add_info": { "had_tests": true }, "class_code": "class IntegerUsernameUserManager(BaseUserManager):\n def create_user(self, username, password):\n user = self.model(username=username)\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 83, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomUserWithFKManager(BaseUserManager):\n def create_superuser(self, username, email, group, password):\n user = self.model(username_i...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 93, "item": { "add_info": { "had_tests": true }, "class_code": "class OneTimeReceiver:\n \"\"\"\n Special receiver for handle the fact that test runner calls migrate for\n several databases and several times...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 96, "item": { "add_info": { "had_tests": true }, "class_code": "class Driver(models.Model):\n name = models.CharField(max_length=20, unique=True, null=True)\n\n class Meta:\n ordering = (\"name\",)\n\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 111, "item": { "add_info": { "had_tests": true }, "class_code": "class ActiveTranslationField(models.ForeignObject):\n \"\"\"\n This field will allow querying and fetching the currently active translation\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 113, "item": { "add_info": { "had_tests": true }, "class_code": "class ActiveTranslationField(models.ForeignObject):\n \"\"\"\n This field will allow querying and fetching the currently active translation\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 119, "item": { "add_info": { "had_tests": true }, "class_code": "class BaseCustomDeleteFormSet(BaseFormSet):\n \"\"\"\n A formset mix-in that lets a form decide if it's to be deleted.\n Works for BaseFormSet...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 125, "item": { "add_info": { "had_tests": true }, "class_code": "class ProcessViewTemplateResponseMiddleware(BaseMiddleware):\n def process_view(self, request, view_func, view_args, view_kwargs):\n template...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 135, "item": { "add_info": { "had_tests": true }, "class_code": "class DepartmentListFilterLookupWithNonStringValue(SimpleListFilter):\n title = \"department\"\n parameter_name = \"department\"\n\n def looku...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 136, "item": { "add_info": { "had_tests": true }, "class_code": "class DepartmentListFilterLookupWithDynamicValue(DecadeListFilterWithTitleAndParameter):\n def lookups(self, request, model_admin):\n if self...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 137, "item": { "add_info": { "had_tests": true }, "class_code": "class BookAdminWithCustomQueryset(ModelAdmin):\n def __init__(self, user, *args, **kwargs):\n self.user = user\n super().__init__(*arg...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 144, "item": { "add_info": { "had_tests": true }, "class_code": "class CounterNode(template.Node):\n def __init__(self):\n self.count = 0\n\n def render(self, context):\n count = self.count\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 147, "item": { "add_info": { "had_tests": true }, "class_code": "class DBCacheRouter:\n \"\"\"A router that puts the cache table on the 'other' database.\"\"\"\n\n def db_for_read(self, model, **hints):\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 159, "item": { "add_info": { "had_tests": true }, "class_code": "class YearExact(models.lookups.Lookup):\n lookup_name = \"exact\"\n\n def as_sql(self, compiler, connection):\n # We will need to skip the...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 162, "item": { "add_info": { "had_tests": true }, "class_code": "class SQLFuncMixin:\n def as_sql(self, compiler, connection):\n return \"%s()\" % self.name, []\n\n @property\n def output_field(self):...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 170, "item": { "add_info": { "had_tests": true }, "class_code": "class RefreshPrimaryProxy(Primary):\n class Meta:\n proxy = True\n\n def refresh_from_db(self, using=None, fields=None, **kwargs):\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 177, "item": { "add_info": { "had_tests": true }, "class_code": "class DynamicListDisplayChildAdmin(admin.ModelAdmin):\n list_display = (\"parent\", \"name\", \"age\")\n\n def get_list_display(self, request):\n...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 178, "item": { "add_info": { "had_tests": true }, "class_code": "class DynamicListDisplayLinksChildAdmin(admin.ModelAdmin):\n list_display = (\"parent\", \"name\", \"age\")\n list_display_links = [\"parent\", \...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 179, "item": { "add_info": { "had_tests": true }, "class_code": "class DynamicListFilterChildAdmin(admin.ModelAdmin):\n list_filter = (\"parent\", \"name\", \"age\")\n\n def get_list_filter(self, request):\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 197, "item": { "add_info": { "had_tests": true }, "class_code": "class ComplexField(MultiValueField):\n def __init__(self, **kwargs):\n fields = (\n CharField(),\n MultipleChoiceField(...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 200, "item": { "add_info": { "had_tests": true }, "class_code": "class ComplexMultiWidget(MultiWidget):\n def __init__(self, attrs=None):\n widgets = (\n TextInput(),\n SelectMultiple(...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 202, "item": { "add_info": { "had_tests": true }, "class_code": "class DeepCopyWidget(MultiWidget):\n \"\"\"\n Used to test MultiWidget.__deepcopy__().\n \"\"\"\n\n def __init__(self, choices=[]):\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 219, "item": { "add_info": { "had_tests": true }, "class_code": "class Storage(models.Model):\n def custom_upload_to(self, filename):\n return \"foo\"\n\n def random_upload_to(self, filename):\n #...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 220, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomStorage(FileSystemStorage):\n def get_available_name(self, name, max_length=None):\n \"\"\"\n Append numbers to duplicate ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 229, "item": { "add_info": { "had_tests": true }, "class_code": "class Person(models.Model):\n first_name = models.CharField(max_length=20)\n last_name = models.CharField(max_length=20)\n\n def __init__(self...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 234, "item": { "add_info": { "had_tests": true }, "class_code": "class HandlerView:\n @classmethod\n def as_view(cls):\n def view():\n pass\n\n return view", "class_code_updated":...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 246, "item": { "add_info": { "had_tests": true }, "class_code": "class ActionAdmin(admin.ModelAdmin):\n \"\"\"\n A ModelAdmin for the Action model that changes the URL of the add_view\n to '<app name>/<model...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 251, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n subparsers = parser.add_subparsers(dest=\"subcommand\", required=True)\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 252, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n subparsers = parser.add_subparsers(dest=\"subcommand\", required=True)\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 253, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def handle(self, **options):\n self.stdout.write(\"Working...\")\n self.stdout.flush()\n self.std...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 255, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n subparsers_1 = parser.add_subparsers(dest=\"subcommand_1\")\n parser_...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 256, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n parser.add_argument(\n \"--append_const\",\n action=\"...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 257, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n parser.add_argument(\n \"--append_const\",\n action=\"...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 260, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n group = parser.add_mutually_exclusive_group(required=True)\n group.ad...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 261, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n group = parser.add_mutually_exclusive_group(required=True)\n group.ad...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 262, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n help = \"Useless command.\"\n\n def add_arguments(self, parser):\n parser.add_argument(\n \"args\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 263, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n help = \"Useless command.\"\n\n def add_arguments(self, parser):\n parser.add_argument(\n \"args\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 265, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n help = \"Dance around like a madman.\"\n args = \"\"\n requires_system_checks = \"__all__\"\n\n def add_argum...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 267, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n try:\n parser.add_argument(\"--version\", action=\"version\", ver...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 270, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n parser.add_argument(\"-n\", \"--need-me\", required=True)\n parser.ad...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 272, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n subparsers = parser.add_subparsers()\n parser_foo = subparsers.add_pa...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 0, "idx": 297, "item": { "add_info": { "had_tests": true }, "class_code": "class FunkyTag(models.Model):\n \"Because we all know there's only one real use case for GFKs.\"\n name = models.CharField(max_length=25)\n co...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 308, "item": { "add_info": { "had_tests": true }, "class_code": "class FilteredManager(models.Model):\n def __str__(self):\n return \"PK=%d\" % self.pk\n\n pk_gt_1 = _Manager()\n objects = models.Mana...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 310, "item": { "add_info": { "had_tests": true }, "class_code": "class Router:\n target_db = None\n\n def db_for_read(self, model, **hints):\n return self.target_db\n\n db_for_write = db_for_read", ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 315, "item": { "add_info": { "had_tests": true }, "class_code": "class ArticleAdmin(ArticleAdminWithExtraUrl):\n list_display = (\n \"content\",\n \"date\",\n callable_year,\n \"model_y...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 316, "item": { "add_info": { "had_tests": true }, "class_code": "class ArticleAdmin(ArticleAdminWithExtraUrl):\n list_display = (\n \"content\",\n \"date\",\n callable_year,\n \"model_y...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 318, "item": { "add_info": { "had_tests": true }, "class_code": "class InquisitionAdmin(admin.ModelAdmin):\n list_display = (\"leader\", \"country\", \"expected\", \"sketch\")\n\n @admin.display\n def sketch...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 319, "item": { "add_info": { "had_tests": true }, "class_code": "class BasePersonModelFormSet(BaseModelFormSet):\n def clean(self):\n for person_dict in self.cleaned_data:\n person = person_dict....
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 320, "item": { "add_info": { "had_tests": true }, "class_code": "class SubscriberAdmin(admin.ModelAdmin):\n actions = [\"mail_admin\"]\n action_form = MediaActionForm\n\n def delete_queryset(self, request, q...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 321, "item": { "add_info": { "had_tests": true }, "class_code": "class ParentAdmin(admin.ModelAdmin):\n model = Parent\n inlines = [ChildInline]\n save_as = True\n list_display = (\n \"id\",\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 322, "item": { "add_info": { "had_tests": true }, "class_code": "class LinkInline(admin.TabularInline):\n model = Link\n extra = 1\n\n readonly_fields = (\"posted\", \"multiline\", \"readonly_link_content\")...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 324, "item": { "add_info": { "had_tests": true }, "class_code": "class PrePopulatedPostAdmin(admin.ModelAdmin):\n list_display = [\"title\", \"slug\"]\n prepopulated_fields = {\"slug\": (\"title\",)}\n\n inl...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 334, "item": { "add_info": { "had_tests": true }, "class_code": "class AdminOrderedAdminMethodAdmin(admin.ModelAdmin):\n @admin.display(ordering=\"order\")\n def some_admin_order(self, obj):\n return obj...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 338, "item": { "add_info": { "had_tests": true }, "class_code": "class DependentChildAdminForm(forms.ModelForm):\n \"\"\"\n Issue #20522\n Form to test child dependency on parent object's validation\n \"\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 339, "item": { "add_info": { "had_tests": true }, "class_code": "class StateAdminForm(forms.ModelForm):\n nolabel_form_field = forms.BooleanField(required=False)\n\n class Meta:\n model = State\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 344, "item": { "add_info": { "had_tests": true }, "class_code": "class ActorAdmin6(admin.ModelAdmin):\n list_display = (\"name\", \"age\")\n sortable_by = (\"name\",)\n\n def get_sortable_by(self, request):\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 346, "item": { "add_info": { "had_tests": true }, "class_code": "class AdminFieldExtractionMixin:\n \"\"\"\n Helper methods for extracting data from AdminForm.\n \"\"\"\n\n def get_admin_form_fields(self,...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 347, "item": { "add_info": { "had_tests": true }, "class_code": "class AdminFieldExtractionMixin:\n \"\"\"\n Helper methods for extracting data from AdminForm.\n \"\"\"\n\n def get_admin_form_fields(self,...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 348, "item": { "add_info": { "had_tests": true }, "class_code": "class AdminFieldExtractionMixin:\n \"\"\"\n Helper methods for extracting data from AdminForm.\n \"\"\"\n\n def get_admin_form_fields(self,...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 349, "item": { "add_info": { "had_tests": true }, "class_code": "class AdminViewListEditable(TestCase):\n @classmethod\n def setUpTestData(cls):\n cls.superuser = User.objects.create_superuser(\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 352, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomManyToManyField(RelatedField):\n \"\"\"\n Ticket #24104 - Need to have a custom ManyToManyField,\n which is not an inheritor of Ma...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 353, "item": { "add_info": { "had_tests": true }, "class_code": "class CustomManyToManyField(RelatedField):\n \"\"\"\n Ticket #24104 - Need to have a custom ManyToManyField,\n which is not an inheritor of Ma...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 0, "idx": 355, "item": { "add_info": { "had_tests": true }, "class_code": "class Settings:\n def __getattr__(self, name):\n if name == \"FOO\":\n return \"bar\"\n return getattr(global_settings, nam...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 367, "item": { "add_info": { "had_tests": true }, "class_code": "class ManageRunserver(SimpleTestCase):\n def setUp(self):\n def monkey_run(*args, **options):\n return\n\n self.output = St...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 369, "item": { "add_info": { "had_tests": true }, "class_code": "class ColorCommand(BaseCommand):\n requires_system_checks = []\n\n def handle(self, *args, **options):\n self.stdout.write(\"Hello, world!...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 370, "item": { "add_info": { "had_tests": true }, "class_code": "class CommandTypes(AdminScriptTestCase):\n \"Tests for the various types of base command types that can be defined.\"\n\n def setUp(self):\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 373, "item": { "add_info": { "had_tests": true }, "class_code": "class DjangoAdminSuggestions(AdminScriptTestCase):\n def setUp(self):\n super().setUp()\n self.write_settings(\"settings.py\")\n\n ...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 374, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n def add_arguments(self, parser):\n super().add_arguments(parser)\n parser.add_argument(\n \"-...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 375, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(AppCommand):\n help = \"Test Application-based commands\"\n requires_system_checks = []\n\n def handle_app_config(self, app_conf...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 376, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n help = \"Test No-args commands\"\n requires_system_checks = []\n\n def handle(self, **options):\n print(\...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 4, "idx": 377, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n help = \"Test basic commands\"\n requires_system_checks = []\n\n def add_arguments(self, parser):\n parse...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 378, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n help = \"Test basic commands\"\n requires_system_checks = []\n\n def add_arguments(self, parser):\n parse...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 379, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(LabelCommand):\n help = \"Test Label-based commands\"\n requires_system_checks = []\n\n def handle_label(self, label, **options)...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 381, "item": { "add_info": { "had_tests": true }, "class_code": "class Command(BaseCommand):\n\n help = \"Test suppress base options command.\"\n requires_system_checks = []\n suppressed_base_arguments = {\n...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 3, "idx": 382, "item": { "add_info": { "had_tests": true }, "class_code": "class ModelRaisingMessages(models.Model):\n @classmethod\n def check(self, **kwargs):\n return [\n checks.Warning(\"First warni...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 2, "idx": 387, "item": { "add_info": { "had_tests": true }, "class_code": "class MyWrapperField(models.CharField):\n def __init__(self, *args, **kwargs):\n kwargs[\"max_length\"] = 10\n super().__init__(*args,...
idegym_django
django_train
[ { "content": "You are a helpful Python code-generation assistant.\n\n**Output rules**\n\n* Return **only** the target method (signature + body) inside **one** fenced code block labeled `python`.\n* Do **not** include the containing class or any other code.\n* Do **not** add imports or top-level definitions.\n* ...
code
{ "ground_truth": null, "style": "rule" }
{ "split": "train", "tools_kwargs": { "difficulty": 1, "idx": 388, "item": { "add_info": { "had_tests": true }, "class_code": "class MyWrapperField(models.CharField):\n def __init__(self, *args, **kwargs):\n kwargs[\"max_length\"] = 10\n super().__init__(*args,...
idegym_django