modeltranslation support

Issue #19 resolved
Fabio Caccamo
created an issue

I know best practices with urls and slugs, but if you need it, it would be nice having the integration with modeltranslation.

Comments (6)

  1. Fabio Caccamo reporter

    The only way I founded is to set always_update = False then override the save method:

    def save(self, *args, **kwargs):
            for lang_code, lang_verbose in settings.LANGUAGES:
                lang_code = lang_code.replace('-', '_')
                setattr(self, 'slug_%s' % lang_code, slugify( getattr(self, 'name_%s' % lang_code, u'') ))
            super( NameSlugModel, self ).save( *args, **kwargs )
  2. Log in to comment