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 3338074
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:19:52+00:00 2026-05-18T00:19:52+00:00

I’m new to django and Google App Engine, and I’m having trouble with using

  • 0

I’m new to django and Google App Engine, and I’m having trouble with using the datastore. Every time I make a query, such as

db.GqlQuery("SELECT * FROM Listing ORDER BY date DESC LIMIT 10")

I receive the error:

'WSGIRequest' object has no attribute 'user'

This error seems to be generated in context_processors.py within the django core. Now, the advice I’ve found on the Internet said to comment out user-related INSTALLED_APPS and MIDDLEWARE_CLASSES, but this does not seem to help. My code looks like this:

MIDDLEWARE_CLASSES = (
#    'django.middleware.common.CommonMiddleware',
#    'django.contrib.sessions.middleware.SessionMiddleware',
#    'django.contrib.auth.middleware.AuthenticationMiddleware',
#    'django.middleware.doc.XViewMiddleware',
)

INSTALLED_APPS = (
#    'django.contrib.auth',
    'django.contrib.contenttypes',
#    'django.contrib.sessions',
    'django.contrib.sites',
)

My Listing object is defined as the following (it had a author property earlier, but this is now commented out and the object was redefined with a new name):

class Listing(db.Model):
    #author = db.UserProperty()
    address = db.StringProperty()
    date = db.DateTimeProperty(auto_now_add=True)
    coords = db.GeoPtProperty()

Does anyone know what is causing this error, and how to fix it? Is it perhaps a case of having to reset the settings somehow?

  • 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-18T00:19:52+00:00Added an answer on May 18, 2026 at 12:19 am

    UPDATE

    The solution suggested by sdolan seems to be to add the following to the settings.py of the app:

    TEMPLATE_CONTEXT_PROCESSORS = (
    “django.core.context_processors.debug”,
    “django.core.context_processors.i18n”)

    This effectively removes the third default processor, django.core.context_processors.auth (which shouldn’t be there because for AppEngine we don’t want Django’s auth component).

    Thank you, sdolan, for the solution! hopefully someone else can use it, too. 🙂

    @Nick, I think it’s worth putting this golden piece about CONTEXT_PROCESSORS in the tutorial (http://code.google.com/appengine/articles/django.html)

    (Original followup to the question)

    Have the same problem, looking for solution…. All works fine when settings.py contains

    DEBUG = True

    but this error pops up (and kills my motivation to proceed with learning) when I switch to

    DEBUG = False

    @Nick Johnson, here’s the stack trace:

    Traceback (most recent call last):
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3211, in _HandleRequest
        self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 3154, in _Dispatch
        base_env_dict=env_dict)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 527, in Dispatch
        base_env_dict=base_env_dict)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2404, in Dispatch
        self._module_dict)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2314, in ExecuteCGI
        reset_modules = exec_script(handler_path, cgi_path, hook)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\dev_appserver.py", line 2212, in ExecuteOrImportScript
        script_module.main()
      File "C:\Dev\appengine\djangotest\main.py", line 37, in main
        util.run_wsgi_app(application)
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\util.py", line 97, in run_wsgi_app
        run_bare_wsgi_app(add_wsgi_middleware(application))
      File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\webapp\util.py", line 115, in run_bare_wsgi_app
        result = application(env, _start_response)
      File "C:\Program Files (x86)\Google\google_appengine\lib\django\django\core\handlers\wsgi.py", line 189, in __call__
        response = self.get_response(request)
      File "C:\Program Files (x86)\Google\google_appengine\lib\django\django\core\handlers\base.py", line 103, in get_response
        return callback(request, **param_dict)
      File "C:\Program Files (x86)\Google\google_appengine\lib\django\django\views\defaults.py", line 79, in page_not_found
        return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path})))
      File "C:\Program Files (x86)\Google\google_appengine\lib\django\django\template\context.py", line 100, in __init__
        self.update(processor(request))
      File "C:\Program Files (x86)\Google\google_appengine\lib\django\django\core\context_processors.py", line 18, in auth
        'user': request.user,
    AttributeError: 'WSGIRequest' object has no attribute 'user'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I want use html5's new tag to play a wav file (currently only supported
I've got a string that has curly quotes in it. I'd like to replace
I'm looking for suggestions for debugging... If you view this site in Firefox or
I have a jquery bug and I've been looking for hours now, I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.