[Django]-How can I escape underscores in Django's field lookups?

3👍

You can give the field an appropriate name in the model, and use db_column to refer to the underlying name.

ccc = models.CharField(..., db_column="real_name_")

Leave a comment