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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:15:57+00:00 2026-06-09T03:15:57+00:00

When I try to follow this tutorial to install Google-auth2 on my Django 1.4

  • 0

When I try to follow this tutorial to install Google-auth2 on my Django 1.4 I get this error:

Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    import settings
  File "/home/ubuntu/xx/settings.py", line 140, in <module>
    GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID']
NameError: name 'os' is not defined

This line is:

139- LOGIN_REDIRECT_URL = '/'

**140- GOOGLE_OAUTH2_CLIENT_ID = os.environ['GOOGLE_OAUTH2_CLIENT_ID']**

141- GOOGLE_OAUTH2_CLIENT_SECRET = os.environ['GOOGLE_OAUTH2_CLIENT_SECRET']
142- GOOGLE_WHITE_LISTED_DOMAINS = ['mydomain.org']
SOCIAL_AUTH_USER_MODEL = 'auth.User'
  • 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-09T03:15:59+00:00Added an answer on June 9, 2026 at 3:15 am

    You try to use something from module os, which is not imported, thus you cannot use it.

    In order to fix this problem, add an import of that module somewhere at the beginning of settings.py:

    import os
    

    Additionally, if you don’t have GOOGLE_OAUTH2_CLIENT_ID in os.environ, don’t load it from there. Instead, set it directly in settings.py:

    GOOGLE_OAUTH2_CLIENT_ID = 'your-actual-client-id-value'
    

    Or, you can set it first, in your shell, before running the script:

    export GOOGLE_OATH2_CLIENT_ID='your-actual-client-id-value'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to follow this tutorial, but I can't get it to work: http://weierophinney.net/matthew/archives/246-Using-Action-Helpers-To-Implement-Re-Usable-Widgets.html
I am trying to follow this tutorial ( Using-core-plot-in-an-iphone-application ). When I try to
I'm trying to follow this tutorial to try and begin to understand the Visual
I try to create database from entity framework code first follow with this tutorial
I'm try to follow this guide: tutorial but when I execute on the web
When I follow this tutorial , it gives me an error on the [playercontroller
I just follow this DIHQuickStart , try to import data to solr from mysql.
I try to work with ctags and it simply doesn't work. I follow this
I try to get this following url using the downloadURL function as follows: http://www.ncbi.nlm.nih.gov/nuccore/27884304
I just typed the follow to try and get my SharePoint site: $spWeb =

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.