How to insert NULL in database using Django
问题 I have a problem inserting NULL in Django. I mean i don't know how to do this. I have function, lets call it find_position , then i have field in model like position (IntegerField, null=True, blank=True). This function inspect some html code, and if it match with some regex, it returns integer, but if it doesn't find - have to return NULL or None or something that I can put in database. def find_position(self, to_find, something): ... if re.search(to_find, something): return i + (page * 10) +