Skip to content

Instantly share code, notes, and snippets.

@olitomas
Created August 18, 2020 13:01
Show Gist options
  • Save olitomas/43d8156e6f9470dfa90a041a114e5d30 to your computer and use it in GitHub Desktop.
Save olitomas/43d8156e6f9470dfa90a041a114e5d30 to your computer and use it in GitHub Desktop.
Django rest framework strings
Invalid basic header. No credentials provided.
Invalid basic header. Credentials string should not contain spaces.
Invalid basic header. Credentials not correctly base4 encoded.
Invalid username/password.
User inactive or deleted.
Invalid token header. No credentials provided.
Invalid token header. Token string should not contain spaces.
Invalid token header. Token string should not contain invalid characters.
Invalid token.
Auth Token
Key
User
Created
Token
Tokens
Username
Password
User account is disabled.
Unable to log in with provided credentials.
Must include "username" and "password".
A server error occurred.
Malformed request.
Incorrect authentication credentials.
Authentication credentials were not provided.
You do not have permission to perform this action.
Not found.
Method "{method}" not allowed.
Could not satisfy the request Accept header.
Unsupported media type "{media_type}" in request.
Request was throttled.
This field is required.
This field may not be null.
"{input}" is not a valid boolean.
This field may not be blank.
Ensure this field has no more than {max_length} characters.
Ensure this field has at least {min_length} characters.
Enter a valid email address.
This value does not match the required pattern.
Enter a valid "slug" consisting of letters, numbers, underscores or hyphens.
Enter a valid URL.
"{value}" is not a valid UUID.
Enter a valid IPv4 or IPv address.
A valid integer is required.
Ensure this value is less than or equal to {max_value}.
Ensure this value is greater than or equal to {min_value}.
String value too large.
A valid number is required.
Ensure that there are no more than {max_digits} digits in total.
Ensure that there are no more than {max_decimal_places} decimal places.
Ensure that there are no more than {max_whole_digits} digits before the decimal point.
Datetime has wrong format. Use one of these formats instead: {format}.
Expected a datetime but got a date.
Date has wrong format. Use one of these formats instead: {format}.
Expected a date but got a datetime.
Time has wrong format. Use one of these formats instead: {format}.
Duration has wrong format. Use one of these formats instead: {format}.
"{input}" is not a valid choice.
More than {count} items...
Expected a list of items but got type "{input_type}".
This selection may not be empty.
"{input}" is not a valid path choice.
No file was submitted.
The submitted data was not a file. Check the encoding type on the form.
No filename could be determined.
The submitted file is empty.
Ensure this filename has at most {max_length} characters (it has {length}).
Upload a valid image. The file you uploaded was either not an image or a corrupted image.
This list may not be empty.
Expected a dictionary of items but got type "{input_type}".
Value must be valid JSON.
Submit
ascending
descending
Invalid page.
Invalid cursor
Invalid pk "{pk_value}" - object does not exist.
Incorrect type. Expected pk value, received {data_type}.
Invalid hyperlink - No URL match.
Invalid hyperlink - Incorrect URL match.
Invalid hyperlink - Object does not exist.
Incorrect type. Expected URL string, received {data_type}.
Object with {slug_name}={value} does not exist.
Invalid data. Expected a dictionary, but got {datatype}.
Filters
Field filters
This field must be unique.
The fields {field_names} must make a unique set.
This field must be unique for the "{date_field}" date.
This field must be unique for the "{date_field}" month.
This field must be unique for the "{date_field}" year.
Invalid version in "Accept" header.
Invalid version in URL path.
Invalid version in URL path. Does not match any version namespace.
Invalid version in hostname.
Invalid version in query parameter.
Permission denied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment