modeltranslation support
Issue #19
resolved
I know best practices with urls and slugs, but if you need it, it would be nice having the integration with modeltranslation.
Comments (6)
-
-
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 )
-
reporter I just released a pull-request to add modeltranslation support without overriding the model.save method (so ignore my previous solution).
-
repo owner Thanks! Merged in autoslug 1.8.0.
-
repo owner - changed status to resolved
-
reporter I released another PR on Github https://github.com/neithere/django-autoslug/pull/26 which includes tests.
- Log in to comment
+1 Have you found a way around this? I guess it could be possible with custom_slugify()... I'll play a little bit around with that.