python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
REST Django - Can't find context of request from within my validator
Please be gentle. I'm a Django newb and I find the level of abstraction just plain overwhelming.
My ultimate goal is to modify an image file on its way into the model. That part may or may not be rele...
155trimmer
Votes: 0
Answers: 1
Custom format for serializer ValidationError
Iv'e got a custom object-level validator in one of my serializers:
def validate(self, data):
# some checks on token
# set token to True or False
if not token:
raise serializer...
Ravexina
Votes: 0
Answers: 2
How to disallow specific character input to a CharField
I have a model in which I want to disallow the input of special characters(+,-,/,%, etc) in the title field:
class Article(models.Model):
title = models.CharField(max_length=100)
author = mode...
ryonistic
Votes: 0
Answers: 1
Lower_case the dictionary keys and values
I have a function that should return true for case-in-sensitive keys and values for a US_STATES
from localflavor.us.us_states import US_STATES
def check_state(value):
return value in dict(US_STAT...
Tim
Votes: 0
Answers: 1