Comments (3)
Hi @erdos4d thank you for reporting this you should absolutly be able to override the get_queryset method... through in my examples I tend to use fitler_queryset (that should work)
just to be clear the intention here is to filter what a user can subscribe to ? or is the intention to filter the results from REST like actions: list
retrieve
create
and update
etc?
from djangochannelsrestframework.
So I have done a little more looking into this and the source of the issue is
The reason this is here is we need to register a django even hook on the database record. (this needs to happen before any insurance of the consumer is created but rather when django starts up) so we cant use get_queryset as this is an instance method and we need to be able to know the DB record type at django startup to register change handlers on all running threads/instrances of django.
you can use filter_queryset
method (as used here https://nilcoalescing.com/blog/BuildingARealtimeSocialNetworkUsingDjangoChannels/#websocket-consumer ) to filter based on the user (however as that post describes this has limited use for subscription in that case you need to follow the suggestions in the post by defining the groups that are used to notify of changes and limiting what groups a user can subscribe to).
from djangochannelsrestframework.
this mixin should realy check if get_queryset has been defined and if it has it should raise some warning.
from djangochannelsrestframework.
Related Issues (20)
- [BUG] It's impossible to fully use a REAL WORLD viewset via view_as_consumer HOT 1
- [BUG] aws(elastickbeanstalk) and library HOT 1
- observer for instances based on foregien key HOT 2
- [BUG] app() missing 2 required positional arguments: 'receive' and 'send'
- Document support for channels v4 HOT 1
- [BUG] HOT 1
- Add link to ReadTheDocs in GitHub Project Description HOT 1
- `chat/layout.html` referenced in tutorial is missing HOT 7
- Object level permission HOT 4
- [Feature request] Dynamic subscription filtering through query params. HOT 7
- [Feature] support OR operations for group subscriptions
- [Feature] Subscribe to changes of a given field/fields
- djangochannelsrestframework working with gunicorn HOT 2
- [Feature] Add support to more optimally manually send bulk create events over the existing infra HOT 3
- Improve documentation HOT 1
- [BUG] ObserverModelInstanceMixin not observable inside Celery task HOT 1
- [Bug]In the tutorial, notify_users can't group_send when client connect
- In the tutorial, subscribe was executed twice, group_send will also send twice each time
- How to pass an access token HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djangochannelsrestframework.