Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Command initsocialapp

Seamus Smith edited this page May 25, 2022 · 4 revisions

Command initsocialapp

Usage

python manage.py initsocialapp [-c|--config]

Description

Command line tool for setting up socialapp logins for the app without having to use the Django Admin panel.

Prompts the user for the needed keys to setup socialapp logins. Nothing will be written or overwritten until the user says yes to the final prompt.

The command asks for:

  • Client id
  • Client Secret
  • Domain name
  • Domain Display Name

Domain name and Domain Display Name is the IP for home by default. This is for developer convenience when working in a dev environment.

After prompting the user for all the needed information, the command will echo all the information given to the command and then ask the user if the information looks right. Upon saying yes, the configuration will be written to the database.

Nothing is written to the database until the user says yes to the final prompt.

If a socialapp is already registered, it will prompt the user if they want to override it.

[-c|--config] flag

The config flag makes it so that it will take needed fields from environment variables instead of stdout. Expected environment variables include:

GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
SITE_URL

This command is usually ran in a production environment where variables are set.