Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6779975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:27:05+00:00 2026-05-26T16:27:05+00:00

On the web page, I get the following error: FieldError at /foo/bar/ Cannot resolve

  • 0

On the web page, I get the following error:

FieldError at /foo/bar/
Cannot resolve keyword 'foos' into field. Choices are: __unused__, [snip]

The problem code is

User.objects.filter(foos__name='bar')

When I run this in the shell, it works and I get a recordset:

>>> User.objects.filter(foos__name='bar')
[<User: JordanReiter>]

But on the webpage I get the exception above.

I’ve never run into this issue before and I wonder if I’m missing something?

Update

Based on doing a diff between the “Choices are: …” on the web and in the shell it appears there are 7 fields that are available in the shell that aren’t available if I do the query on the web. They appear to be ordinary ForeignKey fields pointing to User, with no difference from the other fields that work.

Tested So Far

  • INSTALLED_APPS are identical for both settings
  • runserver version also works (as would be expected)
  • User used is identical in both cases and is django.contrib.auth.models.User
  • related names for the shell’s User and the web app’s User are definitely different. User._meta.get_all_related_objects() in the shell displays around 7 more related fields than the if I dump that from the web app.
  • values for settings are also basically identical (one has the TEST_XYZ settings but those don’t affect anything)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:27:06+00:00Added an answer on May 26, 2026 at 4:27 pm

    This is only sort-of an answer. Turns out the reason that the field is not available is because all of the installed apps’ models do not correctly load in when the app is first compiled, so the app permanently believes certain fields don’t exist, even after they recognize the models for those fields do exist. It appears to be related to this earlier, equally confusing problem:

    SO: Internal Server error on the first request (and only the first request) after server reload

    Oh, and so how I fixed it was to change areas of code that imported the models that the web server couldn’t find on the first request. Somehow, omitting those meant that the server would recognize that the fields in question were present. Super weirdness!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following in the web page but can't get a response from
I get this wired error only when I try to access the web page
When I try user = System.Web.UI.Page.CurrentUser or user = System.Web.UI.Page.User.Identity I get an error
I get the following error after moving aspx page to some folder. Error: Unhandled
On a windows 2008 web server, I get the following error whenever posting a
I get the following error message trying to run my page Compiler Error Message:
When looking to get data from a web page whats the recommended method if
In a web page,i want to get every visible text in a textnode.I don't
I'm attempting to get my first ASP.NET web page working on windows using Mono
I am trying to get the Y scroll index for a web page in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.