Git Product home page Git Product logo

django-autocompletefilter's Introduction

Hi, I'm Julian and I love fast and beautiful websites!

πŸ§‘β€πŸ’» I'm a full stack developer from ZΓΌrich, Switzerland who specializes in Python, Django, JavaScript, HTMX, Alpine.js, React.js, Tailwind CSS, Docker and many other awesome web technologies.

πŸ”­ Are you looking for a talented software engineer with over 10 years of experience to join your team? Get in touch with me and let's see if we're a match!

πŸ‘‰ You can find ways to contact me on my website!

Awesome projects I've created

πŸ•ΉοΈ TriviaRoyale lets you play live online trivia questions and compete against other players 🧩 Schnitzeljagd.dev challenges your web dev knowledge in an online treasure hunt

django-autocompletefilter's People

Contributors

julianwachholz avatar marceltschoppch avatar mogost avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-autocompletefilter's Issues

Register 2 modelAdmin

Hello,

Could you give an example for setting your module please ?

Thanks in advance

Thierry

Django 3.0 compatibility

setup.py requires django<3.0

    install_requires=(
        'django>=2.0,<3.0',
    ),

Django 3.0 is released already. Are there any reasons for this limitation?

Can you give me some examples about the step

Can you give me some examples about this step

  1. Create and register a model admin for the model you want to filter by. Ensure it has search_fields specified for autocomplete to work.

  2. In your second model admin, use the AutocompleteFilterMixin on your class and add the desired foreign key attribute to filter by to the list_filter items by using the AutocompleteListFilter class:

get_language can return None

Hi! I'm trying your django package but I found an error setting it up. In my project get_language() returns None and the admin crashes when it tries to get the absolute paths of the js files

This can be fixed just by adding a default value here:

i18n_name = SELECT2_TRANSLATIONS.get(get_language())

Or just including i18n_name path when is not None.

Fails to render with Django 3.2

Django 3.2 seems to have changed how admin autocomplete works, so views using AutocompleteListFilter fail to render because admin:app_model_autocomplete views no longer exist. Instead there seems to be a new global (shared among all models) admin:autocomplete view.

For instance, autocomplete against a user ends up like this:

Reverse for 'auth_user_autocomplete' not found. 'auth_user_autocomplete' is not a valid view function or pattern name.

Add a filter based on `RelatedOnlyFieldListFilter`

it would be sweet if there was a second filter that was based on the above mentioned RelatedOnlyFieldListFilter which already filters the choices to the ones that are actually being used by the models.

Strict requirement for django version

install_requires =
Django >= 2.0, < 3.3

I suggest not limiting the top level of the django version, as it is very likely that with the release of a new version of django, django-autocompletefilter will work as intended.

#20 38.52 The conflict is caused by:
#20 38.52     The user requested django==4.0a1
#20 38.52     aldjemy 2.2 depends on Django>=2.2
#20 38.52     django-allauth 0.45.0 depends on Django>=2.0
#20 38.52     django-appconf 1.0.4 depends on django
#20 38.52     django-auth-ldap 3.0.0 depends on Django>=2.2
#20 38.52     django-autocompletefilter 0.0.7 depends on Django<3.3 and >=2.0

Now the alpha version of djagno 4.0 is out and I wanted to test its compatibility with my project. And out of a lot of my dependencies, only django-autocompletefilter limit the top version.

AutocompleteListFilter Options

Is it possible to pass filtering options to AutocompleteListFilter?

For example, I want to filter by admins and I have their role set as a field in the model, I'd just need to pass that to the filter somehow.

If this isn't possible, it'd be a great feature for the future!

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.