Django Model Field Names
- Don't use a Python keyword (or you'll get a Python syntax error)
- Don't use two underscores (
_) in a row (due to Django’s query lookup syntax)
Your field name doesn’t necessarily have to match your database column name.
SQL reserved words, such as
select, are allowed as model field names, because Django escapes all database table names and column names in every underlying SQL query. It uses the quoting syntax of your database engine.