stephenmcd / cartridge

Ecommerce for Mezzanine
http://cartridge.jupo.org
BSD 2-Clause "Simplified" License
709 stars 299 forks source link

update product_db.py to django 1.10 #322

Closed rodney757 closed 7 years ago

rodney757 commented 7 years ago

in Django 1.10, BaseCommand.option_list was removed in favor of overriding the add_arguments method

also removes the restriction for python3

stephenmcd commented 7 years ago

Does this work with Python 2?

rodney757 commented 7 years ago

yes

On Thu, Mar 23, 2017 at 2:58 PM, Stephen McDonald notifications@github.com wrote:

Does this work with Python 2?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stephenmcd/cartridge/pull/322#issuecomment-288873413, or mute the thread https://github.com/notifications/unsubscribe-auth/ADwox1sxXeZSnKARlwI8X8DW4rIK2enlks5rousMgaJpZM4MnK4G .

ryneeverett commented 7 years ago

I don't see how it would work in python2 without the print_function.

rodney757 commented 7 years ago

I'm not terrible familiar with python and the whole 2 vs 3 thing, but I created a venv with python version 2.7.11 and was able to successfully run the command.

Looking into it, it seems that python2 prints a tuple. However, I've added an import for the print_function.

On Thu, Mar 23, 2017 at 7:01 PM, ryneeverett notifications@github.com wrote:

I don't see how it would work in python2 without the print_function.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stephenmcd/cartridge/pull/322#issuecomment-288912513, or mute the thread https://github.com/notifications/unsubscribe-auth/ADwox-3wRZtt5f0PGMdtRptJm2Ne_2ohks5royP1gaJpZM4MnK4G .

stephenmcd commented 7 years ago

Thanks guys