Django project user account management for the ARENA.
Dependencies: python3
, pip3
, virtualenv
(and requirements.txt
; check if path in Makefile
is correct)
- Setup a Google Cloud App for your instance of the ARENA.
- Make sure to set up Google Web OAuth for the ARENA web client as well as Google Limited-Input OAuth for the ARENA Python client.
- For the Google Web OAuth Credentials you will need to add Authorized JavaScript origins:
http://your.domain http://localhost:8989
- For the Google Web OAuth Credentials you will need to add Authorized redirect URIs:
http://your.domain/user/accounts/google/login/callback/ http://localhost:8989/
- For the Google Web OAuth Credentials you will need to add Authorized JavaScript origins:
http://localhost:8000
- For the Google Web OAuth Credentials you will need to add Authorized redirect URIs:
http://localhost:8000/user/accounts/google/login/callback/
- Create an environment file,
.env
, for testing on localhost using your Google auth app "Client id" and "Secret key".
HOSTNAME=localhost
ARENA_REALM=realm
EMAIL=[email protected]
GAUTH_CLIENTID=Google_OAuth_Web_application_Client_ID
GAUTH_CLIENTSECRET=Google_OAuth_Web_application_Client_Secret
GAUTH_INSTALLED_CLIENTID=Google_OAuth_Desktop_Client_ID
GAUTH_INSTALLED_CLIENTSECRET=Google_OAuth_Desktop_Client_Secret
GAUTH_DEVICE_CLIENTID=Google_OAuth_TV_and_Limited_Input_Client_ID
GAUTH_DEVICE_CLIENTSECRET=Google_OAuth_TV_and_Limited_Input_Client_Secret
MQTT_TOKEN_PRIVKEY=/path/to/your/test/key/file.pem
- Create db:
make migrate
- Create admin user:
python3 manage.py createsuperuser --email [email protected] --username admin
make run
- Admin:
http://localhost:8000/user/admin
- Main Page:
http://localhost:8000/user