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

Add custom filters, extra data rows, more formatting

Open apyrgio opened this issue 11 years ago • 8 comments
trafficstars

Hi @noirbizarre,

I've been using this plugin for some time now and I must say that I've come to enjoy it a lot. Granted, I think there are a few things missing, so I decided to contribute to this project by adding them. I haven't managed to add documentation for them yet, but I provide explanations in the commit logs.

Side note: Given that it's been nine months since this repo has been updated, may I ask if it's still maintained?

apyrgio avatar Jun 19 '14 09:06 apyrgio

Wow! That's really interesting!

However, note, that python < 2.7 doesn't support dict comprehensions.

thepapermen avatar Jun 19 '14 09:06 thepapermen

I've fixed most of my issues (I think I have only one left). The main problem however is that the master branch of django-eztables itself cannot pass the tests, probably because Django has changed something in its url resolving since the last time they ran.

A typical strack trace is the following:

  File "/home/apyrgio/playground/django-eztables/eztables/tests.py", line 763, in test_column_search_custom
    response = self.get_response('custom-browsers', self.build_query(sSearch_1='1.1'))
  File "/home/apyrgio/playground/django-eztables/eztables/tests.py", line 1016, in get_response
    return self.client.post(reverse(name), data)
  File "/home/apyrgio/playground/django-eztables/.tox/py27/lib/python2.7/site-packages/django/core/urlresolvers.py", line 481, in reverse
    resolver = get_resolver(urlconf)
  File "/home/apyrgio/playground/django-eztables/.tox/py27/lib/python2.7/site-packages/django/utils/functional.py", line 30, in wrapper
    if mem_args in cache:
TypeError: unhashable type: 'list'

I'll look into it...

apyrgio avatar Jun 19 '14 12:06 apyrgio

Coverage Status

Coverage increased (+1.5%) when pulling 698063e17d4c24c0236246f6c37b4018eff3986a on apyrgio:feature-synnefo-integration into daeff682d5113684770c153455410bef160c581b on noirbizarre:master.

coveralls avatar Jun 20 '14 07:06 coveralls

The PR has been updated with a commit that fixes the failing tests that have to do with the url resolving.

Briefly put, the problem occurred in tests that requested the same url more than once. By adding another url resolver, it doesn't complain anymore. You can see more in the commit log of the fix.

Note that, the fix is rather hackish since I didn't have the time (or the necessary experience) to look into the Django internals. If @noirbizarre has time, I'd suggest he also take a look at it.

apyrgio avatar Jun 20 '14 07:06 apyrgio

The same CI problems happened with my pull request #24 I think I fix the problems for good, there were some incompatibilities with the new django 1.6 version and some other problems with python 3.4 Before anyone else fix these problems yet again, would it be possible to merge those fix?

sylvain-josserand avatar Jun 20 '14 08:06 sylvain-josserand

Yes, I believe that the fix you proposed is much cleaner and consistent with the Django documentation.

apyrgio avatar Jun 20 '14 08:06 apyrgio

Coverage Status

Coverage increased (+1.8%) when pulling 1f625f1bf890372d5d8831f4e75c5d0d5d61f342 on apyrgio:feature-synnefo-integration into 347e74dcc08121d20f4cf942181d873dbe33b995 on noirbizarre:master.

coveralls avatar Oct 22 '14 19:10 coveralls

Hi @noirbizarre,

I had some time today to work on this pull request. I have added some documentation for the features that this pull request introduces (client-side processing, custom formatting, custom filtering with django-filter integration, extra data for each table row), so hopefully they are more clear to you. If you are interested in accepting these features, then I'd be more than happy to go through them with you and improve them. If not then, oh well, that'd be a bummer...

P.S. The only reason that this Travis CI build fails is because Django 1.7 does not support Python 2.6. The rest of the tests pass.

apyrgio avatar Oct 22 '14 20:10 apyrgio