MCPcopy Index your code
hub / github.com/encode/django-rest-framework / __init__

Method __init__

rest_framework/fields.py:800–807  ·  view source on GitHub ↗
(self, allow_unicode=False, **kwargs)

Source from the content-addressed store, hash-verified

798 }
799
800 def __init__(self, allow_unicode=False, **kwargs):
801 super().__init__(**kwargs)
802 self.allow_unicode = allow_unicode
803 if self.allow_unicode:
804 validator = RegexValidator(re.compile(r'^[-\w]+\Z', re.UNICODE), message=self.error_messages['invalid_unicode'])
805 else:
806 validator = RegexValidator(re.compile(r'^[-a-zA-Z0-9_]+$'), message=self.error_messages['invalid'])
807 self.validators.append(validator)
808
809
810class URLField(CharField):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected