Code Monkey home page Code Monkey logo

Comments (4)

mrsarm avatar mrsarm commented on June 11, 2024

Yes @eyalabadi98 , I want to add a filter to the side bar of the Django list view time ago, with a label like "Assigned to me", but I didn't have time to write the code.

I added this post from Stackoverflow to my bookmarks, becuase I think this is the best way to solve it: https://stackoverflow.com/questions/12102697/creating-custom-filters-for-list-filter-in-django-admin/45136544#45136544

I you can do it, any PR would be appreciated.

from django-coleman.

eyalabadi98 avatar eyalabadi98 commented on June 11, 2024

Hey,
I will definitely want to do it, but I don't want it to be optional. They can only see it it was assigned to me. Kind of my way of doing this is to create a permision first, then add a filter on the backend that only shows the column User.username if it matches the currently logged in user, and if they have the permission for global view, they can see everything.

I'll hopefully post an update soon

from django-coleman.

mrsarm avatar mrsarm commented on June 11, 2024

OK, sounds good, maybe configurable through Django settings to be optional, or even set a name of a group where users are able to see any task not just admin user would be great!

from django-coleman.

eyalabadi98 avatar eyalabadi98 commented on June 11, 2024

Yes, I got it working, but I created my own filter, so now the default filter sidebar doesnt work and I'm stuck on how to receive and display filters from settings.py. Hopefully I can figure it out

from django-coleman.

Related Issues (5)

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.