Skip to content

Allow alternatives to pk for object lookup #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jqsjqs
Copy link

@jqsjqs jqsjqs commented Mar 8, 2020

Hi you all. First - thanks for providing the django client project.

Some Django projects use both an integer id/pk along with a separate uuid field where only the uuid is exposed externally to clients. This PR adds DRF-like field lookup name functionality so a user could choose to have activities use that identifier rather than pk.

Note that this is a separate problem than the UUID issue here: https://github.com/GetStream/stream-django/pull/55/files

I'm using this on a personal project but providing in case you want to consider (or point others to a solution in case it comes up in the future).

@jqsjqs
Copy link
Author

jqsjqs commented Mar 8, 2020

sorry. tests. working on it.

@jqsjqs
Copy link
Author

jqsjqs commented Mar 8, 2020

Note: works for Django 2.0+ / Python 3.5+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant