On Mon, Oct 03, 2016 at 09:30:44AM -0700, Tim Graham wrote: > Ticket #27295 notes that the ORM doesn't work well with models that start > with an underscore (e.g. _UsersGroup). I didn't check if the same problem > exists with an underscore anywhere in the name, but I wanted to ask if > anyone has seen model names that use underscores? If not, my proposal is to > add a system check that prohibits an underscore in model names. > > https://code.djangoproject.com/ticket/27295
We already flag the following as errors: - field names, related names, and related query names ending with underscores - field names, related names, and related query names containing a double underscore I think it makes sense to also check for and flag as errors model names starting or ending with underscores, or containing double underscores, since those can lead to invalid field names. I think that would be pretty consistent with the field name restrictions. Cheers, Michal -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/20161004121021.GB6601%40koniiiik.org. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Digital signature
