django-modeltranslation icon indicating copy to clipboard operation
django-modeltranslation copied to clipboard

can_import_settings remove Django 1.11

Open salexkidd opened this issue 8 years ago • 11 comments

Hello django-modeltranslation dev team.

I use this awesome Django Application in my project.

btw, Django 1.11 beta 1 is out and Django team remove obsolete "can_import_settings" flag.

now I got a crush by commands/loaddata.py How fix it?

thx!

salexkidd avatar Feb 22 '17 12:02 salexkidd

FYI. and now, i patched commands/loaddata.py

--- a/modeltranslation/management/commands/loaddata.py
+++ b/modeltranslation/management/commands/loaddata.py
@@ -22,6 +22,8 @@ def check_mode(option, opt_str, value, parser, namespace=None):
 class Command(LoadDataCommand):
     leave_locale_alone = mt_settings.LOADDATA_RETAIN_LOCALE  # Django 1.6

+    can_import_settings = True
+
     help = ('Using this option will cause fixtures to be loaded under auto-population MODE.' +
             'Allowed values are: %s' % ALLOWED_FOR_PRINT)
     if VERSION < (1, 8):

salexkidd avatar Feb 22 '17 12:02 salexkidd

Haven't looked at the Django 1.11 beta yet, but i think we can safely remove the can_import_settings check. Try my last commit to master (85e26e3842324cd34597ebd55295ac358db73e73). If it still fails, please post the backtrace.

deschler avatar Feb 22 '17 13:02 deschler

OK! I'll try it.

salexkidd avatar Feb 24 '17 09:02 salexkidd

I'm tried the master branch. We can pass the test Successfully. Thx for deschler! :)

salexkidd avatar Feb 24 '17 11:02 salexkidd

Hey guys,

Django 1.11 is out and I get this error with using the modeltranslation.

Any plans on releasing the fix, so I can use the latest from Django?

karolyi avatar Apr 05 '17 11:04 karolyi

I've issued a 0.12.1 release with the loaddata fix included. Please note, that this isn't full Django 1.11 support, travis-ci revealed more issues (https://travis-ci.org/deschler/django-modeltranslation).

deschler avatar Apr 05 '17 12:04 deschler

I see you're working on it, so I'll wait. :)

karolyi avatar Apr 05 '17 13:04 karolyi

info: just updated to Django 1.11 with your release, my tests seem to work again. I use Python 3.6 and mysql (haven't seen that test constellation in Travis)

karolyi avatar Apr 05 '17 15:04 karolyi

I'm going to add that. It's also about time to drop support for some older Django (<1.8) and Python (2.6 + 3.2) versions.

deschler avatar Apr 13 '17 08:04 deschler

Any plans on releasing with support Django 1.11 ?

shtalinberg avatar Sep 07 '17 08:09 shtalinberg

Any update on Supporting Django 1.11 @deschler ?

ppython avatar Dec 11 '17 21:12 ppython