omni-digital / django-conditioner

Create simple 'if this then that' style rules in your Django application. Comes with a bunch of ready to use actions and conditions, but is also easily extensible and allows model specific actions/conditions.
MIT License
3 stars 1 forks source link

Issue on adding a rule #3

Open jelordreygulle opened 6 years ago

jelordreygulle commented 6 years ago
Request Method: GET

http://127.0.0.1:8000/admin/conditioner/rule/add/ 1.11 TypeError super() takes at least 1 argument (0 given) /Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/site-packages/conditioner/admin.py in add_view, line 127 /Users/jelord.rey/Documents/PythonRules/env/bin/python 2.7.10 ['/Users/jelord.rey/Documents/PythonRules/django-business-rules/dbr', '/Users/jelord.rey/Documents/PythonRules/env/lib/python27.zip', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/plat-darwin', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/plat-mac', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/lib-tk', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/lib-old', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/jelord.rey/Documents/PythonRules/env/lib/python2.7/site-packages'] Thu, 30 Aug 2018 01:22:16 +0000

pawelad commented 6 years ago

I'm sorry but this library is Python 3+ only.

jelordreygulle commented 6 years ago

I have python3 already installed. How would I run it using 3 when my default is 2.7?

jelordreygulle commented 6 years ago

does alias python=python3 works?

pawelad commented 6 years ago

As you can see in the traceback you provided, the Python version you're using is python2.7 and not python3.

I'm not sure what's your dev setup but my most general recommendation would be replacing pip with pip3 and python with python3 when running the commands.

And if all this is very confusing I'd recommend looking into https://github.com/pypa/pipenv

jelordreygulle commented 6 years ago

I followed your advice and now i am getting an error screen shot 2018-08-31 at 9 56 31 am

pawelad commented 6 years ago

Sorry, I'm not sure what's wrong there, it looks like a bug but I don't use this project at the moment or have time to investigate.

Since this library wasn't updated in a while, my first guess would be lack of compatibility with the latest Django version.

jelordreygulle commented 6 years ago

In testing that project what version of django version you are using?

jelordreygulle commented 6 years ago

It actually working fine the only error i get is when i try to add a rule. which is the error i have shown from the first message.

pawelad commented 6 years ago

In testing that project what version of django version you are using?

As far as I can see it's versions 1.8 through 1.11

https://github.com/omni-digital/django-conditioner/blob/d5d2ad1f016bc3e6b34c74ff68cd024e8fad5125/tox.ini#L1-L2

It actually working fine the only error i get is when i try to add a rule. which is the error i have shown from the first message.

I'm fairly certain that the error message from the first comment (super() takes at least 1 argument (0 given)) is Python 2 related.

jelordreygulle commented 6 years ago

Oh I see. Thank you for the reply and time Sir. May i ask if you know other django business rule engines or an open source django IFTTT . Something like we can create if and then rules. Thank you. Also I do like to use this project but i cant seem to run it. Best regards