Giter Site home page Giter Site logo

Comments (11)

asfaltboy avatar asfaltboy commented on August 29, 2024

Hi @dgleba thank you for your interest. Can you share your ModelAdmin definition? Take not that the field definition is not implicit; you have to explicitly list each field you want to be able to filter by in the advanced_filter_fields property, as demonstrated in the README.

from django-advanced-filters.

dgleba avatar dgleba commented on August 29, 2024

Sorry, I forgot to put that in the issue. I was editing that into my comment as you answered.

It is there now.

Thanks for the quick response.

from django-advanced-filters.

asfaltboy avatar asfaltboy commented on August 29, 2024

So your fields list is empty? Can you check your browser javascript console for any errors? Also, you don't need grappelli anymore, and both should be supported, but just for a check try removing grappelli.

from django-advanced-filters.

dgleba avatar dgleba commented on August 29, 2024

The fields list in the advanced filter form is empty.

Screen shots attached of javascript console with and without grappelli. It's empty either way.

full code for my test app is here: https://github.com/dgleba/edge225b

Without Grappelli...

without grapelli

With Grappelli:

with grapelli

from django-advanced-filters.

dgleba avatar dgleba commented on August 29, 2024

I installed django-advanced-filters from github.
It still has the problem.

Title:  I tried to install from github..
-----------------------2016-03-17[Mar-Thu]16-18PM


set wpip=c:\p2\Python27\Scripts\pip

%wpip% install https://github.com/modlinltd/django-advanced-filters/tarball/master

_____________



C:\n\web\edge225b\my_proj\src>set wpip=c:\p2\Python27\Scripts\pip

C:\n\web\edge225b\my_proj\src>
C:\n\web\edge225b\my_proj\src>%wpip% install https://github.com/modlinltd/django-advanced-filters/tarball/master
Downloading/unpacking https://github.com/modlinltd/django-advanced-filters/tarball/master
  Running setup.py (path:c:\users\dgleba\appdata\local\temp\pip-ieqn9p-build\setup.py) egg_info for package from https://g
ithub.com/modlinltd/django-advanced-filters/tarball/master
    PyPandoc not installed. Cannot convert README.md to rst

  Requirement already satisfied (use --upgrade to upgrade): django-advanced-filters==1.0.1 from https://github.com/modlinl
td/django-advanced-filters/tarball/master in c:\p2\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): django-easy-select2==1.2.5 in c:\p2\python27\lib\site-packages (
from django-advanced-filters==1.0.1)
Downloading/unpacking django-braces==1.4.0 (from django-advanced-filters==1.0.1)
  Downloading django_braces-1.4.0-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): simplejson==3.6.5 in c:\p2\python27\lib\site-packages (from djan
go-advanced-filters==1.0.1)
Requirement already satisfied (use --upgrade to upgrade): six in c:\p2\python27\lib\site-packages (from django-braces==1.4
.0->django-advanced-filters==1.0.1)
Installing collected packages: django-braces
  Found existing installation: django-braces 1.8.1
    Uninstalling django-braces:
      Successfully uninstalled django-braces
Successfully installed django-braces
Cleaning up...
C:\n\web\edge225b\my_proj\src>

from django-advanced-filters.

asfaltboy avatar asfaltboy commented on August 29, 2024

Firstly, the javascript errors are odd, we don't use grappelli (i.e the grp object) in no javascript files in latest released version 1.0.1 (master), did you upgrade from a previous version?

Second, it is unfortunate that the form looks bad with django-edge, but I cannot expect all themes to display the form nicely, and this may require some work. If you find a nice set of CSS rules that work, I'd appreciate a pull request.

Finally, GitHub master branch should equal the latest release on PyPI, so I still cannot see why your field list would be empty. Tell me, are the listed fields ('owner', 'originator', 'project_number') actual fields on your Model, or are they inherited, methods or other?

In any case, thank you for the detailed test case, and my apologies for the slow replies, I'll have a closer look at this in the weekend, before I release the 1.0.2 version.

from django-advanced-filters.

dgleba avatar dgleba commented on August 29, 2024

I did not upgrade from a previous version. I just installed it initially yesterday.

The fields ('owner', 'originator', 'project_number') are directly part of the model.
The model can be seen here.. https://github.com/dgleba/edge225b/blob/master/my_proj/src/cilist1/models.py

I will try this in a clean ubuntu vm with virtualenv and see what results I get there.

Your replies are not slow. I appreciate it. Thank you for looking at this.

from django-advanced-filters.

asfaltboy avatar asfaltboy commented on August 29, 2024

The issue seems to be with the indentation in your admin.py module. The tuples list_display, list_display_links, advanced_filter_fields and list_per_page must all be properties of Cilisting1Admin but are currently not - they are under-indented!

The solution is to add 4 spaces to all of the above to make them properties of the ModelAdmin. Here's a screenshot of what happens after you fix that (see PR dgleba/edge225b#1 to your project for the code):

screen shot 2016-03-20 at 9 07 01 am

from django-advanced-filters.

dgleba avatar dgleba commented on August 29, 2024

I am very sorry I put you through this. I am embarrassed. That was not your issue at all.

Thank you for looking at this. It was stupid on my part.

All is, of course, working well after indenting properly.

Again I am sorry for wasting your time.

from django-advanced-filters.

asfaltboy avatar asfaltboy commented on August 29, 2024

Don't worry mate :) it's no trouble at all, good to hear your issue is resolved!

from django-advanced-filters.

dgleba avatar dgleba commented on August 29, 2024

Thanks.

from django-advanced-filters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.