charettes / django-colorful

Extension to the Django web framework that provides database and form color fields
https://pypi.python.org/pypi/django-colorful
MIT License
169 stars 58 forks source link

Patch 1 #18

Closed gabn88 closed 9 years ago

gabn88 commented 9 years ago

I had issues with my django installation and django-colorful, because 'django' existed, but not 'django.jQuery', which is used. This is a simple fix.

charettes commented 9 years ago

The fixes are not correct, you can't test for sub property existence this way in JS.

'django' in window && django.jQuery should do.

gabn88 commented 9 years ago

Oh, but why does it work on my installation? Before I was getting the "TypeError: $ is not defined' error and now it is working. I assume it always fails and now uses the defined jQuery as default? Sorry for my bad fix, I'm not a good Javascript developer (yet)!

charettes commented 9 years ago

It works on your installation because 'django.jQuery' in window is always false.

charettes commented 9 years ago

Discussion moved to #19.