Wrong field lookup in views
See original GitHub issueHi, thanks for this plugin! It looks like it’ll save at least few hours of unnecessary work!
I just have installed the plugin and started getting internal server error from views.py
. The issue is the line 102
:
users = User.objects.filter(email__iexact=email)
In an app that I’m currently working on, there’s no email
field, but it’s actually a username
field that stores the email.
How about updating the plugin, so that it allows to parametrize the name of the field used throughout the data flow? This parameter could be use in views.py
, but also in serializers.py
(so there are no inconsistencies in parameter between them) and elsewhere.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
Lookups Defaulting to Incorrect View in Dynamics 365 v9
In Dynamics 365 you can select the default view that a Lookup field will display when selecting an existing Lookup value.
Read more >LOOKUP AND VLOOKUP produce wrong results, Why???
I have a specific cell with value let say "CC" and in another sheet I have to look up this same value and...
Read more >Lookups Defaulting to Incorrect View in Dynamics 365 v9
In Dynamics 365 you can select the default view that a Lookup field will display when selecting an existing Lookup value.
Read more >Wrong field label for lookups when using lightning-record-edit ...
I'm having an issue when using Standard Lookups on lightning-record-edit-form. In the following example:.
Read more >How to control the lookup view columns for a customer field
You can just add columns at the beginning of the table's lookup view that are always going to have data. These will then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for your quick response.
I’m having problems with this. I just installed the latest version 1.1.0rc1 into my project, and configured the settings value: 'DJANGO_REST_LOOKUP_FIELD = ‘username’.
This hasn’t made any difference. The view is still expecting an ‘email’.
In the commit tagged ‘1.1.0rc1’, the view ‘ResetPasswordRequestToken’ still uses the ‘EmailSerializer’, which is expecting the POSTed value to be a properly formatted EmailField, right?
Have you been able to verify that this works?
No worries 😃
I’ll take a look at it, thank you!