Model _meta API

13 views
Skip to first unread message

Matthew Pava

unread,
Dec 21, 2016, 3:15:26 PM12/21/16
to django...@googlegroups.com

Since the standardization of the Model _meta API and making it public, I was wondering if Django plans on removing the underscore in _meta in the future?  Just curious.

James Bennett

unread,
Dec 21, 2016, 3:18:11 PM12/21/16
to django...@googlegroups.com
I'd be against it.

At work I deal with one codebase that's Django and one that's Flask/SQLAlchemy, so I've run into the issue of not being able to name a column 'metadata' in a SQLAlchemy ORM model (that name is reserved for SQLAlchemy's internal use, but not underscore-prefixed), and been frustrated by it. I don't know offhand if anyone would ever want to use 'meta' as a field name in a Django model, but making it impossible when Python provides a standard convention for indicating something is internal API seems like a bad idea.

Matthew Pava

unread,
Dec 21, 2016, 3:20:58 PM12/21/16
to django...@googlegroups.com

Thank you so much for that clarification!

Reply all
Reply to author
Forward
0 new messages