** Note that Portal Designer requires a working edX devstack to function properly **
- Start and provision the edX devstack, as portal designer currently relies on devstack
- Verify that your devstack virtual environment is active before proceeding
- Clone the portal designer repo and cd into that directory
- Run make dev.provision to provision a new portal designer environment
- Run make dev.init to start the portal designer app and run migrations
Once the server is up and running you can view the portal designer at http://localhost:18808/cms
You can login with the username [email protected] and password edx
The Makefile includes numerous commands to start the service, but the basic commands are the following:
Start the Docker containers to run the portal designer servers
$ make dev.up
Open the shell to the designer container for manual commands
$ make app-shell
Open the logs in the designer container
$ make designer-logs
The following is provided for informational purposes only. You can likely ignore this section.
Dependencies can be installed via the command below.
$ make requirements
When developing locally, it may be useful to have settings overrides that you do not wish to commit to the repository. If you need such overrides, create a file designer/settings/private.py. This file's values are read by designer/settings/local.py, but ignored by Git.
This service relies on the LMS serves as the OAuth 2.0 authentication provider.
Configuring credentials to work with OAuth requires registering a new client with the authentication provider and updating the Django settings for this project with the client credentials.
- A new OAuth 2.0 client can be created at
http://localhost:18000/admin/oauth2_provider/application/
. - Click the Add Application button.
- Leave the user field blank.
- Specify the name of this service,
designer
, as the client name. - Set the URL to the root path of this service:
http://localhost:8003/
. - Set the Redirect URL to the complete endpoint:
http://localhost:18808/complete/edx-oauth2/
. - Copy the Client ID and Client Secret values. They will be used later.
- Select Confidential as the client type.
- Select Authorization code as the authorization grant type.
- Click Save.
Now that you have the client credentials, you can update your settings (ideally in designer/settings/local.py). The table below describes the relevant settings.
Setting | Description | Value |
---|---|---|
SOCIAL_AUTH_EDX_OAUTH2_KEY | OAuth 2.0 client key | (This should be set to the value generated when the client was created.) |
SOCIAL_AUTH_EDX_OAUTH2_SECRET | OAuth 2.0 client secret | (This should be set to the value generated when the client was created.) |
SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT | OAuth 2.0 authentication URL | http://127.0.0.1:18000/oauth2 |
Local installations use SQLite by default. If you choose to use another database backend, make sure you have updated your settings and created the database (if necessary). Migrations can be run with Django's migrate command.
$ python manage.py migrate
The server can be run with Django's runserver command. If you opt to run on a different port, make sure you update OAuth2 client via LMS admin.
$ python manage.py runserver 8003