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

  • Home
  • SEARCH
  • 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 9256969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:05:59+00:00 2026-06-18T12:05:59+00:00

I have the mysite/poll app from the Django tutorial running locally and am trying

  • 0

I have the “mysite/poll” app from the Django tutorial running locally and am trying to deploy to GAE. I have defined DJANGO_SETTINGS_MODULE in the wsgi.py and admin.py as

import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")

This is the traceback on deployment:

Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py",      line 196, in Handle
    handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
      File        "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 255, in   _LoadHandler
    handler = __import__(path[0])
  File "/base/data/home/apps/s~ceemee11111/1.365096182895980177/admin.py", line 1, in <module>
from django.contrib import admin
  File "/python27_runtime/python27_lib/versions/third_party/django-1.4/django/contrib/admin/__init__.py", line 3, in <module>
    from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
  File "/python27_runtime/python27_lib/versions/third_party/django-1.4/django/contrib/admin/helpers.py", line 2, in <module>
    from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
      File "/python27_runtime/python27_lib/versions/third_party/django-          1.4/django/contrib/admin/util.py", line 1, in <module>
    from django.db import models
  File "/python27_runtime/python27_lib/versions/third_party/django-1.4/django/db/__init__.py", line 11, in <module>
    if DEFAULT_DB_ALIAS not in settings.DATABASES:
  File "/python27_runtime/python27_lib/versions/third_party/django-1.4/django/utils/functional.py", line 184, in inner
self._setup()
  File "/python27_runtime/python27_lib/versions/third_party/django-1.4/django/conf/__init__.py", line 40, in _setup
    raise ImportError("Settings cannot be imported, because environment variable %s is        undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable             DJANGO_SETTINGS_MODULE is undefined.

why is the DJANGO_SETTINGS_MODULE still undefined

Thanks
Dan

  • 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-06-18T12:06:00+00:00Added an answer on June 18, 2026 at 12:06 pm

    https://developers.google.com/appengine/docs/python/tools/libraries27#django

    You can also try add

    env_variables:
      DJANGO_SETTINGS_MODULE: 'myapp.settings'
    

    in app.yaml

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

Sidebar

Related Questions

I am trying to have a URL that would look like: mysite.com/@username Which would
I'm doing the Django tutorial, part 3: https://docs.djangoproject.com/en/dev/intro/tutorial03/ I currently have this text in
I have a current Rails 3 app and I'd like to run a poll
I have a query string mysite.com/?local=1 local varies from 1 - 600. For each
I have my site www.mysite.com in /var/www/ and I added my cakephp app in
I have a website www.mysite.com running behind a load balancer. There are two servers
I'm writing my third django app using the tutorial https://docs.djangoproject.com/en/dev/intro/tutorial03/ and i'm having trouble
I have Controller: [MySite]\Controllers\DistributionTools\TrackingChannelsController.cs [HttpPost] public void InitTcFirstPageView() { var model = new TcFirstPageModel
I have a page http://www.mysite.com/image.aspx , that I want to load and display an
I have a domain with wildcard - *.mysite.com hosted on Server1 I am planning

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.