question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong field lookup in views

See original GitHub issue

Hi, 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:open
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
J-F-Farcommented, May 28, 2019

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?

0reactions
anx-ckreuzbergercommented, Aug 8, 2019

No worries 😃

I’ll take a look at it, thank you!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found