Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Arya
    @misingnoglic
    Is this project on pypi?
    Pavel Savchenko
    @asfaltboy
    Not IIRC, it can be though if required
    Pavel Savchenko
    @asfaltboy
    Is it, required?
    bjornpoort
    @bjornpoort
    hi guys, trying out this package. might be a trivial question; but where do you import AdminAdvancedFiltersMixin from?
    found it out: from advanced_filters.admin import AdvancedFilterAdmin, AdminAdvancedFiltersMixin
    bjornpoort
    @bjornpoort
    got it set up now, but when applying any filter it returns this error: name 'basestring' is not defined
    using latest stable django (1.8.7) and python 3.5 - not compatible at this moment?
    exception location: env/lib/python3.5/site-packages/advanced_filters/form_helpers.py in clean, line 29
    bjornpoort
    @bjornpoort

    "These are both errors in Python 3 since there's no such thing as 'unicode' or 'basestring'. But it's pretty simple to normalise the vocabulary between the two versions:

    try:
    unicode = unicode
    except NameError:

    # 'unicode' is undefined, must be Python 3
    str = str
    unicode = str
    bytes = bytes
    basestring = (str,bytes)

    else:

    # 'unicode' exists, must be Python 2
    str = str
    unicode = unicode
    bytes = str
    basestring = basestring "
    Pavel Savchenko
    @asfaltboy
    This message was deleted
    @bjornpoort Honestly, I haven't used it on python 3 in production, and our test coverage is still poor. A pull request would be very welcome!
    Pavel Savchenko
    @asfaltboy
    @bjornpoort would you be able to open an issue for this on github?
    bjornpoort
    @bjornpoort
    done!
    Pavel Savchenko
    @asfaltboy
    thanks, I'm about half way there to adding tests (+py3 support) to the forms module
    bjornpoort
    @bjornpoort
    that's great asfaltboy
    bjornpoort
    @bjornpoort
    testing it. works now. useful package, came accross a couple of errors; do you appreciate raising seperate issues?
    HCN
    @hermanocabral
    howdy
    I'm facing an issue where the advanced filter button doesn't show up in the admin page if I have another mixin loaded first.
    anyone ever saw that?
    eg. class WhateverAdmin(ImportExportMixin, AdminAdvancedFiltersMixin, admin.ModelAdmin):
    midijunk
    @midijunk
    Hi, as I see Django 1.11 with Python 3.6 is not supported, right? sorry, rather new to all this
    Pavel Savchenko
    @asfaltboy
    Hi @midijunk as you say, 3.6 is not supported, simply because we don't use it or test for it. But, it doesn't mean it won't work, so by all means please try it out and report back
    I'm going to try running the tests on it just for fun, give me 10
    Django 1.11 IS supported by the way, we have some users with this version and last version should work fine with it
    Pavel Savchenko
    @asfaltboy
    Tests tun fine, I'm going to PR those, because why not
    midijunk
    @midijunk
    yeah, I tried it but got an error ;)
    "Reverse for 'afilters_get_field_choices' not found. 'afilters_get_field_choices' is not a valid view function or pattern name."
    Pavel Savchenko
    @asfaltboy

    Hmm, that's odd. Are you sure you followed the installation instructions ? Especially the part:

    Add url(r'^advanced_filters/', include('advanced_filters.urls')) to your project's urlconf.

    midijunk
    @midijunk
    yes, had to import include for it, so I'm sure I've done it. Server starts but this error arrises when I try to open the models admin page. Reverted yesterday back but I'm going to redo it now
    ah, maybe I have it.
    midijunk
    @midijunk
    @asfaltboy thank you very much....wrong urlconf...works now :fire:
    Pavel Savchenko
    @asfaltboy
    :+1: good to hear that ! Keep us posted on how it works for you
    midijunk
    @midijunk
    until now everything fine. no problems so far
    DjMoren
    @DjMoren
    Hi! Could be this app be used to store some different filters for a model to be used later? For example, I want to create lists of users based on different filters and have those filters saved to be used later for mailing users based on different filters.
    Pavel Savchenko
    @asfaltboy
    It does sounds like something you could achieve with the package. Please try it out and let us know your feedback
    Igor
    @tifgor
    hi everyone , i need help with an issue.
    when trying to save a filter this happens:
    Traceback (most recent call last):
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
    response = wrapped_callback(request, callback_args, **callback_kwargs)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\contrib\admin\options.py", line 616, in wrapper
    return self.admin_site.admin_view(view)(
    args, kwargs)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\utils\decorators.py", line 130, in _wrapped_view
    response = view_func(request, *args,
    kwargs)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\views\decorators\cache.py", line 44, in _wrapped_view_func
    response = view_func(request, args, **kwargs)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\contrib\admin\sites.py", line 232, in inner
    return view(request,
    args, **kwargs)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\advanced_filters\admin.py", line 97, in changelist_view
    response = self.adv_filters_handle(request,
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\advanced_filters\admin.py", line 91, in adv_filters_handle
    return self.save_advanced_filter(request, adv_filters_form)
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\advanced_filters\admin.py", line 62, in save_advanced_filter
    if form.is_valid():
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\forms.py", line 175, in is_valid
    return self.is_bound and not self.errors
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\forms.py", line 170, in errors
    self.full_clean()
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\forms.py", line 373, in full_clean
    self._clean_form()
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\forms.py", line 400, in _clean_form
    cleaned_data = self.clean()
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\advanced_filters\forms.py", line 305, in clean
    if not self.fields_formset.is_valid():
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\formsets.py", line 321, in is_valid
    self.errors
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\formsets.py", line 304, in errors
    self.full_clean()
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\formsets.py", line 362, in full_clean
    if self.can_delete and self._should_delete_form(form):
    File "C:\Users\%user%\projects\daedalus\venv\lib\site-packages\django\forms\formsets.py", line 314, in _should_delete_form
    return form.cleaned_data.get(DELETION_FIELD_NAME, False)
    AttributeError: 'AdvancedFilterQueryForm' object has no attribute 'cleaned_data'