modlinltd / django-advanced-filters

Add advanced filtering abilities to Django admin
https://pypi.org/project/django-advanced-filters/
MIT License
771 stars 173 forks source link

Django 1.9 support #11

Closed asfaltboy closed 8 years ago

asfaltboy commented 8 years ago

We ought to support the official latest release; while not breaking previous compatibility if possible.

Currently, at least 1 error is raised:

File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\core\management\__init__.py", line 353, in execute_from_command_line
    utility.execute()
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\core\management\__init__.py", line 327, in execute
    django.setup()
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\__init__.py", line 18, in setup
    apps.populate(setting.INSTALLED_APPS)
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\apps\registry.py", line 115, in populate
    app_config.ready()
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\contrib\admin\apps.py", line 22, in ready
    self.module.autodiscover()
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\contrib\admin\__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
File "C:\Users\Dank\Anaconda3\lib\site-packages\django\utils\module_loading.py", line 50, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
File "C:\Users\Dank\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 622, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "C:\Users\Dank\Anaconda3\lib\site-packages\advanced_filters\admin.py", line 6, in <module>
    from django.contrib.admin.util import unquote
ImportError: No module named 'django.contrib.admin.util'

(originally reported by Kato, Daniel D)

schuyler1d commented 8 years ago

I didn't end up getting all the way to support, but got farther: https://github.com/schuyler1d/django-advanced-filters/tree/django19

Currently, the issue seems to be it renders the form in the change list template, but mfp-hide wrapper is hidden, and I don't know what unhides it. Hope this helps.

asfaltboy commented 8 years ago

Hi @schuyler1d, thanks for the help; the commit looks good and is very much appreciated.

I definitely plan to take a look at the frontend rendering issue this weekend.

Meanwhile, do you mind rebasing your branch on top of the develop branch, adding Django 19 to tox.ini and submitting a Pull Request?

renou commented 8 years ago

+1

macagua commented 8 years ago

Here my pull request https://github.com/modlinltd/django-advanced-filters/pull/12 that fixed some errors for Django 1.9 support.

asfaltboy commented 8 years ago

Thank you again @schuyler1d and @macagua! I've merged both of your branches and added some of my own that. Tests seem to pass now and I see no major issues in changelist UI, please let me know if any issues remain, and how I can reproduce them.