Hi Val, On 02/07/2014 04:07 PM, Val Neekman wrote: > None of the other subclasses of CharField override get_internal_type() > but the SlugField and I am wondering why? > > Class SlugField(CharField): > > def get_internal_type(self): > return "SlugField"
"Internal type" abstracts a field class from the database column type used to represent it in various database backends. "SlugField" is a distinct internal_type from "CharField" because we use different database column types to represent SlugField and CharField in some databases. See the implementation of `Field.db_type()` and the `data_types` class attribute on the various DatabaseCreation classes in the db backends. Carl -- You received this message because you are subscribed to the Google Groups "Django developers" 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 http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/52F568DB.7030504%40oddbird.net. For more options, visit https://groups.google.com/groups/opt_out.
