﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26102	Add shortcuts min_value & max_value to RangeField subclasses	Bertrand Bordage		"Today, if you want to limit the value of a `RangeField` subclass instance, you have to use the validators `RangeMinValueValidator` and `RangeMaxValueValidator`. This means defining:
{{{
#!python
from django.contrib.postgres.fields import IntegerRangeField
from django.contrib.postgres.validators import (
    RangeMinValueValidator, RangeMaxValueValidator)
from django.db.models import Model, CharField

class Musician(Model):
    name = CharField(max_length=75)
    years_active = IntegerRange(
        validators=[RangeMinValueValidator(1500),
                    RangeMaxValueValidator(3000)])
}}}

It could be way easier and more consistent with other fields to define it like this:

{{{
#!python
from django.contrib.postgres.fields import IntegerRangeField
from django.db.models import Model, CharField

class Musician(Model):
    name = CharField(max_length=75)
    years_active = IntegerRange(min_value=1500, max_value=3000)
}}}"	New feature	closed	contrib.postgres	dev	Normal	wontfix		Marc Tamlyn	Unreviewed	0	0	0	0	0	0
