force creating object when using raw_id_fields in Django
you can overwrite your model's save() by adding codes to create the object directly if it doesn't exist.
I'm using raw_id_fields in my admin.py to change the ForeignKey's select box to an input box.
When saving the form, it checks if the object that I wrote in the ForeignKey box exists, if not, it raises an error saying "Select a valid choice. That choice is not one of the available choices."
What I want to do is skipping this validation and creating the object directly if it doesn't exist.
Any idea to do that?
Thank you very much