How to ensure some custom ID has not been created already in the past?
You can write your code in a try-catch block.
since the custom_id field is unique, while inserting into DB it will throw integrity error if custom id already exists. 
You can do whatever you want in catch block custom_id is already exist.
I have a model with some charField called custom_id.
I am generating this ID randomly, and check if already exists in database before assigning it.
So all my custom_ids are unique.
However if I delete some entry from the database. The custom_id will become available again. I want to prevent that. I want the custom_id not to be ever usable again.
How is that possible ? Is there a clean way to achieve that ?