These docs are a work-in-progress and are currently undergoing a major rewrite!

Forge Pro

Forge Pro is a private package that provides a set of features that are not available in the public version of Forge. These packages are aimed at more advanced Django development, or solving issues that come with real-world usage of your app.

Installing

The Forge Pro packages are installed from pypi.forgepackages.com, which is a private package repository. You can subscribe and get your credentials at billing.forgepackages.com.

Below is an example of how to use those credentials with Poetry, but you can use a similar process for other pip tools by using https://pypi.forgepackages.com/ as an extra index with the built-in authentication methods.

pyproject.toml

Add the following source to your pyproject.toml:

[[tool.poetry.source]]
name = "forgepackages"
url = "https://pypi.forgepackages.com/"

Development credentials

In development, your username will be your personal username from billing.forgepackages.com.

This way you can authenticate your entire machine for you personally:

poetry config http-basic.forgepackages <personal_username> <personal_token>

Install forge-pro

Now you can install forge-pro using the standard commands:

poetry add forge-pro

Forge Pro apps can be installed individually, or all at once using the FORGEPRO_APPS and FORGEPRO_MIDDLEWARE shortcuts:

# settings.py
from forge.default_settings import *
from forgepro.default_settings import *

INSTALLED_APPS = INSTALLED_APPS + FORGEPRO_APPS

MIDDLEWARE = MIDDLEWARE + FORGEPRO_MIDDLEWARE

Some apps also require URLs to be added:

# urls.py
urlpatterns = [
    # ...
    path("impersonate/", include("forgepro.impersonate.urls")),
]

Or template tags in your base template:

<!-- base.template.html -->
{% load sentry googleanalytics stafftoolbar %}
<!doctype html>
<html lang="en">
  <head>
      ...
      {% sentry_js %}
      {% googleanalytics_js %}
  </head>
  <body>
      {% stafftoolbar %}
      ...
  </body>
</html>

Apps like Sentry or Stripe will require API keys to work. Check the documentation for the app to see if it requires anything specific, though we strive to have good defaults for anything we can.

GitHub Actions

To enable access in GitHub Actions, set your project name and token as secrets on your repo. Then use the Poetry env variables to authenticate:

# .github/workflows/test.yml
    # (previous steps)
    - name: Install dependencies
      env:
        POETRY_HTTP_BASIC_FORGEPACKAGES_USERNAME: ${{ secrets.FORGEPACKAGES_PROJECT }}
        POETRY_HTTP_BASIC_FORGEPACKAGES_PASSWORD: ${{ secrets.FORGEPACKAGES_TOKEN }}
      run: poetry install

Heroku

For Heroku, use the same project name and token as the FORGEPACKAGES_AUTH environment variable:

heroku config:set FORGEPACKAGES_AUTH="<project_name>:<project_token>"