Version History and Release Notes
Releases of SaaS Pegasus: The Django SaaS Boilerplate are documented here.
Version 2025.10
Section titled “Version 2025.10”This release improves the developer experience of working with Pegasus. It has a number of changes that make things simpler, smoother, and more consistent. These changes also make it easier for AI agents to work in Pegasus codebases.
Key changes:
- All projects will default to Postgres, Vite, and Tailwind moving forwards. Other options will be slowly phased out.
- All projects will ship with Docker containers for Postgres and Redis (you can ignore these if you want to run them separately)
- The
Makefilenow ships with every project and includes commands for running everything you need in development. These commands are also available in AI rules files for AI agents. make initwill work on all projects, and is all you need to get running (after installing prerequisites)- Added some dev quality-of-life tools.
Details below.
Services-only Docker setup
Section titled “Services-only Docker setup”This release adds default “services-only” Docker setup for projects that weren’t using Docker already. In this mode, Postgres and Redis run via Docker, but Python and Node/npm run natively. This is now the recommended way to develop Pegasus applications. You can read more in the updated Docker docs.
Expanded make support
Section titled “Expanded make support”The Makefile will now be included on all Pegasus builds.
This can be used to run the app, tests, migrations, front end, and more without having to remember
the exact commands, and can be easily customized.
You can run make without any arguments to see the available options.
Added a dev.sh script to run Django and Vite/Webpack in a single command
Section titled “Added a dev.sh script to run Django and Vite/Webpack in a single command”For projects not already using Docker, a dev.sh script was added that runs both Django and Webpack/Vite
in a single command, handling process management for you.
Running make dev will use script, though you can also run it manually via ./scripts/dev.sh.
This allows you to easily stop and start these two coupled processes together without having to fiddle
with multiple terminals or tools like tmux.
Expanded README and Agents files
Section titled “Expanded README and Agents files”The project’s README and the various Agent files (cursor rules, CLAUDE.md, etc.) have been
overhauled and expanded to use the make commands.
This provides a simpler on-ramp both for developers and agents to run the app and the various
supporting commands.
Streamlined development tooling
Section titled “Streamlined development tooling”Two new packages were added to improve the developer experience:
- django-watchfiles improves the Django dev server’s autoreloading behavior in several ways, making it both faster and use less system resources. Learn more here.
- django-browser-reload adds automatic page reloading to your browser whenever code changes.
Both of these options are development features, and should have no impact on applications in production. Browser reload is enabled on all projects by default, while watchfiles is off by defualt because of this “file watch limit reached” issue on some filesystems. Both options can be enabled/disabled under advanced development settings.
Thanks to Adam Johnson for the great tools!
Deprecating configuration options
Section titled “Deprecating configuration options”The following options have been deprecated and will be dropped in a future release.
- Bulma and Bootstrap CSS Frameworks have been deprecated. Tailwind will be the primary CSS framework moving forwards.
- Webpack has been deprecated. Existing projects should migrate to Vite.
- SQLite has been deprecated. While it will likely still work, it will no longer be QA’d, and various pieces of infrastructure and documentation will assume development is done on Postgres. Postgres can be easily run locally using the Docker services option referenced above.
Removing these options will provide a more consistent set of best-practices, that work well for nearly every project and will improve the stability and velocity of Pegasus updates.
If you have any questions or concerns about migrating, don’t hesitate to get in touch.
Other changes
Section titled “Other changes”- Overhauled the “Gettting started” and “Docker” sections of the docs to reflect the latest changes.
- In addition to the major changes mentioned above, made some minor changes and corrections to the README and AI Rules files.
- Postgres and Redis docker containers now expose their service ports on the host container.
- The development Postgres Docker container is now pinned to version 17.
- Added a url route to test the
429(too many requests) error page. Thanks Brennon for suggesting! - Updated the default Anthropic LLM model to the newly-released Claude Sonnet 4.5.
Oct 10, 2025
Version 2025.9.2
Section titled “Version 2025.9.2”This release fixes some small bugs when deploying uv projects to Heroku with the Python buildpack:
- Don’t include
runtime.txtfor Heroku deployments that use uv - Include production dependencies in main
dependenciessection ofpyproject.tomlfor Heroku Python builds.
Thanks Norman for reporting these!
Sep 25, 2025
Version 2025.9.1
Section titled “Version 2025.9.1”This is a minor maintenance/bugfix release that upgrades packages, improves the employee agent demo, and addresses some minor bugfixes.
Details:
- Upgraded nearly every Python package to the latest version, except a few that had compatibility issues.
- Pinned dj-stripe to < 2.10, which is not yet supported.
- Pinned litellm to < 1.77.2 to prevent this installation issue
- Add better UI status indicator if chat websocket connection fails or is interrupted.
- Add
created_at/updated_atfields to the Employee agent tools. - The
delete_employeeagent tool now takes an ID instead of anEmployeeData. - Fixed issues in the agent tools that delete and update employees to better handle retries and error conditions (for example, when trying to operate on an employee that doesn’t exist).
- Don’t include
websocket_urltemplatetag if building without async support. - Fixed broken documentation links in the app that were using the old docs url formats. (Thanks Sam for reporting!)
- Fixed a bug in
fly.tomlthat had extra newlines in the worker and beat commands. (Thanks Sam for reporting!) - The
fly.tomlfile now includes avmsection for celerybeat if enabled. (Thanks Sam for reporting!) - Fixed a bug in
fly.tomlthat included a worker process even if celery was disabled.
Sep 23, 2025
Version 2025.9
Section titled “Version 2025.9”Agents support
Section titled “Agents support”The big update in this release is a set of example workflows you can use as a foundation for building agentic chatbots, built with Pydantic AI. These include:
- Injecting the logged-in user’s information into the chatbot context.
- A tool use example that demonstrates a chatbot accessing live weather information for anywhere in the world.
- An agentic editing example, that allows you to use natural language to create, update, list, and delete data in the employee application.
- An MCP-based agent that allows superusers to ask questions about the applicaton database.
You can learn more about these features and how they work in the following video, as well as the LLM documentation:
Changes related to agent support
Section titled “Changes related to agent support”- Added Pydantic AI agent applications:
- Weather and location lookup agent, with tools to do geo-lookups and access current weather information. You can demo this here
- Chatbot to interact with employee application data models, with tools to work with employee data. This has been added as a new example, if AI chat is enabled. You can demo this here
- Chatbot to interact with system database, with MCP tool to access postgres data. This has been added to the project dashboard page and is only available for superusers.
- Tool to send emails.
- Pydantic AI is now a dependency if you enable AI chat.
- Added a
chat_typefield toChatmodels to differentiate between normal and agent chats. - Added an
agent_typefield toChatmodels to differentiate between different agents. - Resuming chats will use the appropriate chat/agent type.
- Refactored how chat sessions are managed to a set of
ChatSessionhelper classes that help decouple chat session behavior from the websocket / consumer class. - Refactored
ChatConsumerwebsocket handler to a base class, and extended the base class to support different chat types (normal and agent)- Added new consumer classes for various agent types for the built-in examples.
Other changes
Section titled “Other changes”- Removed the “OpenAI” chat configuration option. All AI chat functionality now uses the
litellmmodule, which supports OpenAI, as well as Anthropic, Google, and other models. - Changed
AI_CHAT_DEFAULT_LLM_MODELenvironment variable toDEFAULT_LLM_MODEL - Updated the default LLM model to be
gpt-5-nano. - Added translations markup to a few places in the chat app.
- Added a default log config for the “pegasus” namespace.
- Updated the ai chat app logger to use “pegasus.ai” namespace.
- Added a
ChatMessageInlineadmin class so that chat messages show up in their associatedChatadmin pages. - Updated the Postgres MCP server (dev tool) to use mcp-alchemy, since the original Postgres MCP server is now deprecated.
- Removed the
UserSignupStatsSerializerand the unusedUserSignupStatsViewAPI view. - Added a
websocket_urltemplatetag that can be used in Django templates to reverse websocket URLs similar to how the built-in{% url %}tag works. - Extracted employee table component to a template so it can be used in multiple places.
- Simplified Stripe product serialization when used in subscription metadata.
- Upgraded Django to the latest version (5.2.6).
September 10, 2025
Version 2025.8.1
Section titled “Version 2025.8.1”This release is focused on improving the AI chat experience, with an eye towards laying the groundwork for some future use cases that are in the works. The main new feature related to this work is an integrated AI chat widget that can be easily embedded on any page of your app.
Screenshots:

Complete details are below.
- Added a way to add an AI chat to any page in your app.
See the new documentation for using this feature or
try it on saaspegasus.com (requires login).
This change also included some refactors and changes that allow re-using parts of the AI code:
- JavaScript websocket events are now initialized in an external JavaScript file (
assets/javascript/chat/ws_initialize.ts) - Message thread component was moved to a separate template to be re-usable by the main chat page and component.
- JavaScript websocket events are now initialized in an external JavaScript file (
Changed
Section titled “Changed”- The htmx websocket extension is now installed locally instead of loaded from unpkg.com.
- The default system prompt is now overridden in AI chats, enabling you to easily change it in a single place.
- Chat names are now set synchronously if the initial message is short.
- Updated websocket URL names from
"ws_openai_..."to"ws_ai_..."since there is no requirement to use OpenAI. - Improved the default chat UI styles on Tailwind builds to be more comatible with DaisyUI themes.
- Updated the default claude model used to
claude-sonnet-4-20250514 - Added default
AI_CHAT_ANTHROPIC_API_KEYto example.envfiles. - Made minor formatting changes to
user_dashboard.html. - The user-facing error message when creating an account with an existing email no longer reveals that the account is already signed up (this improves privacy/security). Thanks Brennon for the contribution!
- Update: Updated
.pre-commit-config.yamlto run the latest version ofruffand explicitly use theruff-checkhook.- Also pinned
ruffdependency to the same minimum version.
- Also pinned
- Updated the Digital Ocean deployment to use a managed database instead of a development database.
Development databases are no longer well-supported in app platform.
- Also updated the Digital Ocean deployment docs to reflect the latest changes.
- Thanks Jan for the suggestion!
- For the production
REDIS_URL, only addssl_cert_reqs=nonefor Heroku builds, and set it to required on Digital Ocean, which has valid certificates. Thanks Jan for the suggestion! - Fixed an issue with the honeypot field that caused a large horizontal scroll on the signup page on some CSS Frameworks.
- Also improved spacing on the signup forms.
- Thanks Finbar for the contribution!
- Use Wagtail’s built-in page titles and meta descriptions is the SEO fields for blog posts, if they have been set. Thanks Richard for the suggestion!
- Moved
@tailwindcss/typographyfromdevDependenciestodependenciesinpackage.json
Deprecated
Section titled “Deprecated”- Using
pip-toolsas a package manager is deprecated and new projects will automatically default to usinguv. Existing projects usingpip-toolsare encouraged to migrate touv, and support forpip-toolswill be dropped in an upcoming release. If this is a problem for you, get in touch!
Aug 26, 2025
Version 2025.8
Section titled “Version 2025.8”This is a maintenance release which improves Docker-based development, upgrades dependencies and addresses a number of minor issues reported by the community.
Thanks to everyone who contributed ideas and code to this release!
Changed
Section titled “Changed”- Changed how CSS files are built and imported in vite builds. This fixes the flash of unstyled content when running Vite in development.
- Removed the redundant
site-<framework>.jsfiles and instead added the imported CSS files directly as entry points tovite.config.ts. - Updated
base.htmlto usevite_asset_urlinstead ofvite_assetfor CSS files.
- Removed the redundant
- Updated development Docker setup to always use a separate container for Node / NPM.
This removes all node/npm logic from
Dockerfile.devand uses eitherDockerfile.viteorDockerfile.webpackfor the front end.- Also updated the
Makefileto reference this new container where necessary.
- Also updated the
- Upgraded all Python packages to their latest versions.
- Upgraded all JavaScript packages to their latest versions.
- Changed
sentry-sdktosentry-sdk[django]and pinned the version. Thanks Ralph for suggesting! - Changed how email confirmation works when updating an email address to be more aligned with allauth best practices, and stop using a method that was removed in the latest allauth.
- Changed the typescript module resolution strategy to “bundler”, which aligns better with how Vite resolves modules in the project.
- Added
.claude/settings.local.jsonto.gitignore. - Updated the behavior of the subscription page for team non-admins so that it shows a useful message telling them they aren’t allowed to manage subscriptions for their team, instead of returning a generic 404. Thanks Haydn for the suggestion!
./manage.py bootstrap_subscriptionswill now use Stripe’s “marketing features” property of Products to generate the relevant configuration in Pegasus. Thanks Zac for suggesting!./manage.py bootstrap_subscriptionswill now only use products that have recurring pricing set when generating the Pegasus configuration.- The
build-api-clientmake target will now delete unused files and set correct file permissions on the generated code. Thanks Finbar for the contribution!
- Improved the Python environment setup in
Dockerfile.devto be much more performant. This should make Docker container rebuilds after adding/changing Python dependencies much faster.- Python environments and packages are now created and installed as the django user to avoid expensive chown calls. Thanks Jacob and Mark for the suggestion!
- Uv now uses Docker’s cache system consistently so that dependencies are cached by Docker across builds.
- Added a
require_POSTdecorator tocreate_api_keyview so it doesn’t work with GET requests. Thanks Brennon for reporting! - Fixed a bug where subscriptions tests failed due to a missing
dateutildependency under certain build configurations. Thanks Jacob for reporting! - Fixed styling of allauth’s “email change” template, which is used if you set
ACCOUNT_CHANGE_EMAIL = True. Thanks Finbar for the report and fix! - Fixed a bug where
./manage.py bootstrap_subscriptionsand./manage.py bootstrap_ecommercesometimes had to be run twice to sync all products and prices to a new installation. Thanks Zac for reporting! - Updated stripe API imports to remove warnings about deprecated
stripe.api_resourcespackages. Thanks Cristian for reporting!
August 1, 2025
Version 2025.6.2
Section titled “Version 2025.6.2”This hotfix release addresses two minor issues in the 2025.6 release:
- Remove breaking reference to
.babelrcinDockerfile.webon Vite builds. This was causing deployments to fail on some Docker-based platforms. - Always add
geventdependency to production requirements if using celery. This fixes an issue running celery in production on certain deployment platforms.
Thanks Justin and Eugene for the bug reports!
June 25, 2025
Version 2025.6.1
Section titled “Version 2025.6.1”This is a hotfix release which addresses two minor issues:
- Fix
make npm-installandmake npm-uninstallcommands when using vite as a bundler. Thanks Matt for reporting! - Fix broken dark mode behavior on Tailwind when attempting to disable it. Thanks Wik for the report and fix!
June 23, 2025
Version 2025.6
Section titled “Version 2025.6”This release hardens the production Celery set up, expands AI-development tooling, improves production support for the standalone React front end, and extends the ecommerce application.
Read on for details!
Celery improvements
Section titled “Celery improvements”- Celery periodic tasks can now be configured via
settings.SCHEDULED_TASKSand synchronized with a new management command (./manage.py bootstrap_celery_tasks). The previous migration files that created celery periodic tasks have been removed. - The Celery gunicorn worker pool changed from the default of ‘prefork’ to ‘gevent’ in production, and the concurrency was increased. This should be a more scalable setup for most projects, though may need to be changed for projects that are heavily CPU-bound.
- Because of the above change, a separate worker for Celery Beat has been added to all production deploy environments (because beat can’t be run with the gevent pool).
- Updated the Celery documentation to reflect these changes.
AI-Coding improvements
Section titled “AI-Coding improvements”- Added an optional Claude Code Github workflow. When enabled, you can mention @claude on a Github pull request or issue to trigger a Claude Code update. Learn more in the docs here.
- Added optional support for JetBrains / PyCharm Junie AI rules files. Docs
- Edited and expanded the AI rules files based on various user feedback (thanks to many who have contributed to this).
Standalone front end improvements
Section titled “Standalone front end improvements”These updates affect the standalone React front end.
- Updated the front end CSS to build the files directly in the front end (and import relevant files from the Django app in
index.css), rather than including the built Django CSS files directly.- Some required Tailwind CSS files in the
assetsdirectory will be included if you use the standalone front end even if you build for a different framework.
- Some required Tailwind CSS files in the
- Added tailwindcss, the typography plugin, and daisyui as explicit dependencies (and plugins) to the front end to enable the above change.
- Upgraded all JavaScript dependencies in the front end.
- Removed unnecessary default styles from
index.css. - Updated front end to use aliases for the “assets” directory. Also updated
tsconfig.jsonto handle this. - Updated
vite.config.tsto fix various build issues if the parentnode_modulesisn’t available. - Fixed the default values of
FRONTEND_ADDRESSand related values insettings.pyand.envfiles to point to “http://localhost:5174” (instead of port 5173). - Added
CSRF_COOKIE_DOMAIN,CORS_ALLOWED_ORIGINS, andSESSION_COOKIE_DOMAINtosettings.pyusing environment variables. These must be customized when deploying the standalone front end. - Updated Kamal’s
deploy.ymlto include default values for the above settings. - Added initial documentation on deploying the standalone front end to production.
Other updates
Section titled “Other updates”- Added a digital download example to the ecommerce application.
You can now associate a file with ecommerce products and only people who have purchased the product will be able to access it.
- Also added tests for this workflow.
- Added a private storage backend, for storing private files on S3-compatible storage backends (used by the above).
- Upgraded most Python dependencies to their latest versions.
- Fix
target-versioninpyproject.tomlto match the currently recommended Python 3.12. Thanks Finbar for reporting! - Fixed a bug where group chat avatars were incorrectly styled on Tailwind builds.
Added a new
pg-avatarCSS class to handle this. - Made some updates Digital Ocean deployments:
- Switched Redis to Valkey, and upgraded it to version 8.
- Upgraded Postgres to version 17.
- Updated the Digital Ocean deployment docs to reflect the latest changes.
- Fixed email verification emails when
ACCOUNT_EMAIL_VERIFICATION_BY_CODE_ENABLED = True. Thanks Justin for reporting and helping with the fix! - Removed default font-weight styling from
email_template_base.html. - Api keys associated with inactive users will no longer pass API permission checks. Thanks Brennan for the suggestion!
- Removed unused
.babelrcfile if not building with Webpack. - Automatically confirm user emails when they create accounts through the invitation acceptance workflow, since they can only get the invitation URL from the email link.
Upgrading
Section titled “Upgrading”If your project has existing migration files that create celery tasks (e.g. /apps/subscriptions/migrations/0001_celery_tasks.py),
you should leave them in your repository to prevent issues running future migrations.
The tasks themselves are unaffected, since they live in the database.
June 10, 2025
Version 2025.5.1
Section titled “Version 2025.5.1”This is a minor bugfix release on top of 2025.5.
- Removed bad reference to Modals in
site.js. Thanks Jacob for reporting! - Fixed Python Celery setup in
build_celery.shwhen usinguv(Render deployments only). Thanks Jacob for reporting! - Fixed issue with the shadcn dashboard caused by a missing
{% vite_react_refresh %}tag. Thanks Shoaib for reporting!
May 16, 2025
Version 2025.5
Section titled “Version 2025.5”This release has a few big updates:
Use Vite instead of Webpack for building the front end
Section titled “Use Vite instead of Webpack for building the front end”This release adds the option to use Vite as a bundler instead of Webpack. Vite is a modern build tool that adds a few key benefits over the Webpack build system:
- It is much faster than Webpack.
- Hot Module Replacement (HMR)---a development feature that lets code changes in your front end files automatically update without a full-page reload.
- Code splitting---a production feature that breaks your front end files into individual bundles that encapsulate code dependencies. This leads to less redundant JavaScript and faster page loads.
You can watch the video below for a walkthrough of these benefits and how they work in the new setup.
You can also see the overhauled front end documentation and Vite-specific guidance for more details.
Gitlab CI support
Section titled “Gitlab CI support”You can now run CI on Gitlab in addition to Github. Gitlab’s CI will run your tests, linting, and build / type-check your front end files.
Thanks to Paolo and Simon for contributing to this feature!
Retiring the Bootstrap Material Theme
Section titled “Retiring the Bootstrap Material Theme”The material theme for Bootstrap has been deprecated. This means that the theme will be in maintenance-only mode, and support will eventually be dropped (probably in 6-12 months). Existing projects can continue using the theme, but new projects should not, and new Pegasus features will eventually not be developed and tested on the theme.
Dropping support for this theme was a difficult decision. The main reason it was made is that several Pegasus customers have complained about the lack of documentation and support for this theme from its maintainer, Creative Tim. Additionally, their process around updating the theme has involved releasing large, poorly-documented updates which have been difficult to incorporate back into Pegasus.
If you would like help migrating off this theme, you can reach out via standard support channels.
Complete changelog
Section titled “Complete changelog”Changes related to Vite support
- Added Vite as an option for your front end build system. See the front end and vite-specific docs for details.
window.SiteJSis now populated explicitly in JavaScript files (in addition to webpack’s library support, which does not work with Vite builds).- Affected files include:
app.js(window.SiteJS.app),pegasus.js(window.SiteJS.pegasus) - Imports in those files were also renamed to avoid namespace confilcts.
- Affected files include:
- Updated all JavaScript files using JSX to have a
.jsxextension. - Removed legacy Vue2 code and imports from the Vue example.
- Removed unused imports shadcn components.
- Removed leading tilde (”~” character) from CSS imports in various places.
- Changed CSS imports in JavaScript files from
requiretoimport. - Fixed a few small React warnings/issues in the AI chat app.
- Removed no longer needed
vue-template-compilerdependency. - Updated the standalone front end to run on port 5174 to not conflict with the default vite port.
Other Changes
- Added “Gitlab” as an option for CI. (Thanks Paolo and Simon!)
- Deprecated the Material Bootstrap theme.
- Upgraded all Python packages to the latest versions, including Django 5.2.
- Upgraded all npm packages to the latest versions.
- Updated all
blocktranslatetags to use thetrimmedoption for easier translation. - Added explicit width and height to some svgs to slightly improve styling when CSS is not present.
- Made minor updates to AI rules files.
- Use the new
ACCOUNT_SIGNUP_FIELDSsetting to configure sign up fields and removed usages of deprecated allauth fields. - Removed
project_settingsfrom theproject_metacontext processor. This was previously only used to pass the now-deprecatedACCOUNT_SIGNUP_PASSWORD_ENTER_TWICEsetting to sign up templates. The sign up templates now render the second password field based on the form value.
Upgrading
Section titled “Upgrading”For help switching from Webpack to Vite, see the Webpack to Vite migration guide.
May 15, 2025
Version 2025.4.4
Section titled “Version 2025.4.4”This is another minor release:
- Stop dynamically setting user/group ID in the
Makefileand just default to1000. The dynamic ID assignment was continuing to cause issues on certain MacOS environments. - Add
make build-api-clienttarget even when not using Docker. - Added additional guidance on Pegasus’s Django model conventions to the Python AI rules.
May 5, 2025
Version 2025.4.3
Section titled “Version 2025.4.3”This is another bugfix release:
- Make the user/group creation more resilient in development Docker containers, which fixes a permissions issue on MacOS in certain environments. Thanks Chris for reporting!
- Add
architecture.mdto cursor rules directory.
May 1, 2025
Version 2025.4.2
Section titled “Version 2025.4.2”This is a bugfix release that addresses a few problems in the most recent build:
- Moved the new
CustomHeadlessAdaptertousers/adapters.pyto fix an issue with it not being available if you built without teams enabled. Thanks Alex for reporting! - Remove source maps for JavaScript bundles in production. This results in substantially smaller production bundle sizes. Thanks Jan for reporting!
- Automatically do a best effort to set the user/group ID used by the development docker container in the
Makefile. Thanks Jacob for suggesting!
For the source map fix, you can change the “devtool” setting in webpack.config.js to this:
devtool: process.env.NODE_ENV === 'production' ? false : "eval-cheap-source-map",Apr 29, 2025
Version 2025.4.1
Section titled “Version 2025.4.1”This is a big release with a few major updates.
Team invitation workflow changes
Section titled “Team invitation workflow changes”The workflow around new users joining teams and accepting invitations has been streamlined based on user feedback. For a summary of the changes you can watch this walkthrough or read below.
Key user-facing changes:
- When a user signs up with a pending invitation they will be redirected to view it before creating their first team.
- Accepting an invitation requires having a verified email address for the email it was sent to.
- Users can view pending invitations for any of their email addresses from the team selector dropdown.
- Inviting an email address of someone who’s already in a team will show an error message that they are already part of the team.
In addition, the following fixes and code updates were made:
- Added an API and serializer for accessing the logged-in user’s invitations, used by the React view.
- React: renamed
getInviteUrlhelper JS function togetResendInviteUrl.
Thanks to EJ, Geoff, Valics, Simon, Arno, and possibly others who contributed ideas and feedback on the design of these changes.
API authentication and Standalone front end updates
Section titled “API authentication and Standalone front end updates”The Standalone React Front end underwent a major overhaul. Importantly, it now uses
allauth headless instead of a custom dj-rest-auth and custom
authentication APIs.
On top of this, support for many new authentication workflows was added to the standalone front end, including email confirmation, password reset, and social authentication. The standalone front end---which is still in experimental mode---is now close-to-parity with the Django authentication system.
Details:
- Enabled and configured allauth headless (if authentication APIs are enabled or using the standalone front end).
- Removed
dj-rest-authanddjangorestframework-simplejwtand associated setup code. Auth now uses allauth headless and sessions by default. - Removed the
apps/authenticationapp and associated api client code. - Updated the standalone front end to use an authentication system against allauth headless and added
support for email confirmation, social authentication and password reset.
These changes borrow heavily from the allauth example project,
and involve a large number of code-level changes which are not fully outlined here, though some of the larger ones are listed below:
- Added a
CustomHeadlessAdapterclass to add the user’s profile picture to the API. - Removed translation markup from JavaScript code that is shared with the standalone front end. Translations are not supported, currently.
- Upgraded eslint-related libraries.
- Updated
.eslintrc.cjstoeslint.config.mjsand tweaked the configuration settings. - Show more/better validation errors on login, signup, etc.
- Changed
ProtectedRoutetoAuthenticatedRoute. - Added templates and components for various new authentication workflows (email confirmation, password reset, etc.).
- Added an
ACCOUNT_USER_DISPLAYsetting.
- Added a
- Updated the standalone front end docs to reflect the latest setup.
Djstripe upgrade and webhook updates
Section titled “Djstripe upgrade and webhook updates”This release upgrades dj-stripe to version 2.9 and migrates to dj-stripe’s database-backed webhooks.
This lets you set up multiple webhook endpoints/secrets, if desired.
See the upgrade section below for details on updating.
Details:
- Upgraded dj-stripe to version 2.9
- Webhook endpoints now need to be configured in the database instead of having a single global endpoint. See the updated subscription webhooks documentation for more details.
- Updated webhook handling for subscriptions and ecommerce purchases to be compatible with the above model.
- Added a
bootstrap_dev_webhooksmanagement command to help set updjstripewebhooks for development. - Added
apps.utilstosettings.INSTALLED_APPSso that management commands inside it are picked up. - Removed the no-longer used
DJSTRIPE_WEBHOOK_SECRETsetting and environment variable. - Upgraded
stripeto version11.6(there is a bug with djstripe and the latest12.0release) - Updated the subscription docs to reflect the latest changes for setting up webhooks in dev and production.
Ruff linting updates
Section titled “Ruff linting updates”The ruff linting rules were expanded and code has been modified to pass the revised ruleset. This leads to cleaner, more consistent code across the project and should make future Pegasus merges/upgrades smoother.
Details:
- Updated the default ruff rules to enable all of the E (error) Rules, as well as the UP (pyupgrade) Rules, B (flake8-bugbear) Rules, and SIM (flake8-simplify) rules, in addition to the already-enabled F (Pyflakes) Rules, and I (isort) Rules.
- These lead to some minor code changes, including:
- Use
contextlib.suppressin a few places instead of the previous exception handling - Use
raise ... fromin several places for more explicit exception handling. - Combined some nested if statements into single lines.
- Use
super()instead ofsuper(C, self) - Use f-strings instead of percent style format strings when possible.
- Use
Type | OtherTypeinstead ofUnion[Type, OtherType]in type hints - Use core types for
list,dictetc. instead of the type classes. - Define classes without the object base class.
- Increased strictness around line lengths.
- Use
- Changed rule definition from
extend-selecttoselectbased on ruff’s recommendations.
Other updates
Section titled “Other updates”- Change: Upgraded npm to the latest version (11.3) in Docker containers and docs.
- Change: Added a honeypot field to the sign up form to help reduce bot/spam sign ups. (Thanks Chris and Stian for suggesting!)
- Change: Added an ”@” alias for the
assets/javascriptfolder and started using it in imports. - Change: Updated development Docker setup to run as the logged-in user (under a
djangouser account) instead of root. This should help with file ownership permissions being assigned to root after running the project with Docker. Thanks Finbar and Jacob for the suggestion and help with this! - Change: Removed the “app-card” styling from the loading widget to make it more versatile.
- Change: Tweaked whitespace in a few templates to be more consistent across the project.
- Change: Use
blocktranslate trimmedinstead ofblocktranslatein some Django templates. - Change: Updated the output of
bootstrap_subscriptionsto communicate that only subscription products should be added toACTIVE_PRODUCTS. - Fix: Changed reference of
stripe.Invoice.upcomingtostripe.Invoice.create_previewsince Stripe deprecated the upcoming invoice API.- This fixes an issue with loading the “manage subscription” page when using the latest Stripe API version.
- Fix: Added
DEBUG=falsetoheroku.ymlsetup section, which helps enforce that debug is disabled when runningcollectstatic. This helps avoid “No module named ‘daphne’” errors in async deployments. Thanks Abhishek for reporting! - Fix: The
dark_mode_selector.htmlcomponent is no longer included if you have disabled dark mode. - Fix: Improved chat height styling on mobile screens to avoid extra scrolling.
- Fix: Updated the migration that creates the default Site object to also update the table sequence ID. Thanks Julian and Geoff for the suggestion and help with this!
- Fix: Fixed a test case in
test_member_managementthat wasn’t getting properly exercised. - Fix: Deleted the unused
_create_api_keys_if_necessaryfunction inbootstrap_subscriptions.py - Fix: Fixed the hover text color of the
.pg-button-dangerCSS class styles on tailwind builds.
Upgrading
Section titled “Upgrading”There are several changes in this release that may require additional steps during the upgrade process. To help with this, I recorded a video walkthrough of myself upgrading one of my own projects, which you can watch below:
Authentication APIs
Section titled “Authentication APIs”If you were using Pegasus’s standalone React front end then your setup should work out of the box after upgrading.
If you were using the dj-rest-auth app and previous authentication APIs in a different way, then you will need to either:
- Update the client code to work with allauth headless. This can be done by referring to the example front end and allauth documentation.
- Restore the previous implementation of the authentication APIs.
This can be achieved by rejecting the proposed changes to remove the
apps.authenticationapp and library dependencies/setup during the upgrade process.
Djstripe and Webhooks
Section titled “Djstripe and Webhooks”There are a few issues you might run into with the dj-stripe upgrade.
Database Migrations
If you get an InconsistentMigrationHistory running manage.py migrate on your database, look for any diffs
in your existing migration files that change the djstripe dependency from 0012_2_8 to 0014_2_9a, and then
revert these changes back to 0012_2_8.
Webhooks
The most recent dj-stripe has disabled the global webhook support in favor of database-backed webhooks. These are more versatile, secure, and easier to set up, but require a migration from the previous set up.
To migrate your webhooks, follow the instructions to set up a new webhook endpoint from the subscriptions docs and then delete your previous webhook endpoint. There is a complete walkthrough of this process in the video above. If you fail to do this your webhooks will stop working in production.
Formatting and linting
Section titled “Formatting and linting”All Pegasus code should be updated to pass the new ruff linting configuration, but the configuration changes might cause build failures on code that has been added/modified. Many fixes can be automated by running:
(uv run) ruff check --fix --unsafe-fixesOn the upgraded codebase and reviewing the changes made.
However, some errors will likely require manual fixing, which can be done by reading the output and making the suggested change
(or even giving the task to an LLM).
You can see how I did this process with Claude code in the above video.
Alternatively, you can modify the [tool.ruff.lint] section of pyproject.toml to remove any categories
of fixes you don’t want to turn on for your project.
April 24, 2025
Version 2025.4
Section titled “Version 2025.4”The main feature of this release is improved support for AI tools and coding assistants. This release adds a suite of rules files that can be used with Cursor, Claude Code, or other AI-enabled IDEs. It also adds an MCP configuration for interfacing with your development database and controlling a web browser. These options are configurable via new project settings.
Watch a demo below, or check out the new AI tool docs.
- Optional rules files and MCP configuration for Cursor or Claude.
- These files will continue to be modified and iterated on as more developers use them and provide feedback.settings
Changed
Section titled “Changed”- Improved default file input styles.
- Add front end install / build to
make init. (Thanks Jacob for reporting!) - Bumped
viteused by the standalone front end to the latest version. - Upgraded several Python packages to their latest versions.
- Removed unused
postcss.config.jsfile from the front end. (Thanks Jacob for reporting!)
- Fixed a potential XSS vulnerability issue with
markdown_tagsnot properly escaping vulnerable tags. This issue existed if you were using the AI chat UI, or built other functionality on top of that library. All markdown is now sanitized withnh3. (Thanks Mitja for reporting!)- Also added tests for this functionality.
Translation Creator updates
Section titled “Translation Creator updates”A number of new features were added to Translation Creator this month. Big thanks to community member Valics who contributed the first draft of most of these updates.
- Upgraded to the latest Pegasus, including Tailwind 4 and DaisyUI 5.
- Translations will now retain comments.
- Added pagination, sort, and filtering to the translations view.
- Added the ability to delete projects and clear translations.
- Updated the DB constraint to use a hash of the input text instead of the text itself, which improves performance and fixes a bug with long translations.
- Added / updated test cases.
April 4, 2025
Version 2025.3
Section titled “Version 2025.3”This release upgrades TailwindCSS to version 4 (and DaisyUI to Version 5). It also has several minor updates and fixes.
Tailwind 4 Update
Section titled “Tailwind 4 Update”Pegasus now runs on Tailwind V4! This comes with a huge number of improvements, including much faster build times, simplified tooling, automatic content detection, and more.
Tailwind and DaisyUI were upgraded using the associated guides (Tailwind, DaisyUI). There is also an upgrade guide for Pegasus apps.
Here’s a detailed breakdown of the changes:
- Upgraded to Tailwind 4 and DaisyUI 5.
- Changed how tailwind is imported and customized in
site-tailwind.cssto match the V4 guidance. - Removed
contentsection oftailwind.config.js. Tailwind 4 automatically finds all content for the project. - Updated
postcss.config.jsto match the Tailwind 4 recommendation (using@tailwindcss/postcss). - Converted tailwind-specific CSS to V4 syntax, using
npx @tailwindcss/upgrade. These changes were automated.- Removed
@layerdeclarations - Converted some helper classes to use
@utility - Changed some double quotes to single quotes and cleaned up whitespace in css files.
- Updated various classes in templates/JavaScript files according to the migration guide,
e.g.
outline-none—>outline-hidden,flex-grow—>grow,max-w-screen-xl—>max-w-(--breakpoint-xl)etc.
- Removed
- DaisyUI updates:
- DaisyUI is now initialized as a plugin in
site-tailwind.cssinstead oftailwind.config.js. - Themes are also now handled in this section. The docs have been updated to reflect this.
- Updated Pegasus CSS color variables to use the DaisyUI 5 versions.
- Cleaned up Tailwind form rendering tags, removed unnecessary markup, and upgraded markup to be compatible DaisyUI 5,
e.g. removing
-borderedclasses. - Checkboxes will now appear on the left instead of the right of labels.
- Updated active tabs to use the latest DaisyUI markup (
menu-activeinstead ofactive).
- DaisyUI is now initialized as a plugin in
- Shadcn updates:
- Moved shadcn components from
assets/javascript/components/uitoassets/javascript/shadcn/components/ui. - New shadcn components can now be added via the CLI and will end up in the right place with no additional steps.
- Updated
tsconfig.jsonandwebpack.config.jsto be consistent with new shadcn setup. - Regenerated shadcn components from the latest version of the library.
- Changed shadcn themeing to use
@themedeclaration. - Removed all shadcn customizations from
tailwind.config.jsas they are superceded by the theme system. - Upgraded various shadcn dependencies to their latest versions.
- Moved shadcn components from
- Flowbite updates:
- Upgraded Flowbite to version 3.1.
- Flowbite is now initialized as a plugin in
site-tailwind.css. - Explicitly import flowbite styles when building with flowbite enabled. This fixes out-of-the-box styling of some plugins. (Thanks Eeshan for reporting and fixing!)
- Extracted dark mode selector to its own component and upgraded it to work with DaisyUI 5.
- Other fixes / changes
- Cleaned up various bits of CSS to use nested selectors.
- Improved the contrast of the
pg-text-mutedclass on dark mode. - Cleaned up commented out code in CSS files.
- Removed unused “app” CSS class styles.
- Standalone front end updates:
- Removed tailwind entirely from the standalone front end CSS. The standalone front end currently gets its css from the same built file as the Django app.
- Updated the Tailwind Documentation to reflect the V4 changes.
Other Updates
Section titled “Other Updates”- Fixed an issue running
./manage.pycommands in production docker containers when usinguv. Thanks Richard, Bryan, and Ken for reporting! - Fixed active tab highlighting on Flowbite demo.
- Removed
--no-emit-package setuptoolsfrom themake pip-compilecommand. Some configurations require setuptools and this was causing issues on some pip-tools builds. Thanks Jim for reporting and fixing! - Changed ruff
excludetoextend-excludeinpyproject.tomlto keep ruff’s defaults. Thanks Justin for the suggestion! - Added help text to a few
maketargets that were missing it. Thanks Steve for the suggestion! - Removed unused
pg-is-loadingCSS class. - Fix syntax of commented out
EMAIL_BACKENDvariable indeploy.yml. - Removed language codes from the language selector dropdown.
Upgrading
Section titled “Upgrading”See the Tailwind upgrade guide for details on upgrading existing Tailwind projects.
Mar 26, 2025
Version 2025.2.2
Section titled “Version 2025.2.2”This is a hotfix release that fixes a bug in the styling of the avatar in the navbar on Bootstrap using certain browsers. Thanks Luc for reporting!
- Restored
navbar.csson bootstrap builds and moved it out of the bulma-specific folder. - Updated imports in
base.cssaccordingly.
Mar 13 2025
Version 2025.2.1
Section titled “Version 2025.2.1”This is a hotfix release that fixes a missing newline between REDIS_URL and GOOGLE_ANALYTICS_ID
in .env / secrets files. Thanks Peter for the bug report!
Mar 7 2025
Version 2025.2
Section titled “Version 2025.2”This is a maintenance release with a number of upgrades and fixes.
- You can now configure the Github integration to push your Pegasus code to a subdirectory of the repository. More details in the updated Github docs here. Thanks to Simon for helping with this, and Aaron, Bernard, Danil, and Arno for suggesting it!
- Added a
429.htmlerror template.
Changed
Section titled “Changed”- Migrated the majority of shared style files from sass to css, and removed sass from Tailwind builds.
This makes the setup more consistent with a typical Tailwind project.
- Removed “sass” and “sass-loader” packages from Tailwind builds.
- Updated
webpack.config.json bootstrap and bulma builds to also now handle.cssfiles. - Related, ported the
navbar.sassfile to css, moved it to thebulmafolder, and removed it from non-Bulma builds.
- Set Django’s cache framework to use Redis in production by default.
- The Redis cache will be enabled when
settings.DEBUGisFalse. - Also explicitly list
redisas a first-class requirement, which fixes a bug where tests could fail if you disabled celery.
- The Redis cache will be enabled when
- Added
.venvandvenvto the.gitignorefile. (Thanks Peter for suggesting!) - Use the project id in the default
AWS_STORAGE_BUCKET_NAMEin deploy.yml. (Kamal deployments, thanks Peter for suggesting!) - Updated the version of
ruffused by pre-commit to the one that’s installed in the project, and upgraded ruff to the latest (0.9.7). (Thanks Peter for reporting!) - Added a timeout and error handling to turnstile requests, to prevent hanging if Cloudflare was for some reason down. (Thanks Peter for suggesting!)
- Removed
ENABLE_DEBUG_TOOLBAR=Truefrom production environment/secrets files. - Consistently use double quotes instead of single quotes in environment and deployment files. (Thanks Peter for suggesting!)
- Removed duplicate and unused variable declarations across Kamal’s
deploy.ymlandsecretsfiles. Public variables are now listed indeploy.ymland private ones are listed insecrets. (Thanks Peter for suggesting!)
- Improved edge-case handling the Stripe checkout integration.
- Users should now see helpful error messages instead of getting 500 errors or ending up in an invalid state if they hit certain invalid URLs.
- This also fixes a vulnerability where an attacker could potentially simulate e-commerce purchases through manual inspection and manipulation of requests.
- Fixed a bug where
setuptoolswas accidentally not present in production requirements files when using pip-tools. This caused production deployments to fail in certain cases. (Thanks Eeshan and Jim for reporting!) - Fixed an issue deploying to Heroku with Docker when using uv by removing Docker caching, which Heroku does not support. (thanks Toul for reporting!)
- Fixed the active tab highlighting styles in the examples navigation on Bulma builds.
- Removed unnecessary
<div>elements fromtop_nav.htmlon Bootstrap builds. - Don’t include Docker translation instructions in README if not using Docker. (Thanks Peter for reporting!)
- Updated the Pegasus CLI to version 0.8, which fixes a bad html closing tag in the generated templates. (Thanks Julian for the bugfix!)
- Removed celery sections from
deploy.ymlin kamal builds if celery isn’t enabled.
Removed
Section titled “Removed”- Removed
django_otpdependency and configuration, which was only there to facilitate the transition toallauth.mfa. See the release notes for Version 2024.5 for more information on this change.- Also removed the associated
migrate_allauth_2famanagement command.
- Also removed the associated
- Removed the default user-facing messages on login/logout. You can add them back or customize them by editing the files in
/templates/account/messages/.
Documentation
Section titled “Documentation”- Added a community guide on using Digital Ocean Spaces (alongside Amazon SES). Thanks Neil and Finbar for the contribution!
Upgrading
Section titled “Upgrading”Tailwind projects that have added their own .sass files will need to either restore sass support or port these files to .css (llms are good at this!).
You can “restore” sass support by rejecting the proposed changes in package.json and webpack.config.js during upgrade.
If you have removed Redis from your project you will need to update the default cache config in settings.py.
Feb 28, 2025
Version 2025.1.1
Section titled “Version 2025.1.1”This is a hotfix release that fixes an issue with installing Node 22 in the development Docker container. Thanks Oscar and Emiliano for reporting!
If you’d rather manually apply the patch, you can just apply the following patch to your Dockerfile.dev file:
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ --mount=target=/var/cache/apt,type=cache,sharing=locked \ rm -f /etc/apt/apt.conf.d/docker-clean && \ echo "deb https://deb.nodesource.com/node_22.x bookworm main" > /etc/apt/sources.list.d/nodesource.list && \ wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ apt-get update && \ apt-get install -yqq nodejs \Jan 28, 2025
Version 2025.1
Section titled “Version 2025.1”This release includes mostly backend infrastructure changes to some Pegasus features to pave the way for a (future) plugin ecosystem. This should make it easier to maintain Pegasus apps as well as possible (in the future) for other people to develop apps that can seamlessly integrate into Pegasus.
New “async” build flag
Section titled “New “async” build flag”Previously when you enabled async / websockets, you also got the group chat example application. Now you can enable async features without this additional example app, and turn it on separately with a new configuration option.
This lets you use async but not have to manually delete the example application.
Added a flag to remove Celery (if possible)
Section titled “Added a flag to remove Celery (if possible)”Added a configuration option that will remove celery and all dependencies + configuration if no other parts of your application need it. Celery will also be removed from production deployment configurations.
Celery is still required (and will be automatically enabled) if you are using any of:
- The Pegasus examples
- Subscriptions with per-unit billing enabled
- Any AI chat features
If you’re not using these features and want to disable Celery you can do that from your project settings page.
Organizational changes to apps for more consistency
Section titled “Organizational changes to apps for more consistency”The following changes don’t have any new features or functionality, but change small things about how the code is organized for affected apps (AI chat, AI images, and async group chat). It is hoped that these changes will make maintenance, upgrades, and future extensions to Pegasus easier.
Changes affecting the AI Chat, AI Images, and Group Chat apps:
- Moved app declarations for these apps to the end of
PROJECT_APPSinsettings.py - Moved url declarations for these apps to the end of
urls.py. - Moved settings and environment variables for these apps to be located together.
- Settings for these apps are now prefixed with
AI_CHAT_orAI_IMAGES_, respectively.- This also means that shared settings like
OPENAI_API_KEYare now declared multiple times and need to be updated in multiple places. See the “upgrading” section below on how to get around this duplication.
- This also means that shared settings like
- Moved chat JavaScript setup to the end of
module.exportsinwebpack.config.js. - Depending on your configuration, the order of navigation tabs in the UI may change.
- Made minor tweaks to how channels urls are set up.
- Image logos used by the AI chat and images apps were moved to
/static../../assets/images/ai_../../assets/images/and/static../../assets/images/ai_../../assets/images/, respectively. - The declaration for these apps has moved to a new “plugins” section of
pegasus-config.yml.
Other Changes
Section titled “Other Changes”Other changes included in this release are below.
Changed
- Upgraded default Python to Python 3.12.
- Bumped the Python version to 3.12 in CI, and dev/production Docker containers.
- Also added a
.python-versionfile for uv builds (set to 3.12)
- Upgraded default Node to 22.
- Bumped the Node version to 22 in CI, and dev/production Docker containers.
- Upgraded nearly all Python packages to their latest versions.
- Added a pin to
dj-stripe<2.9because 2.9 is not yet supported.
- Added a pin to
- Upgraded nearly all JavaScript packages to their latest versions.
- Tailwind v4 was not upgraded as it was just released and is not yet supported.
- Ruff and pre-commit will now sort imports by default. (See upgrade notes below)
- This also updates import sorting in a number of files.
- Pre-commit now runs ruff with
--fixenabled, which will automatically apply (but not stage) fixable errors. - Dependencies are now sorted in
pyproject.toml(uv builds) andrequirements.in(pip-tools builds) - Added email address to admin search for team memberships and invitations. Thanks EJ for the suggestion!
- Made the “timezone” field editable in the user admin. Thanks Peter for the suggestion!
- Changed active tab variable for ai image app from “ai_images” to “ai-images” to match convention of other apps.
- Added a link from the user profile to manage email addresses if the user has more than one email registered. (Thanks Simon for the suggestion!)
- Make it so that
./manage.pycommands default touv runif you build with uv enabled. - The
chat_tagstemplate tag library was moved to thewebapp and renamed tomarkdown_tags, making it easier to use outside the chat application.
Fixed
- Fixed an issue that caused Render deployments to fail when using uv. (Thanks Jacob for reporting and helping fix!)
- Add
psycopg2-binaryto production requirements if using sqlite, since it still required for production deployments. (Thanks Randall for reporting!) - Updated invitations to always store email addresses in lowercase to be consistent with account emails. Also fixed comparisons between invitations and sign up emails to be case-insensitive. (Thanks EJ for reporting and the fix!)
- Renamed
tailwind.config.jstotailwind.config.cjswhich prevents build failures on Node 22.
Removed
- Removed no-longer-used
payments.jsandstripe.sassfiles. - Stopped including
pip-toolsindev-requirementswhen usinguv, as it is no longer needed.
Upgrading
Section titled “Upgrading”Python / Node updates
You may need to manually modify your dev/production environment to upgrade to Python 3.12 and Node 22. If you’re using Docker, this should happen automatically by following the upgrade process.
Pegasus apps should still run on Python 3.11 / Node 20, but will no longer be extensively tested on those versions moving forwards.
Settings Changes
Some settings around AI API keys have been renamed and will need to be updated in your settings.py and .env files.
If you are using AI chat and AI images with OpenAI, the easiest way to use a shared API key is to add the following
to your .env / environment variables:
OPENAI_API_KEY="sk-***"And then modify your settings variables to read from that value:
# add an OPENAI_API_KEY setting, in case it was referenced elsewhere in your codeOPENAI_API_KEY = env("OPENAI_API_KEY", default="")# modify the image/chat settings to use the same openai key instead of reading from new environment variablesAI_IMAGES_OPENAI_API_KEY = OPENAI_API_KEYAI_CHAT_OPENAI_API_KEY = OPENAI_API_KEYImport Sorting Changes
If you have auto-formatting enabled you will likely get CI errors after upgrading due to the stricter import sorting.
You can fix these by running a manual ruff check locally and then committing the result:
ruff check --fix# or with uvuv run ruff check --fixJan 27, 2025
Version 2024.12.1
Section titled “Version 2024.12.1”This is a minor hotfix release for 2024.12
- Fixed a bug where the delete workflow was broken for apps created by the Pegasus CLI on non-Tailwind builds.
This happened becasue the “css_framework” cli option was accidentally missing from
pegasus-config.yml. Thanks Robert for reporting! - Updated the README instructions for setting up pre-commit hooks when using uv.
Jan 13, 2025
Version 2024.12
Section titled “Version 2024.12”content/ This release adds first-class support for using uv as a complete replacement for development and production workflows (see below), and has a handful of fixes/changes.
UV support!
Section titled “UV support!”This release adds full support for uv as a replacement package manager for your project. You can use uv by selecting the new “uv” as your “Python package manager” on your project settings page.
When you select uv the following changes will be made:
- All requirements.in / requirements.txt files are removed.
- Your project requirements will now be listed in your
pyproject.tomlfile.- Development and production dependencies will be listed under separate dependency-groups.
- Your pinned project requirements will be listed in a new
uv.lockfile. - Docker containers (in development and production) will use
uvto set up and manage the Python environment. - A
make uvtarget will be added to Docker builds to runuvcommands in your container.
The main benefits of using uv are:
- Speed. It is just way, way faster to anything related to package management.
- Easier to setup and install Python.
- Lock files (pinned versions) are consistent across any platform.
- More tooling.
- Speed. (It’s so fast we put it twice.)
There will be a longer write up about uv released very soon, but in the meantime you can review the updated python documentation and new uv documentation.
The rest of the docs have been updated to accommodate uv, though it’s possible there are some places that were missed. If you spot any issues in the docs, get in touch!
Other fixes
Section titled “Other fixes”- Upgraded the pegasus cli to fix an issue where the generated list views were not properly scoped to the appropriate team / user. If you used the CLI to generate any apps it’s highly recommended that you check that you are not exposing objects that should not be viewable.
Other updates
Section titled “Other updates”- Changed the default set up of social logins to use settings-based configuration instead of
SocialAppsin the database. See the upgrade notes if you are using social logins to prevent issues. Thanks Alex for the suggestion and for helping with the updated documentation! - Updated the default flowbite setup to disable the forms plugin. This was causing styling conflicts with the default DaisyUI styles on certain form elements, including checkboxes.
- Re-formatted the default form input template for readability.
Upgrading
Section titled “Upgrading”To migrate an existing project to uv see this guide.
If your application was already using social logins defined in the database, the new settings-based declaration will
conflict and cause errors on social login.
To fix this you can either delete the APPS section of the relevant service in settings.SOCIALACCOUNT_PROVIDERS,
or you can move the credentials into your project environment (e.g. .env) and delete relevant the SocialApp
from the Django admin.
November 29, 2024
Version 2024.11.3
Section titled “Version 2024.11.3”This is a minor maintenance release with a few changes in preparation for adding uv support (coming soon!).
Changed
Section titled “Changed”- Pinned the version of
uvused in CI and Dockerfiles. - Added
venvand.venvdirectories to the.dockerignorefile andmake translationstarget. - The
make requirementscommand now restarts containers in the background, making it easier to combine with other make targets. - Added a catch-all to the
Makefileto prevent error messages when runningmake npm-install <package_name>and similar commands. - Updated README commands to consistently use
python manage.pyinstead of just./manage.py. - Made some minor formatting changes to
pyproject.toml. - Fixed the link to the multi-stage dockerfile docs in
Dockerfile.web - Upgraded a number of Python packages.
- Updated the
default_stagesof the.pre-commit-config.yamlfile to the latest expected format (pre-commit).
Nov 21, 2024
Version 2024.11.2
Section titled “Version 2024.11.2”This release adds the ability to disable dark mode on Tailwind, upgrades front end libraries, bumps the API client version, and has a handful of other small changes and fixes.
- Added a new build option to disable dark mode for Tailwind builds. (Thanks Arno for suggesting!)
- Added basic user-facing error messages to the standalone front end sign up and login workflows.
Changed
Section titled “Changed”- Upgraded all JavaScript dependencies.
- Updated the API client to use the latest version 7.9.0, and updated the standalone front end to work with the latest changes.
- Updated template-partials installation to be manually loaded, to allow for easier integration with other templating systems like django-cotton.
- Moved active tab highlighting to the base view in the example object demo.
- Made a few very minor edits to comments and whitespace in a few places.
- Fixed a bug where your migrations and tests would fail if your project name was > 50 characters (thanks Bernard for reporting!).
- Fixed a bug in the group chat demo where submitting an empty room name would take you to a 404 page.
- The
docker_startup.shfile is no longer included if you are not using a docker-based deploy platform. - Updated the
config/READMEfile which had outdated information that predated the migration to Kamal 2. (Thanks Arno for reporting!) - Improved comments in the kamal
secretsfile and.envfiles. (Thanks Arno for suggesting!)
Removed
Section titled “Removed”- The
.envfile is no longer included in zip downloads. This file was already removed from Github builds so this just makes the two consistent. Projects should create.envfile from the.env.examplefile. - Removed the
migrate_customers_to_teamsmanagement command. This was added for an upgrade two years ago, and is assumed to be no longer needed.
Nov 14 2024
Version 2024.11.1
Section titled “Version 2024.11.1”This is a minor hotfix release.
- Fixed an issue where the team selector was accidentally transparent in Tailwind builds.
- Removed shadcn template that was accidentally included even if shadcn was disabled.
Updated
Section titled “Updated”- Removed extra whitespace from
form_tags.py. (Thanks Brennon for reporting!) - Updated
make helpto allow for commands defined incustom.mkwith digits to also show up. (Thanks Arno for suggesting!)
Nov 4 2024
Version 2024.11
Section titled “Version 2024.11”This is a feature release with an emphasis on improving the Tailwind CSS experience with Pegasus.
Watch the video below for a demo, or read on for the highlights.
Dark mode improvements
Section titled “Dark mode improvements”A dark mode selector was added to the navigation, allowing users to easily toggle between light, dark, and “system default” mode. The user’s selection is preserved server-side in the session object, which also helps to prevent flickering across page loads.
Better Theme Support
Section titled “Better Theme Support”It’s now easier than ever to change your project’s theme.
Each project now supports a default light and dark theme which will be used throughout the site.
The default themes need only be changed in tailwind.config.js, and settings.py and everything else is taken care of.
See the updated tailwind theme documentation for more details.
New shadcn integration and demo dashboard
Section titled “New shadcn integration and demo dashboard”A new build setting allows you to build your project with shadcn/ui installed. Shadcn is a great and versatile component library for React and Tailwind, but it is difficult to integrate it into a Django project without building a separate front end. Now Pegasus takes care of that integration for you, and provides a reference dashboard implementation of how to work with the library.
The reference dashboard is a hybrid single-page React app served by Django. It uses the same colors as the DaisyUI theme, and will update when you change your theme, and has many interactive components. However, it is not connected to any backend data—it is just a UI example.
Read more in the shadcn docs here.
New flowbite integration and demo component page
Section titled “New flowbite integration and demo component page”Another new build setting allows you to build your project with flowbite installed. Flowbite is another great component library for Tailwind and does not use React---making it a great fit for htmx projects. If you enable this setting, flowbite will automatically be installed and you can drop flowbite components into any Django template. The reference page has an example of a few of these components.
Read more in the flowbite docs here.
Other updates
Section titled “Other updates”- Upgraded all Python packages to their latest versions.
- uv is now used to install Python packages in Docker files and Github actions.
- Also updated
make pip-compiletarget to useuv. - This resulted in minor changes to all
requirements.txtfiles.
- Also updated
- Team invitation pages now prompt a user to log in instead of sign up if the email is associated with a known account. (Thanks Daniel for suggesting!)
- Your configured Github username, if available, will be used in a few places instead of a default value. (Thanks Richard for suggesting!)
- Added
bg-base-100to the<body>tag of the base template and removed it from other components where it was now redundant. This improves theming support when themes heavily modify the base color. (Tailwind builds only) - Added equals signs to
ENVdeclarations in production Docker files, for consistency. (Thanks Denis for suggesting!) - Slightly improved the styling of the e-commerce app.
- Overhauled the Tailwind CSS documentation.
Updates to the CLI (release notes)
- Fixed a bug on certain environments where the
pegasuscommand conflicted with a localpegasusfolder, causing import errors running the CLI. - Apps created with
startappnow use aPOSTfor deletion instead of aGET. - Deletion now includes a modal confirmation (Tailwind and Bulma builds only).
Upgrading
Section titled “Upgrading”If you’re using Docker the make upgrade command won’t work out-of-the-box due to the change
in how requirements files are managed. You will first have to rebuild your containers with:
make buildor
docker compose buildAfter that, you should be able to run make upgrade as normal.
Nov 1, 2024
Version 2024.10
Section titled “Version 2024.10”This release upgrades Kamal deployment to Kamal 2 and dramatically simplifies the Kamal deployment process.
Kamal 2 deployment and related changes
Section titled “Kamal 2 deployment and related changes”In the upgrade to Kamal 2, the following changes were made:
- Updated Kamal to run from the root project directory instead of the
deploysubdirectory.- Also moved the config file was also moved from
deploy/config/deploy.ymltoconfig/deploy.yml
- Also moved the config file was also moved from
- Moved environment secrets from
deploy/.envto.kamal/secretsto match Kamal 2’s recommendation. - Kamal can now be installed and run with Docker without any additional workarounds as described here The custom docker set up instructions have been removed.
- Kamal is now run as root by default, which dramatically simplifies the server setup process. There is now no need to run any manual steps to set up your server.
- Kamal now creates and manages its own docker network.
- Traefik has been dropped in favor of
kamal-proxyfor the proxy server, as per the new Kamal defaults. - The
.gitignoreand.dockerignorefiles were updated to reflect the new structure. - Added
apps.web.middleware.healthchecks.HealthCheckMiddlewareto workaround Kamal health checks and Django security features, as outlined here. - Removed unnecessary media directory set up from
Dockerfile.web. It is recommended to use an external storage service for media files and not the Docker container.
In addition, there were a few changes that affect projects that aren’t using Kamal:
apps.web.locale_middlewarewas moved toapps.web.middleware.localedocker_startup.shwas moved from thedeployfolder to the project root.
The Kamal documentation has been updated to reflect these changes.
Other fixes
Section titled “Other fixes”- Subscriptions in a “past due” state are now treated as “active” for the purposes of feature gating and accessing the billing portal. This is more consistent with how Stripe treats subscriptions in this state. (Thanks Luc for suggesting!)
- Fixed a bug where several
maketargets mistakenly included a--no-depsflag which would fail if your database container was not running. (Thanks Gary for reporting!) - Fixed an issue where Stripe subscription webhooks weren’t properly handled if you were using the embedded Stripe pricing table. (Thanks Andrew for reporting!)
- Fixed an issue introduced in 2024.9 where Stripe ecommerce webhooks weren’t always processed correctly.
- Added a migration file to automatically work around this dj-stripe issue so that it wasn’t a manual process.
Oct 15, 2024
Version 2024.9.3
Section titled “Version 2024.9.3”This release is mainly an update to the CLI:
CLI updates
Section titled “CLI updates”- You can now generate apps that work seamlessly with Pegasus teams (will use
BaseTeamModeland add the team slug and permissions checks to all urls and views). - The CLI now generates a default
admin.pyconfig for each data model. - User foreign keys now use
settings.AUTH_USER_MODELinstead of being hardcoded toapps.users.models.CustomUser.
Other changes
Section titled “Other changes”- Fixed an issue where HTMX links without href tags weren’t showing a pointer cursor on some CSS frameworks.
- Add default region to Redis and Postgres configurations in
render.yamlto make it easier to find/replace them when changing your project’s region. (Thanks Jacob for suggesting!)
Sep 26, 2024
Version 2024.9.2
Section titled “Version 2024.9.2”This release fixes a bug that prevented the CLI from running on Windows machines. Thanks Jonathan for reporting!
If you don’t want to upgrade you can just pip install pegasus-cli==0.2.1 to apply the fix.
Sep 20, 2024
Version 2024.9.1
Section titled “Version 2024.9.1”This release fixes a few things in the 2024.9 release.
- Updated the
bootstrap_ecommercemanagement command to createProductConfigurationobjects for all active Products in Stripe. - Fixed an issue on the ecommerce homepage where a closing
</div>tag was misplaced if a product didn’t have a default price set.
Sep 18, 2024
Version 2024.9
Section titled “Version 2024.9”There are two big updates in this release:
- The Pegasus CLI, which allows you to instantly spin up new apps.
- E-Commerce/Payments improvements.
The Pegasus CLI
Section titled “The Pegasus CLI”The Pegasus CLI is a standalone command-line tool that allows you to instantly spin up new Django apps. You can specify as many data models as you want and it will generate a starting CRUD interface for each of them.
Here’s a quick demo:
At the moment the CLI only supports HTMX build of Pegasus. A React-based implementation is planned for a future date.
Huge thanks to Peter for his excellent Pegasus example apps project which served as a reference for implementing the CRUD application and pagination.
E-Commerce / Payments demo improvements
Section titled “E-Commerce / Payments demo improvements”This is a series of updates designed to make it easier to build a functional end-to-end application on top of the e-commerce demo.
- Added a
ProductConfigurationmodel to attach additional metadata to products. - E-Commerce product URLs and views now use the
ProductConfigurationslugfield instead of the Stripe Product IDs. - Added a
@product_requireddecorator that can be used to restrict access to views based on whether the user has purchased a product. - Added a demo “access product” page that shows how to use the
@product_requireddecorator. - Added
user_owns_productandget_valid_user_purchasehelper functions. - Improved the navigation and use of breadcrumbs in the demo UI.
- See upgrade notes for information about migrating previous data to the new set up.
See also: the updated Payments docs.
Other Changes
Section titled “Other Changes”- Added
django-htmxanddjango-template-partialsas first-class dependencies to HTMX builds. These libraries are used by the CLI and will be used for more HTMX-based functionality moving forwards. - Added
make managecommand to run arbitrarymanage.pycommands in a docker environment. E.g.make manage ARGS='createsuperuser'. - Added the ability to pass arguments to
make testin docker. E.g.make tests ARGS='apps.teams --keepdb'. (Thanks David for the suggestion!)
Changed
Section titled “Changed”- Changed links on the tailwind signup page to use
pg-linkclass instead of explict tailwind classes. (Thanks Peter for the suggestion!) - Silenced extraneous djstripe warnings when running tests. (Thanks Chris for the suggestion!)
- Added
.vscodeand vs workspace files to the project.gitignore. - Switched from
assertstatements toraise ValueErrorin the e-commerce Stripe checkout confirmation view. - Moved some of the currency helper functions out of the
subscriptionsapp intoutils.billingso they can be used in ecommerce workflows even if subscriptions are disabled. - Set
PYTHONUNBUFFEREDandPYTHONDONTWRITEBYTECODEin docker compose file for python containers. (Thanks Richard for the suggestion!) - Upgraded Django to 5.1.1.
- Fixed a typo in the help text for the
bootstrap_ecommercecommand. - Fixed a bug where
user_teamscontext processor could cause a crash if auth middeware didn’t run (for example, on a 500 error page in production).
Upgrade Notes
Section titled “Upgrade Notes”If you have existing Purchase data in your application you will need to migrate it to the new ProductConfiguration structure.
This is a three-step process:
First you will need to apply the database updates, but allow Purchase.product_configuration to be null.
Instead of running ./manage.py migrate you will have to run the following command:
./manage.py migrate ecommerce 0002After running this, you can run the following command to migrate the existing data:
./manage.py migrate_ecommerceThe migrate_ecommerce management command will:
- Create
ProductConfigurationobjects for all products insettings.ACTIVE_ECOMMERCE_PRODUCT_IDS - Create
ProductConfigurationobjects for all products referenced in existingPurchasemodels. - Set
purchase.product_configurationto the newProductConfigurationobject for eachPurchase.
Finally, you can make the Purchase.product_configuration field non-null, by running:
./manage.py migrate ecommerce 0003New projects, or projects without any existing purchase data can skip these steps and run ./manage.py migrate directly.
However, you may still want to run ./manage.py migrate_ecommerce to populate ProductConfiguration objects for your active products.
Sep 17, 2024
Version 2024.8.2
Section titled “Version 2024.8.2”This is a maintenance release that includes a number of mostly small fixes and updates, and updates Django to version 5.1.
- Fixed a few styling issues on Bulma builds:
- Disabled dark mode. The styling for Dark mode was not fully supported by Bulma and led to strange-looking layouts.
- Fixed an issue where the active tab wasn’t properly highlighted in certain cases on Bulma builds.
- Fixed an issue with sqlite builds where the default
DATABASE_URLwould cause the DB to switch to Postgres. (Thanks Harry and Richard for reporting!) - Switched allauth from Twitter (which seems no longer supported) to Twitter Oauth2, which still works. (Thanks Bandi for reporting!)
- Fixed an issue introduced in version 2024.8 which caused Heroku Docker deploys to fail. Heroku does not support caching, so it has been removed from Heroku Docker builds. (Thanks Richard for reporting!)
- Fixed a bug where the
team_nav_items.htmlandteam_selector.htmltemplates could be accidentally included even if you built without teams. - Changed the (unused)
text-mutedcss class topg-text-mutedin a handful of places on Tailwind builds. (Thanks Peter for reporting!) - Removed unused
AWS_S3_CUSTOM_DOMAINvariable from.envfiles.
Changed
Section titled “Changed”- Upgraded Django to version 5.1.
- Upgraded all Python packages to their latest versions.
- Updated Pegasus color CSS variables to use the DaisyUI variables, so that they change when you change DaisyUI themes. (Thanks Peter for the suggestion!)
- Removed
custom.mkif your project was not generated with aMakefile. (Thanks Finbar for reporting!) - Removed “Containers started” message from
make startcommand that never executed. (Thanks Richard for reporting!) - Better style inputs of type
timeanddatetime-localin forms on all CSS frameworks. (Thanks Peter for reporting and fixing!) - Simplified Bulma navbar to use bulma native classes instead of custom CSS. (See upgrade note below.)
- Updated default Github repo in
app-spec.ymlto use raw project slug instead of the hyphenated version. (Digital Ocean deployments, only, thanks Richard for suggesting) - Moved
SERVER_EMAILandDEFAULT_FROM_EMAILfromsettings_production.pyto mainsettings.pyfile, and made it possible to set them via the environment/.envfile. - Added many more common settings and secrets to the Kamal
deploy.ymlfile.
Documentation
Section titled “Documentation”- Improved the documentation on customizing the Material Bootstrap theme.
- Added documentation for deploying multiple apps to the same VPS with Kamal.
Upgrading
Section titled “Upgrading”- Bulma builds may need to add the
is-tabclass tonavbar-itemsin the top nav to mimic the updated navbar styling.
August 23, 2024
Version 2024.8.1
Section titled “Version 2024.8.1”This is a maintenance release which upgrades HTMX to version 2.0 and fixes a handful of minor bugs.
Changed
Section titled “Changed”- Upgraded HTMX to version 2.0. See upgrade note below.
- Fixed a bug on some environments where
make build-api-clientwould wrong relative to the wrong directory. (Thanks Ben for finding and fixing!) - Downgraded Postgres from 16 to 14 on Digital Ocean deployments, due to an issue with permissions on version 16 that was causing new Digital Ocean deployments to fail. (Thanks Panagiotis for reporting!)
- Switched the default celery pool to solo in development, to fix issues running on Windows. See updated docs.
- Updated in-app help hint to recommend running
./manage.py bootstrap_ecommerceinstead of./manage.py djstripe_sync_models price.
Upgrading
Section titled “Upgrading”Htmx 2.0 requires loading new extensions. If you were loading HTMX extensions in your own templates, you will have to upgrade the location of those to the 2.0 versions.
Before:
<script src="https://unpkg.com/htmx.org/dist/ext/ws.js" defer></script>After:
August 13, 2024
Version 2024.8
Section titled “Version 2024.8”This is a maintenance release with many small updates and fixes.
- Added test cases for subscription decorators, feature gating, and views. These can be extended/adapted to test custom subscription logic. Also added utility functions to create test products, subscriptions and mock requests.
- Added a test that will fail if your project is missing any database migrations. More on this concept here.
- Added an example landing page to Tailwind builds, based largely on Scriv’s landing page.
- Added
TURNSTILE_KEYandTURNSTILE_SECRETto Kamal’s default secrets. - Added a section on configuring static files to the production checklist.
Changed
Section titled “Changed”- Code is now automatically formatted for all projects.
The “Autoformat code” check box has been renamed to “Enable linting and formatting” and now only controls whether
ruffand the pre-commit hooks are included in the project download. Projects that had already enabled auto-formatting are unaffected by this change. (See upgrade notes below.) - The example landing pages are now used as the project’s landing page instead of being listed in the examples. (Bulma and Tailwind builds only.)
- Team invitation emails are now better styled, matching the same format as account emails. (Thanks EJ for the suggestion!)
- The
EMAIL_BACKENDsetting is now configurable via an environment variable. Also, added a commented-out example of how to set email settings for a production email provider (Mailgun). - Apt and pip packages are now cached across Docker builds, which should result in faster build times after the first build. (Thanks Tobias for the suggestion!)
- Improved the display format of “role” in the team invitation list. (thanks Andy for the suggestion!)
- Change
user/toYOUR_GITHUB_USERNAME/in the Digital Oceanapp-spec.ymlfile to make it more obvious that it should be edited. (Thanks Stephen for suggesting!) - Changed the UI of social logins on the “sign in” page to match that of the “sign up” page on the Material Bootstrap theme. This makes the implementation more extensible and more consistent with other CSS frameworks.
- Upgraded all Python packages to the latest versions.
- Fixed a bug where the formatting
maketargets were still callingblackandisortinstead ofruff.make blackis nowmake ruff-formatandmake isortis nowmake ruff-lint. - Fixed a bug where the sign up view tests would fail in your environment if
settings.TURNSTILE_SECRETwas set. (Thanks Finbar for reporting!) - Fixed translations on the user profile form field names.
- Removed
svgas an option for profile picture uploads, to prevent the possibility of using it as an XSS attack vector. (More info on this threat here). - Disable debug toolbar in tests, which fixes test failures under certain conditions.
- Bumped the Postgres version used by Digital Ocean deployments from 12 to 16. Digital Ocean has deprecated support for version 12. (Thanks Stephen for reporting!)
- Simplified how the list of social login buttons is rendered, and make social login buttons work when configuring social applications in settings (previously buttons only showed up if you configured apps in the database). See upgrade note below.
Removed
Section titled “Removed”- Deleted the “sticky header” html and CSS code that was only used on the example landing pages.
Upgrade Notes
Section titled “Upgrade Notes”- If you had not been using auto-formatting until now, you should first follow the instructions for
migrating to auto-formatted code prior to upgrading to this release.
Otherwise you will likely get a lot of formatting-related merge conflicts when trying to upgrade.
- If you already enabled auto-formatting (most projects), you don’t need to do anything.
- If you had previously configured allauth social applications in the database and in your settings file, you may see a duplicate “Login with XXX” button on the sign up and login pages. To fix this, remove the social application from either your settings or the database.
August, 7, 2024
Version 2024.6.1
Section titled “Version 2024.6.1”This is hotfix release that addresses a few issues from yesterday’s update:
- Fix app styles accidentally being purged during the Docker build process. This caused styling on Docker-based deployments for tailwind builds. (Thanks Steve for reporting!)
- Moved channels url import to after Django initialization.
This fixes an
AppRegistryNotReadyerror when deploying asynchronous apps with the AI chat app enabled. (Thanks Roman for reporting!) - Don’t create the periodic task to sync subscriptions unless per-unit billing is enabled.
June 6, 2024
Version 2024.6
Section titled “Version 2024.6”This is a feature release with a few big updates and a lot of smaller ones.
AI model changes
Section titled “AI model changes”The library used for non-OpenAI LLMs has been changed from llm
to litellm. Reasons for this change include:
- It has far fewer additional dependencies.
- It supports async APIs out of the box (for most models).
- The
llmlibrary is more targeted for the command line use-case, whereaslitellmoffers similar functionality as a native Python library with a cleaner API.
Litellm can still be used with all common AI models, including OpenAI, Anthropic/Claude, and local models
(via ollama). For details on getting started with litellm see the updated AI documentation.
Formatting and linting now use Ruff
Section titled “Formatting and linting now use Ruff”Black and isort have been replaced with ruff---a Python linter/formatter that offers the same functionality as those tools but is much faster.
Additionally, Pegasus will now remove unused imports from your files automatically, both
when building your project and if you have set up pre-commit.
This change should be a relatively seamless drop-in replacement, though you may see some new lint errors in your projects which you can choose to address.
Spam prevention updates
Section titled “Spam prevention updates”There has been a dramatic increase in spam-bots over the last month. Many of these bots target seemingly-innocuous functionality like sign up and password reset forms.
This version includes a few updates to help combat these bots. First, you can now easily add Cloudflare turnstile to your sign up forms, which will present the user with a captcha and should help reduce bot sign-ups. See the turnstile documentation for information on setting this up.
Additionally, the ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS setting has been set to False by default.
This prevents “forgot password” and “magic link” emails from being sent out to unknown accounts.
It should also help reduce unnecessary email sending.
Finally, the admin dashboard no longer shows users with unconfirmed email addresses if you have set
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'.
This helps filter out likely bots from the report to provide clearer visibilty of people actually signing up for your app.
Complete changelog
Section titled “Complete changelog”Below is the complete set of changes in this release.
- Added configurable captcha support on sign up pages, using Cloudflare turnstile. See the turnstile documentation for more information on setting this up. (Thanks Troy, Jacob, Robert and others for suggesting.)
- Added API views for two-factor authentication, and to change the logged-in user’s password. (Thanks Finbar for suggesting!)
- Add UI to tell users they need a verified email address prior to setting up two-factor auth.
- Also added a
has_verified_emailhelper class to theCustomUsermodel.
- Also added a
- Added tests for the delete team view for both team admins and members. (HTMX builds only)
- Added test for team member removal permissions.
- Add display and sort on the number of active members in the teams admin.
- Fixed a bug where team names longer than 50 characters could cause a crash during sign up.
- Fixed a bug where multi-factor authentication QR codes had a dark background when dark mode was enabled (Tailwind builds only). (Thanks Artem for reporting!)
- Fixed a bug where it was possible to bypass two-factor-authentication when using the API authentication views. (Thanks Finbar for reporting and helping with the fix!)
- Fixed a bug where deleting the user’s only team while impersonating them resulted in a temporary crash. (Thanks EJ for reporting!)
- Fixed a bug where creating an API key crashed if your user’s first + last name combined to more than 40 characters. (Thanks Luc for reporting!)
- Improved the UI feedback when LLMs fail (e.g. if your API key is wrong or ollama is not running).
- Removed the
static/cssandstatic/jsdirectories from the.dockerignorefile so that other project files can be included in these directories. Also updated the production Docker build process so that any existing files are overwritten by the built versions. (Thanks Raul for reporting!) - Made some performance improvements to the production Dockerfile build (don’t rebuild the front end if there are no changes in the dependent files).
- Better support trialing subscriptions with no payment methods. The subscription UI will now show the date the trial ends and won’t log errors about missing invoices. (Thanks Jarrett for reporting!)
Changed
Section titled “Changed”- Upgraded all Python packages to the latest versions.
- Upgraded all JavaScript packages to the latest versions.
- Non-OpenAI builds now use
litellminstead ofllm. See above. (Thanks Sarthak for the suggestion!) - Changed the formatter/linter from
blackandisortto ruff. See above.- Also addressed a handful of minor linting errors that came up as a result of this change.
- Codebase linting is now substantially faster.
- Unused imports are now automatically removed when building your projects.
- Celerybeat now uses the
django-celery-beatlibrary to store tasks in the database instead of on the filesystem. This improves support for celerybeat on Docker-based platforms. (Thanks Peter and Artem for the suggestion!)- Also added a migration to save the default scheduled tasks in the database.
- The login API response has changed, to allow for two-factor auth prompts, and more machine-readable status fields.
- Removed the no-longer-used
use_json_field=Trueargument from wagtailStreamFields. - The admin dashboard no longer shows users with unconfirmed email addresses if you have set
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'. - The admin dashboard now includes sign ups from the current date, by default.
- Changed behavior when team role checks fail from raising a
TeamPermissionErrorto returning a 403 response, and updated affected tests. One side effect of this is that the stack traces are removed from successful test runs. - Secret keys should no longer change every time you build your Pegasus project.
They are also now clearly prefixed with
django-insecure-to indicate that they should be changed in production. - Updated the default OpenAI chat model to gpt-4o.
- Upgraded the openapi client generator to version 7.5.0 and also pinned the version used by
make build-api-clientto the same one. - Team IDs are now optional on the create team page (HTMX builds only).
- Add clearer error message when charts are broken due to api config issue. (Thanks Yngve for reporting!)
- Added
assume_scheme="https"to formURLFields to be compatible with Django 6 behavior. - Added
FORMS_URLFIELD_ASSUME_HTTPS = Trueto be compatible with Django 6 behavior. - Set
ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS = Falseby default, so that “forgot password” emails do not get sent to unknown accounts. This can help prevent spam bots.
Removed
Section titled “Removed”- Removed
blackandisortfrom dev-requirements, since they have been replaced byruff. - Removed
llmlibrary and associated code, since it has been replaced bylitellm. - Removed no longer used
TeamPermissionErrorclass.
Standalone front end
Section titled “Standalone front end”The following changes affect the experimental standalone front end:
- The standalone React front end now supports two-factor-authentication.
- Improve the UI when you have login issues in the standalone React front end.
June 5, 2024
Version 2024.5.3
Section titled “Version 2024.5.3”This is a hotfix release that fixes a bug where the landing and dashboard page image was accidentally removed if you built without the examples enabled.
May 21, 2024
Version 2024.5.2
Section titled “Version 2024.5.2”This is a hotfix release that fixes a bug that prevented the team management page from loading in certain browsers if you built with a React front end and with translations enabled. Thanks Finbar for reporting!
- Added
deferkeyword to various bundle scripts so they are loaded after the JavaScript translation catalog. - Updated references to
SiteJSto run on theDOMContentLoadedevent to allow for usage of thedefertag.
May 16, 2024
Version 2024.5.1
Section titled “Version 2024.5.1”This is a hotfix release that fixes issues running the experimental React frontend in Docker. Thanks Mohamed for reporting this!
- Fix
api-clientpath in the frontend docker container and add tooptimizeDepsin vite config. - Mount
node_modulesas an anonymous volume in the frontend docker container, so it is not overwritten. - Automatically create
./frontend/.envwhen runningmake initif it doesn’t exist.
May 14, 2024
Version 2024.5
Section titled “Version 2024.5”This is a major release with several big updates. Here are a few highlights:
New AI models
Section titled “New AI models”In addition to using OpenAI chat models, you can now build the Pegasus AI chat applicaiton
with the llm library. This lets you run the chat application
against any supported model---including the Anthropic family (Claude 3), and local models like Llama 3.
Additionally, the image generation demo now supports Dall-E-3 and Stable Diffusion 3. For complete details, see the new AI documentation.
Health Checks
Section titled “Health Checks”A new setting allows you to turn on health checks for your application, powered by
django-health-check.
This will create an endpoint (at /health by default) that pings your database, Redis instance,
and Celery workers and returns a non-200 response code if there are any identified issues.
These endpoints can be connected to a monitoring tool like StatusCake or Uptime Robot so that you can be alerted whenever your site is having issues.
See the section on monitoring in the production checklist for more information.
Allauth updates
Section titled “Allauth updates”The django-allauth library was updated to the latest version, which enabled several useful changes.
The first is a “sign in by email code” option which can be used in addition to the standard username/password and social option. Users can request a code be sent to their registered email and can then use that to login. See the magic code documentation to enable/disable this.
The second is using the recent multi-factor authentication
support added to allauth in favor of the third-party django-allauth-2fa library.
This reduces dependencies and puts all of authentication functionality on a standard path moving forwards.
The complete release notes are below:
- Added an optional health check endpoint at /health/. (see above for details)
- Added an option to connect the chatbot to other LLMs. (see above for details)
- The AI image generation now supports Dall-E 3 and Stability AI.
- All generated projects now include a
LICENSE.mdfile. The goal of the license file is not to change how Pegasus can be used in any way, but rather to document those terms in the codebase itself (previously they were only documented on the terms page). For more information you can see the new license page. - Added support for “magic-code login”, where a user can login to the site by requesting a code to their email address. Documentation.
- Google cloud run builds now support Redis. For details, see the updated documentation. (Thanks Forrest for suggesting!)
- Added a
custom.mkfile where you can add additionalmaketargets without worrying about future Pegasus upgrades. (Thanks John for proposing this!)
Changed
Section titled “Changed”- Upgraded allauth to the latest version (0.62.1).
- Migrated two-factor authentication from the third-party
django-allauth-2fato thedjango-allauthbuilt-in implementation. See upgrade notes below for migrating existing projects. - Refactored how many allauth views work to be compatible with their new template override system.
- Bootstrap and Bulma builds: Move sidebar navigation into the mobile menu instead of having it take up the top of the
screen on mobile screens, similar to how things already worked on Tailwind and Material. (Thanks Luc for the nudge!)
- This includes splitting out the menu items into their own sub-template files so they can be included in both menus.
- Inline buttons are now spaced using the
gapCSS property instead of thepg-mlclass on individual buttons. Alpine.start()is now called onDOMContentLoadedloaded event instead of usingwindow.load. This makes Alpine-powered UIs more responsive, especially when used on pages with lots of images.- Updated external JavaScript imports to use the
deferkeyword for slightly better page load performance. (See upgrade note.)- Also updated inline JavaScript code in a handful of places to be compatible with deferred scripts.
- Added a Github logo to connected Github accounts on profile page.
- The AI image demo and code has been moved to a first-class Pegasus application / tab.
- Update the docker container registry used by Google Cloud to reflect the latest version in Google. Also push more Google Cloud configuration variables out of the Makefile and into the environment variables. (Thanks Erwin for reporting!)
- Added additional
.envfiles to.dockerignorefor Google Cloud builds. - Bumped django to the latest
5.0.6release.
- SQLite build now properly parse
DATABASE_URLif it is set. This fixes issues deploying to certain platforms when building with SQLite. (Thanks Manasvini for reporting!) - Updated allauth documentation links in the README to point to the new allauth docs site. (Thanks Shantu for reporting!)
Removed
Section titled “Removed”- Removed several no-longer-needed allauth template files.
- Removed deprecated “version” field from the dev
docker-compose.ymlfile. (Thanks Moyi for reporting!) - Removed no-longer-used
pg-mlcss spacing class. - Removed redundant type=“text/javascript” declarations from a few
<script>tags. - Removed unused HTMX script import from employee app demo page.
- Removed the no-longer-used
openai_exampleapp (functionality has been moved toapps.chatandapps.ai_images). - Removed the no-longer-needed
AccountAdapterclass. This class was previously used to add two-factor support to login, which is now handled natively by allauth.
Upgrading
Section titled “Upgrading”Two-factor authentication
If you are using two-factor authentication you must run:
python manage.py migrate_allauth_2faWhich will bring across existing device set ups and recovery codes. If you don’t do this, you will remove two-factor-authentication configuration for all users who have set it up, compromising their security.
JavaScript defer changes
The change of adding the defer keyword to <script> imports could have unintended consequences if you were
relying on functions / functionality in your scripts being available on page load.
This would most likely manifest as a browser JavaScript error of the form:
Uncaught ReferenceError: htmx/SiteJS/etc. is not defined.
To resolve this, make sure all additional dependencies are also loaded with defer (for external scripts),
or only referenced after the 'DOMContentLoaded' event (for inline scripts).
Alternatively, you can remove the defer keyword from the <script> tags in base.html or affected templates
to restore the previous behavior.
May 9, 2024
Version 2024.4.2
Section titled “Version 2024.4.2”This is a maintenance release with a number of fixes and small changes. The most notable change is that the OpenAI chat example is now fully asynchronous.
- Kamal deployments now support celerybeat for scheduled tasks out-of-the-box. (Thanks Peter for the suggestion!)
- Added an example celerybeat configuration to the built-in examples.
Changed
Section titled “Changed”- The websocket OpenAI chat example is now fully asynchronous. This should substantially improve the number of concurrent sessions supported by the app.
- Use alpine to disable submit and clear input in the OpenAI chat example (thanks Artem for the suggestion!)
- Renamed “OpenAI Demos” tab to “AI Demos”.
- Renamed
get_chatgpt_responsetask toget_chat_response. - Change the default admin ordering for Users to date joined, descending.
- Google cloud builds only:
.env.productionis no longer included in Pegasus builds, since it was ignored by git. Instead.env.production.exampleis included. (Thanks Naveed for reporting!) - Attach Stripe Customer to User/Team in
provision_subscriptionfunction instead of the view, which makes it work in webhook processing as well.
- Fixed a bug where non-admins of teams could not view their own team settings/members. (Thanks Bernard for reporting!)
- Fixed a bug where deleted subscriptions with
canceled_at_period_end=Truecould cause a crash when trying to view them. This bug would typically only manifest in test mode or if you manually deleted subscriptions in Stripe. - Fixed a crash when looking up the currency for a deleted subscription.
- Added a constraint to the
Membershipmodel to disallow users being “added” to a team more than once. (Thanks Zac for reporting!) - Fix typo instructing you to “comment out” mailgun settings instead of “uncomment” them. (Thanks Adam for reporting!)
- Google cloud builds only: added
--platform linux/amd64to thegcp-buildmake target, to address build/deploy issues from Mac M2s. (Thanks Naveed for reporting!)
Documentation
Section titled “Documentation”- Improved the instructions for running Kamal with Docker. Thanks EJ and Simon for the help with this!
April 22, 2024
Version 2024.4.1
Section titled “Version 2024.4.1”This is a hotfix/security release that fixes an issue where the deploy/.env file was not properly
ignored by the .dockerignore when using Kamal deployment.
This resulted in credentials being included in built Docker containers.
You are affected if you:
- Deployed your application with Kamal.
- Made your built Docker image publicly available.
If this is the case it is recommended to immediately upgrade and cycle any credentials that were listed in deploy/.env.
Sorry about the inconvenience!
Thanks to Denis for reporting and to Erwin for pointing out the security implications.
Note: if you’d like to patch this issue without upgrading, you can replace .env in your .dockerignore file with
**/.env.
Apr 17, 2024
Version 2024.4
Section titled “Version 2024.4”There are two major updates in this release, a new websocket-based streaming chat UI, and upgrading Bulma to version 1.0.
Streaming Chat UI
Section titled “Streaming Chat UI”The OpenAI Chat demo now streams responses in real time. This provides a much better user experience for chat applications, as the user doesn’t stare at a “loading” screen for a long time waiting for the complete response.
This feature is currently only supported on HTMX builds. It will be automatically enabled if you enable the “asynchronous” build option. If you do not enable async you will still be able to use the old UI.
You can watch a demo of this and learn how it’s built in this video: Building a ChatGPT clone with Django, Channels, and HTMX.
Bulma upgrade to 1.0
Section titled “Bulma upgrade to 1.0”Bulma 1.0 was released in late March and Pegasus has been updated to support it. The UI will change slightly but there should not be any breaking or substantial changes as a result of this upgrade. See details below.
- OpenAI Chat demo now supports streaming responses. This is only turned n for HTMX builds with asynchronous support enabled. Big thanks to Artem for the implementation support!
Updated
Section titled “Updated”- Upgraded Bulma to 1.0. Related changes (bulma builds only):
- Switched all variables from Sass variables to CSS variables.
- Updated syntax of all responsive CSS to use
@include mixinsinstead of+from,+until, etc. - Switched how bulma is initialized from
@importto@use. - Removed some unnecessary variable declarations from
site-bulma.scss
- Upgraded other JavaScript packages to their latest versions.
- Upgraded Django to 5.0.4
- Fixed a bug where the standalone front end Dockerfile did not install the right dependencies. In some cases, this caused the front end to not start properly.
- Fixed a bug where viewing a non-existent team would cause a 500 error instead of a 404.
- Removed some unused code in the OpenAI chat example if you were building with React.
April 5, 2024
Version 2024.3
Section titled “Version 2024.3”This is a big feature release! The main goal of the release is to make it easier to use Pegasus with separate front ends and mobile applications. Here are the highlights:
API Authentication and JWT support
Section titled “API Authentication and JWT support”Pegasus now optionally includes API endpoints for registering, authenticating and verifying users (via JSON web tokens or JWT). This provides all the pieces needed to make your Pegasus application a backend to a standalone front end, for example a React or Next.js SPA, or a mobile application.
You can read more about this feature in the Authentication API documentation.
Standalone React (Vite) Front End (Experimental)
Section titled “Standalone React (Vite) Front End (Experimental)”In addition to the authentication API support, Pegasus now includes an optional standalone React demo application built with React, Vite and React Router.
The demo application includes sign up and login workflows, helper components to manage authentication and protected routes, and a port of the employee demo application (using the same code as the Pegasus version).
You can watch a demo below and learn more about it in the React front end documentation.
Teams Navigation Updates
Section titled “Teams Navigation Updates”Application navigation now uses a new team selector component. This allows users to quickly see their team list and switch between teams directly from any page. Team management has also been moved under this component, and the previous team section of the navigation was removed.
Complete release notes
Section titled “Complete release notes”- API Authentication and JWT support. See above.
- An Experimental Standalone React (Vite) Front End. See above.
Changed
Section titled “Changed”- Team navigation overhaul. See above.
- Made changes to the Employee demo app to support being shared with the standalone front end.
- Move
BrowserRouterdeclaration outside theEmployeeApplicationcomponent so the routes can be used in different routers. - Change all
LinkandRoutedeclarations inEmployeeApplicationto be relative paths instead of absolute. - Pass image references into the app as props instead of relying on an externally defined constant (
STATIC_FILES). This allows the application to be served from multiple URL endpoints without modification. - Pass
urlBaseto the nested components, so that they can route back to different paths (e.g. when employees are saved). - Switch the department choice field from a passed-in
EMPLOYEE_DEPARTMENT_CHOICESdata structure to theDepartmentEnumobject that is included with the API client. - Change file extension for several components from
.jsto.jsx.
- Move
- Made changes to the JavaScript api client to support being shared with the standalone front end
- Moved the api-client from
assets/javascript/api-clientto anapi-clientfolder in the root of the repository. - The api client is now installed as a linked local dependency in
package.jsoninstead of referenced as part of the code. This makes it easier to move the api client code or install it as a hosted npm package. Also updated all references to the api-client to reflect this change. - Renamed the
api-clientmake target tobuild-api-clientto avoid conflicting with the filesystem folder. - The API client is now built dynamically, just in time, when you create your project. Also updated the API client version to 7.4.0. This may result in slight differences in generated API client code, but the resulting code should be more correct and there should not be any breaking changes to existing Pegasus functionality.
- Moved the api-client from
- Be more explicit in the webpack config about using babel-loader presets instead of relying on
babelrc - Exclude frontend from the base type check config in
tsconfig.json. The front end is checked independently. - Auto-size the navigation column in
app_home.html(Bootstrap builds only). - Make ALLOWED_HOSTS configurable by environment variables in both dev and production. (Thanks Shawn for suggesting)
- Removed
.env.docker. Docker development environments are now managed by.env(same as native environments). Also updated the documentation on this. - Added a search input to Team admin UI.
- Added a
signup_closed.htmltemplate which improves the styling of the “signups closed” page if you turn off public signups. (Thanks EJ for the suggestion!) - Added an
account_inactive.htmltemplate which improves the styling of the “inactive account” page if an inactive user tries to login. (Thanks Lauren for the suggestion!) - Improved the contrast on help text in dark mode. (Tailwind builds only)
- Changed the main icon on the landing page and dashboard from the old rocket to the current SaaS Pegasus rocket.
- Added a “Built with SaaS Pegasus” line to the default generated footer.
- Bump Django to latest 5.0.3 release.
- Fixed hard-coded reference to the Pegasus dev project in Google Cloud media configuration in
settings_production.py - Fixed a bug where the two-factor QR codes were very difficult to scan in dark mode. (Tailwind builds only)
- Made certain account pages (password reset, two-factor auth, etc.) darker in dark mode. (Tailwind builds only)
- Removed a redundant check for empty subscription from
view_subscription.html(thanks Rob for reporting!) - Fixed a bug that caused errors displaying prices in secondary currencies if they prices had decimals in them. (Thanks Matthew for reporting and the fix!)
- Fixed team signup test if you have disabled signups. (Thanks Saif for reporting and proposing the fix!)
- Fixed a bug where links to the user dashboard were accidentally missing if you disabled user impersonation. (Thanks Simon for finding!)
Upgrade notes
Section titled “Upgrade notes”If you are using Docker in development you might need to move/copy your .env.docker file to .env
when you update your project.
Mar 22, 2024
Version 2024.2.4
Section titled “Version 2024.2.4”This is another minor hotfix release. Details:
- Fixed Google Cloud
Makefiletargets to use the built project’s ID instead of the Pegasus development project’s ID. (Thanks Daan for reporting!) - Minor changes to
fly.tomlto fix errors on certain environments/versions. (Thanks Denis for reporting!)
Feb 26, 2024
Version 2024.2.3
Section titled “Version 2024.2.3”This is a hotfix release that restores the deploy/ folder that was accidentally not
present on certain Google Cloud builds. Thanks Yogesh for reporting!
Feb 24, 2024
Version 2024.2.2
Section titled “Version 2024.2.2”This is a big Pegasus release with a new Github integration for creating and upgrading projects, as well as an overhaul of the Google Cloud deployment support and many small updates and fixes from the community.
New Github distribution model
Section titled “New Github distribution model”You can now create and upgrade your projects directly on Github! This is a much smoother experience than the previous zip file model (which is still available). You can also connect an existing project to Github by following the instructions here.
For more details see the screencast below, and the updated Getting Started and Upgrading pages.
A few code changes were needed to support this workflow (in particular, it’s no longer possible to deliver files which
were in the .gitignore file):
- Pegasus no longer ships with a
.envor.env.dockerfile and instead these must be created from.env.example. .env.examplewill now use Docker-based URLs for your Postgres and Redis database if you build with Docker enabled.- Added
make setup-envcommand to create your.env.dockerfile from.env.example. - Updated the
make initcreate your.env.dockerfile if it doesn’t already exist. - Updated the setup documentation to reflect the above changes.
Overhauled Google Cloud Deployment
Section titled “Overhauled Google Cloud Deployment”The Google Cloud deployment support has been completely overhauled and brought in line with other deployment plastforms. These are the major changes (affecting Google Cloud deployments only):
- Updated the Google Cloud set up and setup documentation based on the latest Google guide.
- Google Cloud now uses the same Dockerfile as other deployment options.
- Google Cloud now uses whitenoise for Static files, the same as other deployment options. It still uses Google Cloud Storage for media files.
- Added
Makefiletargets for Google Cloud options for building, pushing, and deploying. - Deleted legacy
cloudmigrate.yamlandcloud_run.shfiles. - Simplified the
prod-requirements.infile. - Fixed a bug where uvicorn was not correctly installed in production for async builds.
- Fixed various settings to work with the latest Google Cloud guides and best practices and simplified many of the other settings.
- Updated the Django storages set up for the latest Django 4.2 / 5.0 settings.
Big thanks to Conrad, Rob, Troy, and Nathan for helping find and work through these changes.
Other Fixes
Section titled “Other Fixes”- Include djstripe webhook url endpoints if building with ecommerce and not subscriptions. (Thanks Emiliano for reporting!)
- Fixed a bug where a Social App in the database for a provider that was not configured would cause a crash.
- Fixed a bug where teams tests would fail if
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICEwas enabled. (thanks Saif for reporting and the fix!) - Fixed a bug where social button icons would not work with manifest file storage.
Other Changes
Section titled “Other Changes”- Updated most
maketargets that run commands in Docker to not require thewebcontainer to be running. They will now spin up and remove temporary containers instead. (Thanks Artem for the suggestion!) - Slightly improve styling of page that shows when there are social authentication errors (thanks Finbar for the contribution!)
- Make
USE_HTTPS_IN_ABSOLUTE_URLSsetting configurable via an environment variable. - (Render only) Make the casing of booleans in
render.yamlconsistent. - (Kamal only) Added more environment variable declarations to the default Kamal setup.
- (fly.io only) Overhauled the
fly.tomldeployment file to be consistent with fly’s latest format and removed unnecessary parts. - (Bulma only) updated the sign up form so that the password(s) come before the team name to be consistent with other CSS frameworks.
- (Bulma only) allow changing the email address you sign up from when accepting a team invitation.
Documentation updates
Section titled “Documentation updates”- Overhauled Google Cloud setup docs.
- Added Github instructions to upgrading documentation.
- Added Github instructions to getting started.
Feb 21, 2024
Version 2024.2.1
Section titled “Version 2024.2.1”This release fixes the OpenAI demo to be compatible with the latest Python library:
- Fix ChatGPT example to work with latest OpenAI API.
- Fix Dall-E example to work with latest OpenAI API.
- Update a Github action to latest version that was missed in the last release.
Feb 5, 2024
Version 2024.2
Section titled “Version 2024.2”This release adds Django 5.0 support, upgrades all dependencies to their latest versions, and includes a handful of other changes.
Details:
- Support Django 5.0. Django 4.2 LTS should also work, but 5.0 will be the default version tested and used moving forwards.
- Upgraded all Python dependencies to their latest versions.
- Upgraded all JavaScript dependencies to their latest versions.
- Upgraded all Github actions to use latest versions.
- Simplified the process for building the front end API client with Docker (thanks Finbar for the pointer!). Api client docs have been updated as well.
- Update links to all Django documentation to link to the latest stable release, instead of a specific version.
- Fixed a schema warning for the user signups dashboard API.
- Update link to the guide to celery progress bars to the new blog post url.
- Simplified the process of setting up your ecommerce config to a new management command:
./manage.py bootstrap_ecommerce.- Also refactored related code to be shared between ecommerce and subscriptions.
- Added
subscription_is_activehelper function, to remove duplicate code that was running the same check. Also updated the documentation. - Fixed a bug where if you marked a subscription to be canceled at the period end and weren’t running webhooks, the subscription page would crash.
- Added
staff_member_requireddecorator to all superuser-only views, to ensure that the user is also active, and staff. (Thanks Felipe for the suggestion!) - Removed
tailwindcss/formsplugin, which conflicted with some default DaisyUI form elements and wasn’t needed. (thanks Artem and Alex for the suggestion!) - Added better styling for the socialaccount connections page. (thanks Finbar for the contribution!)
Feb 2, 2024
Version 2024.1.2
Section titled “Version 2024.1.2”This is a minor/hotfix release that fixes a few issues related to fly.io deployments due to changes
in the default values used by fly.
It also updates the fly documentation to use the latest flyctl workflow for launching
new applications.
Thanks to Naveed for reporting this.
January 15, 2024
Version 2024.1.1
Section titled “Version 2024.1.1”This is a minor/hotfix release that disables self-hosting media files with Kamal deployment, since this wasn’t working well for production environments.
For now it is recommended to use S3 to host media files with Kamal, though this may change in the future.
To get the hotfix without upgrading you can just remove these two lines from your deploy.yml file:
volumes: - "{your-app-slug}-media:/code/media"January 9, 2024
Version 2024.1
Section titled “Version 2024.1”This is a minor/hotfix release with some small updates/fixes to the group chat UI and Kamal deployment:
- Fixes an issue where there were missing templates if you installed with asynchronous support and without OpenAI. (Thanks Jose for reporting!)
- Chat templates have now been moved to
web/chatso it is clear they can be re-used across apps. - Added tests that would have caught the above issue.
- Renamed
TestLoginRequiredViewtoTestProfileViewsto be more clear what it is doing. - Bumped Django to the latest 4.2.9 bugfix release.
- Don’t run Celery with gevent in Kamal deployments, since it is not necessary and not always installed. (Thanks Luis for reporting!)
- Use
settings_productionin Kamal deployments by default, instead of requiring manually setting the environment variable. (Thanks Luis for reporting!)
January 3, 2024
Version 2023.12.1
Section titled “Version 2023.12.1”This hotfix release changes the multiarch value in Kamal deploys to true, which fixes errors when
deploying from Mac / Windows machines to Linux servers (thanks Luis for reporting).
There was also an overhaul of the Kamal docs.
If you want the hotfix without upgrading, you can just set multiarch: true in the builder section of your deploy.yml file.
December 20, 2023
Version 2023.12
Section titled “Version 2023.12”The big update in this release is official support for deploying Pegasus apps onto any linux server. This allows you to deploy Pegasus apps onto any VPS, like Linodes, Digital Ocean Droplets, or Amazon EC2 / Lightsail instances. The deployment uses Docker containers, managed using Kamal. You can deploy your entire application onto a single server (the default), multiple servers, or mix-and-match between self-hosted and managed services (e.g. Amazon RDS) with an easily customizable configuration.
For more details, see the new Pegasus Kamal documentation.
Below are the complete release notes:
- Added support for deploying to any linux server using the new Kamal deployment option. Documentation.
- Added first-class support for “login with Github.”
- Added a basic
.dockerignorefile. - Added an optional argument to
make npm-installfor installing individual packages, and added amake npm-uninstalltarget for uninstalling packages. (Thanks Gary for the suggestion/contribution!)
Changed
Section titled “Changed”- Load
request.teaminTeamsMiddlewareeven if the user doesn’t have access to the team ifteam_slugis passed to the view. Since authorization is done in the view decorators likelogin_and_team_requiredthis should be safe, and makes it easier to create team views that don’t require authentication.- Also updated tests to reflect this new behavior.
- Only show social apps which have been created in the database on the sign up and login pages, and clean up/standardize how
social app code/buttons are added.
- Also switch social logins to use POST and remove
SOCIALACCOUNT_LOGIN_ON_GET = Truefrom settings.
- Also switch social logins to use POST and remove
- Add a
customerobject to theCustomUsermodel when ecommerce is enabled, and re-use the same customers when a user makes multiple purchases. - Silence
dj-stripewarning about Stripe keys being kept in settings. This is standard practice for Pegasus applications. - Mock out JavaScript translations and remove translation-based views when building without translations enabled. This should slightly improve page-load times when not using translations.
- Explicitly set
DEBUG=Falsein the Render production environment. - Explicitly set default region on fly.io deployments.
- Changed postgres connection strings from
postgres://topostgresql://. Either one works in Django, but only the latter works with sqlalchemy, so using it allows the same connection string to be used with both tools. - Upgraded everything to run Node 20 instead of Node 18.
- Upgraded the base Docker images from bullseye (Debian 11) to bookworm (Debian 12).
- Overhauled the production Docker setup to use a multi-stage build. This should allow for faster build times (partial builds can run in parallel) as well as faster rebuild time, as more steps are able to be cached more often.
- Profile picture media files are now deleted when the associated user is deleted.
- Default the
PORTvariable used by django in production deployments to8000if not specified in the environment. - Changed django database engine from
django.db.backends.postgresql_psycopg2todjango.db.backends.postgresql(these behave the same, but the latter is now recommended).
- Fixed description of
dev-requirements.txtto indicate it installs development, not production requirements. (Thanks Yngve for reporting!) - Fixed 500 error when trying to accept an invitation that was already accepted.
- Removed duplicate DB lookups on invitation acceptance page.
- Set avatar image filenames to be randomly generated. This fixes an issue where, under certain media configurations, uploaded profile pictures with the same filename could “clobber” each other.
- Fix test failures when manifest storage was configured, by overriding the
STORAGESsetting in affected tests. - Fixed 500 error when attempting to manage social app connections from the profile page, due to extending a deleted
allauthtemplate. - Attempt to add more
INTERNAL_IPStosettings.pywhen using Docker in development, to get Django debug toolbar to show up. (Thanks Artem for reporting/contributing!) - Fixed issue with missing
$PORTreference caused fly.io deployments to sometimes fail.
Removed
Section titled “Removed”- Removed migration to auto-create social apps in the database.
- Cleaned up template imports in a few places.
Upgrade notes
Section titled “Upgrade notes”The TeamsMiddleware change may change the access rules of views that were relying on the absence of request.team,
to control authorization, instead of using login_and_team_required or similar approaches.
The removed migration file (/web/migrations/0002_create_allauth_providers.py) should not be removed if you have
already run the migration on your environment. Keeping it in the repository won’t do any harm.
December 12, 2023
Version 2023.11.1
Section titled “Version 2023.11.1”This is a hotfix release that fixes an issue with calling dj-stripe’s get_subscriber_model utility when teams were
enabled by adding an email property to the Team object.
The email property was accidentally not added for certain build configurations.
You can manually apply this change by adding the following property to the Team model, in apps/teams/models.py:
@propertydef email(self): return self.membership_set.filter(role=roles.ROLE_ADMIN).first().user.emailThanks to Charley and Emilien for reporting!
Nov 10 2023
Version 2023.11
Section titled “Version 2023.11”This is a hotfix release that fixes the Node.js docker installation according to these nodesource changes.
You can also manually apply this change by replacing the current node installation steps with the following
code in your Dockerfile.dev and Dockerfile.web.
# install node/npmRUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | \ gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
RUN echo \ "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | \ tee /etc/apt/sources.list.d/nodesource.list && \ apt-get update && \ apt-get install nodejs -yqqThanks to Finbar on Slack for reporting and suggesting the fix!
November 1, 2023
Version 2023.10.1
Section titled “Version 2023.10.1”This is a minor release addressing a few small issues raised in the 2023.10 release.
- Upgrade docker containers from
python:3.11-bustertopython:3.11-bullseye. This change substantially improves performance on certain Mac builds. - Upgrade django to the latest 4.2.6 security release.
- Reduce db queries on the e-commerce home page.
- Don’t show “buy” links on the e-commerce page if the products do not have a default price set.
- Change default value of
ALLOWED_HOSTSto["*"]and allow overriding it via an environment variable. - Clean up whitespace in
user_dashboard.html.
Oct 9, 2023
Version 2023.10
Section titled “Version 2023.10”This is a major release with three big updates: Async/Websocket support, an E-Commerce application, and an admin user dashboard.
Async / Websocket support
Section titled “Async / Websocket support”Pegasus now supports asynchronous Django and Websockets. Included is an example group chat application that leverages these capabilities. Watch the video below for more details, or see the new async / websocket documentation:
E-Commerce (One-Time Payment) Application
Section titled “E-Commerce (One-Time Payment) Application”The previous Stripe Payments example has been converted into a full-blown E-Commerce store. You can manage your products in Stripe and sync them to your application with a few lines of configuration. Customers can purchase specific items and everything is linked to your Stripe dashboard.
Watch the video for more details, or see the new E-Commerce documentation::
Admin Dashboard
Section titled “Admin Dashboard”An admin-facing dashboard has been added. The dashboard lets you see User sign ups to your application over time, and is filterable by date range. It’s a useful tool to see how your app is growing, and a good launching point for building out more dashboard capabilities.
Screenshot:

Below are the complete release notes including several other substantial changes and supporting work for the above.
- Added asynchronous and websocket support via a new build option. Documentation.
- Related: Added the group chat example application if you enable asynchronous support.
- Related: Added
websocket_reverseandwebsocket_absolute_urlhelper functions and tests. - Related: Added
.pg-message-senderhelper CSS class. - Related: If building with async your app will use
asgiinstead ofwsgi.
- Added the E-Commerce example application via a new build option. Documentation.
- Added the admin dashboard.
- Related: Added an admin-only user signup API
- Added a
pg-linkhelper class to style links (especially on Tailwind and Material builds). Also applied this style to a few places. - Added basic tests for some of the example views.
- Added an example of customizing existing DaisyUI themes to the Tailwind docs.
- Added
absolute_urltemplate tag for generating full URLs in e.g. email templates, and added tests for it.
Changed
Section titled “Changed”- Added the
feature_gate_checkandget_feature_gate_checkhelper functions, for more fine-grained control of feature gate checking. See the updated feature-gating documentation for more information.- Related: Modified the
active_subscription_requireddecorator to use this function.
- Related: Modified the
- Reduced number of DB queries made when provisioning a subscription.
- Made subscription provisioning an atomic action to reduce race conditions between Stripe Checkout callbacks and webhooks.
- Stripe subscription webhooks now explicitly only process checkout sessions that were created by the subscriptions application. This was done to enable apps to handle both e-commerce and subscription payments, and is handled by adding (and checking) a “source” value on the checkout session metadata.
- Created a
TestLoginRequiredViewBasebase test class, to test logged-in views, and updated existing tests to use it. - Removed uppercase characters from
TestLoginRequiredViewtest methods. - Upgraded Chart.js to the latest version, and moved it to be installed from NPM instead of a CDN.
- Changed the example charts to use the NPM-installed Chart.js.
- Moved
get_stripe_moduletoapps.utils.billingso it can be used by the e-commerce app and subscriptions. - Upgraded
django-allauthto latest version (0.57.0).- Related: Added a migration to create default
SocialAppmodels for all enabled providers, otherwise the signup and login pages crash. - Related: Blank out help-text on the sign up form’s password input.
- Related: Added
allauth.account.middleware.AccountMiddlewaretoMIDDLEWARE - Related: Fixed links to allauth docs in the generated README file.
- Related: Added a migration to create default
- Upgraded Django to the latest 4.2.5 security release.
- Set
DEBUG=Falsewhen runningcollectstaticon production Docker builds. - Added some fields to the default
CustomUserSerializer. - Added
created_atfield to chat message admin list display / list filter. - Removed some unused imports from subscription views.
- Refactored chat message list into a standalone template.
- Fixed absolute paths to Android-specific favicons to be relative. (Thanks Alexander for reporting!)
- Fixed issue where mobile menu content sometimes did not appear in front of page content on Tailwind builds.
- The object lifecycle home example view now requires login.
- Fixed issues with calling dj-stripe’s
get_subscriber_modelutility when teams were enabled, by adding anemailproperty to theTeamobject, and implementingDJSTRIPE_SUBSCRIBER_MODEL_REQUEST_CALLBACK, and added a test case that confirms this works moving forwards. - Fix styling of date inputs on all CSS frameworks.
- Fixed tab highlighting of the “impersonate a user” navigation on the Bootstrap Material theme.
Removed
Section titled “Removed”- Removed the previous Payments example. Apps should refer to the new E-Commerce app to use one-time payments.
- Related: Removed all migrations from the example app, which now has no models.
- Related: Removed the previous Payments documentation.
- Removed the “removing Stripe” cookbook from the documentation. Stripe is no longer included unless you build with the E-Commerce example or Subscriptions enabled.
Upgrade Notes
Section titled “Upgrade Notes”- To migrate an existing application to use asynchronous / websockets, you will have to set
DEBUGin your production environment (notsettings_production.py). More information in the async documentation.
Oct 4, 2023
Version 2023.9.2
Section titled “Version 2023.9.2”This is a hotfix release that bumps django-environ from 0.11.1 to 0.11.2 which
fixes an issue with ”$” in certain situations in environment variables. details
Thanks Geoff for reporting!
Sep 22, 2023
Version 2023.9.1
Section titled “Version 2023.9.1”This is a hotfix release with a few small fixes and updates:
- Updated the version of
celery[redis]to5.3.4since5.3.3was inexplicably deleted from PyPI. - Fixed a crashing issue on the two-factor auth configuration pages caused by the recent
allauth-2faupdate. (Thanks Matthew for reporting and suggesting the fix) - Added tests for a few logged-in views, including one that would have caught the two-factor issue above.
- Properly show errors if you enter the wrong two-factor token when trying to remove two-factor auth from your account.
Sep 18, 2023
Version 2023.9
Section titled “Version 2023.9”2023.9 has two main updates: Stripe embedded pricing table support, and a substantially improved Wagtail experience.
Stripe Embedded Pricing Table
Section titled “Stripe Embedded Pricing Table”This release adds support for Stripe’s embedded pricing table, which is a far simpler alternative to creating a pricing page than doing it natively in your application.
The pricing table was added as a new build configuration option. Once enabled, the previous subscription UI will be replaced by Stripe’s UI, and all changes to the pricing table can be made directly within Stripe.
The pricing table option opens up a number of new billing options, including multi-currency support and free trials, though it does not support per-unit billing very well. For complete details, see the updated subscription documentation.
Wagtail Enhancements
Section titled “Wagtail Enhancements”The big Wagtail change is that most content pages now use Wagtail’s StreamField instead of RichTextField.
This allows you to stitch together arbitrary blocks of content in all your pages, instead of being
forced into a single rich text model. It also enables re-use of individual structured components.
You can read more about Wagtail StreamField here.
There were also several smaller improvements.
If you’re upgrading from a previous version, see the upgrading notes below.
Complete release notes
Section titled “Complete release notes”- Stripe: Added embedded pricing table support, via a new build option.
- Wagtail: Added
social_imagefield to all content models (usingBaseContentPage), so you can define a custom image to use forog:metatags for any individual page. - Wagtail: Added a
CaptionBlock, for captioning images or code, which you can use as a reference to add additional block types to your app. - Wagtail: Added a migration to port previous
RichTextFields toStreamFields. - Added tests for
get_image_urltemplate tag.
Changed
Section titled “Changed”- Wagtail: Migrated
ContentPage.bodyandBlogPage.bodyto useStreamFieldinstead ofRichTextField. This provides much more flexibility in laying out your pages and working with many different section types. - Wagtail: All content models now extend from
BaseContentPageso that you can add fields that should be shared among all your different types of content. - Wagtail: Updated the
bootstrap_contentmanagement command to be compatible with the new structure. - Upgraded nearly all Python packages to their latest versions.
django-allauthwas not upgraded, due to it having a large release just a few days ago. - Upgraded all JavaScript packages to their latest versions.
- Subscriptions: official support for multiple currencies (docs) (Stripe pricing-table only)
- Subscriptions: official support for free trials (docs)
- Subscriptions: Overhauled the Subscriptions documentation to make it clearer, and add the new pricing UI setting.
- Subscriptions: Moved the
checkout_successendpoint to be a globalconfirmendpoint instead of a team-specific endpoint. - Subscriptions: Improved display of subscription price line items when using metered billing.
- Subscriptions: Fixed bug that caused trialing subscriptions to not be counted as active.
- Subscriptions: Show the correct currency in subscription details page if using Stripe’s multi-currency support. (Thanks Mario for reporting.)
- Fixed bug in
get_image_urltemplate tag that prevented it from properly resolving relative media URLs. Also added tests for this case. - Updated the
bootstrap_subscriptionsmanagement command to be compatible with the latest version ofdj-stripe. - Fixed a bug where the active products API would always crash if you had not defined
ACTIVE_PRODUCTS
Removed
Section titled “Removed”- Removed no-longer-supported
DJSTRIPE_USE_NATIVE_JSONFIELDsetting.
Upgrade notes
Section titled “Upgrade notes”It is recommended to read through the dj-stripe 2.8 release notes to confirm you aren’t affected by any backwards-incompatible changes.
Customers switching to the new Stripe embedded pricing table will need to move any product
information (including names, descriptions and feature lists) from metadata.py into their
Stripe product and pricing page configuration.
Customers upgrading from existing wagtail installations that have been customized may need to do additional
work to update their content models to StreamFields. Look at the 0002_convert_stream_fields.py migration
and apply the same pattern to any other fields you want to migrate.
September 1, 2023
Version 2023.8.2
Section titled “Version 2023.8.2”This is another bugfix release that fixes docker-based deployments (Digital Ocean, Heroku Docker, and fly.io).
To get the fix you don’t need to upgrade, just change the node version in your Dockerfile.web from 16 to 18.
The updated line should look like this:
RUN \ echo "deb https://deb.nodesource.com/node_18.x buster main" > /etc/apt/sources.list.d/nodesource.list && \Thanks Matthias and Alexander for reporting this.
Aug 30, 2023
Version 2023.8.1
Section titled “Version 2023.8.1”This is a bugfix release that fixes deployment to render.
To get the fix you don’t need to upgrade, just add these two lines to your envVars section in render.yaml
to explicitly bump the node version used from 14 to 18.
- key: NODE_VERSION value: 18.17.1Thanks Greg and Michiel for the bug report and suggested fix.
Aug 21, 2023
Version 2023.8
Section titled “Version 2023.8”This release adds official support for three marketing email platforms (Mailchimp, ConvertKit, and Email Octopus), adds dark mode on Tailwind builds, and has the usual smaller updates and fixes.
- First class support for marketing email lists. You can now select a platform (Mailchimp, ConvertKit, Email Octopus, or none), and your build will be customized for that platform, including settings/environment variables, and automatically subscribing new sign ups to your email list (if properly configured). See the updated mailing list documentation for more details.
- Added a management command to send test emails:
./manage.py send_test_email [email protected]. Useful when troubleshooting/changing how your server sends email. - Added dark mode support for TailwindCSS builds. Your app should automatically use dark mode if the user’s browser is configured for it. Components that weren’t properly styled for dark mode now are. If you spot any issues please report them!
- The
get_next_unique_slughelper function can now take filter arguments, so you can have unique fields dependent on other fields (for example, if you want to have slugs which are unique per team). - Added tests for
get_next_unique_slug(including testing the new functionality). - Added view tests for the signup process with various edge-cases around team names.Docker
- Added a
Makefiletarget, and documentation for rebuilding the API client with Docker. Documentation (Big thanks to Finbar for helping on this)
- Removed empty JavaScript files in certain builds that were causing
npm type-checkto fail. (Thanks George for reporting!) - Only try to log mailing list errors to Sentry if building with Sentry enabled.
- Fixed a bug in
get_next_unique_slugthat was failed if you passed in a customslug_field_name. Also added a test that would have caught it. - Fixed a bug where unicode team names were creating teams with an empty slug, which was causing a crash on logging in.
- Fixed a typo in the
Makefile(thanks Arno for reporting!) - [Documentation] Fixed issue in the digital ocean setup docs that was accidentally resulting in the creation of two Postgres databases, one of which was unused. (Thanks Thomas for reporting!
- Removed links to user profile and signout views from the app navigation if there is no signed in user.
Changed
Section titled “Changed”- Upgraded all JavaScript packages to their latest (as of late July) versions.
- Use the project’s slug in the
package.jsonname instead of “pegasus”. - Changed Twitter change social card format to
summary_large_image - In the ChatGPT functionality, new chats are now not created until the first message is sent to them (HTMX only). This prevents empty chats from being created.
- Improved link styling of chats on tailwind builds
- Changed “loading-dots” CSS class to “add-loading-dots”, to prevent conflict with DaisyUI class with the same name.
- Users’ chats are now sorted by last modification time, descending.
- Profile picture validation now includes backend file-type checks, to avoid users uploading incorrect/malicious profile pictures. (Thanks Edward for reporting)
- Stopped explicitly specifying a
platform:indocker-compose.yml, and instead always fall back to the OS’s default platform. - Added
.jsx,.ts, and.tsxas content roots intailwind.config.js.
Upgrading
Section titled “Upgrading”If you were previously using the mailchimp email functionality, you will need to edit your project and select “Mailchimp” under “Email Marketing Platform” to keep using it.
Aug 8, 2023
Version 2023.7
Section titled “Version 2023.7”This is a large maintenance release with many improvements and a few new features.
- Expanded the built-in timezone support (if building with internationalization). This includes:
- A new timezone setting on the User model/profile.
- A middleware that sets and unsets the timezone based on the user’s setting.
- A built-in list of default timezones.
- Added the option to remove compiled static files at Pegasus build time.
If checked, your Pegasus build will not include any static files, and they will be added to the
.gitignorefile. This is useful to check after you have set up static file builds as part of a CI/CD pipeline. - Added optional support for enabling Django’s admin docs via a new project setting.
- Added improved Docker support for ARM / Mac M2 architectures, via a new project build option. This should improve the performance using Docker for affected OS’s.
Changed
Section titled “Changed”- Removed all React dependencies and supporting code when building without React and without the built-in examples.
- Made order of example navigation and example homepage cards consistent.
- Placed HTMX object lifecycle demo before the Vue one.
- Better styling of terms link in signup forms (Tailwind builds only)
- Moved
page_jsblock to the bottom of the<body>in the base template. This allows using other imported libraries (e.g. site-bootstrap.js) in inherited templates. (Thanks Finbar for suggesting) - Switched
UserLocaleMiddlewareto use the “new” style of Django middleware, using__call__instead ofprocess_requestandprocess_response. - Bumped Django version to the latest 4.2.3 security release.
- Refactored how custom components are added to Tailwind to follow the official guidance on
build-time imports.
This fixes an issue where multiple style declarations of some classes were included, causing some CSS overrides
to not work out of the box. It also results in improved CSS compile times and reduced output file sizes.
Additionally, some tailwind styles were moved out of the main
site-tailwind.cssfile and into other imported files. (Thanks Tyler for reporting and suggesting the fix!) - More gracefully handle when a Stripe subscription is deleted (usually in test mode), by logging an error and clearing it from the associated user/team object.
- Added try/catch around Docker hostname setting for debug toolbar, which failed when running outside Docker on some OS’s. (Thanks Geoff for the reporting/fixing)
- Moved inline comments in
.env.examplethat failed on some environments. (Thanks Geoff for reporting/fixing) - Stopped running
collectstaticwhile building Docker containers on Google Cloud Run deployments, since the static files are managed outside the container for that platform. (Thanks Alexander for reporting)
Jul 9, 2023
Version 2023.6.1
Section titled “Version 2023.6.1”This is a hotfix release that fixes a bug in the new Alpine.js form/attrs released in 2023.6 for some CSS Frameworks.
Jun 17, 2023
Version 2023.6
Section titled “Version 2023.6”This is a minor release with some form updates and a bugfix for material Bootstrap builds.
- Added the ability to specify attrs on form fields, along with special helper parsing for Alpine.js forms.
- Added a forms example using Alpine.js to demonstrate Alpine.js form functionality, including hiding/showing a field based on the value of another field, rendering field values in labels, and changing the style of a field based on its value. The example is available at http://localhost:8000/pegasus/forms/alpine/.
- Added documentation on forms in Pegasus.
- Added
.pg-bg-dangerand.pg-bg-successhelper classes for setting success/danger background colors.
- Fixed some styling issues with Bootstrap 5.3 and the material theme.
- Fixed the documentation for how to customize variables when using Bootstrap.
Jun 12, 2023
Version 2023.5.1
Section titled “Version 2023.5.1”This is a small hotfix release, that includes a fix to a build error when using Bootstrap 5.3 (release yesterday).
Details:
- Fix build errors when using Bootstrap 5.3 (Thanks Allan for reporting/fixing).
- Remove
WAGTAILADMIN_BASE_URLsetting if not building with wagtail. - Remove some accidentally included tailwind CSS files when not building with tailwind.
- Update the default copyright year in site footer to 2023 if JavaScript was not enabled.
- Add
date_joinedto user admin list display / filter. - Cropped message content in Chat admin page.
- Added a note to README about configuring Redis if not using Docker (thanks Chris for suggesting)
May 31, 2023
Version 2023.5
Section titled “Version 2023.5”The big feature this release is a major enhancement to the OpenAI ChatGPT integration. This release also upgrades to Django 4.2 LTS and comes with the usual fixes and improvements.
Chat UI Overhaul
Section titled “Chat UI Overhaul”Here’s a 3-minute demo video of the new ChatGPT functionality:
Details:
- Made the Chat UI interactive using HTMX/React (depending on your project configration) and Celery, and greatly improved chat styling.
- Moved chat example to a new chat app.
- Added a chat history model and use it so that chats now have memory.
- Added a chat list view unique to each user.
- Added a
render_markdowntemplate filter, for converting Markdown to HTML in a template - Added serializers and admin for chat models.
- Automatically set chat names based on the contents of the first message.
- Add ability to set which chat model you use with the new
OPENAI_MODELsetting. - Add
chat.css/chat.sassfiles for framework-specific chat styling, with many helper UI classes related to the chat UI. - Removed previous Chat UI, including
PromptFormclass, and related view/template.
Other updates in this release
Section titled “Other updates in this release”- Added
makemigrationsandmigratesteps to README on sqlite builds (thanks Patrick for suggesting). - Added
{% block top_nav_app %}toapp_base.htmlto the material theme, so that the app nav can be overridden in sub-templates - Added make targets for running black (
make black), isort (make isort), and both (make format) - Added
devtool: "eval-cheap-source-map"towebpack.config.jsto prevent source map warnings on Chrome. (Thanks Brett for suggesting)
Changed
Section titled “Changed”- Upgraded Django to 4.2 LTS, Wagtail to 5.0, and a handful of other Python packages to their latest versions.
- Switched from deprecated
DEFAULT_FILE_STORAGEandSTATICFILES_STORAGEsettings toSTORAGESsetting (added in Django 4.2). - Set
EMAIL_SUBJECT_PREFIXto be your app’s name. This will be prepended to server admin emails. - Added a 5MB file size limitation to profile pictures, and delete old profile pictures when new ones are uploaded. (Thanks Jonathan for the suggestions!)
- Fixed a bug where the app would crash if people signed up but already had an account, when teams were enabled.
- Fixed crashing issues with running
./manage.py bootstrap_content(and, resultingly,make init) multiple times in a row. - Removed accidentally included
team_nav.htmlfile on some CSS frameworks when teams was not enabled. - Fixed a bug where the
teams/manage/<path:path>url route was accidentally included in HTMX builds and not included in React builds. - Fixed a bug where profile picture upload styling wasn’t applied on some CSS frameworks.
Removed
Section titled “Removed”- Removed deprecated
USE_L10Nsetting.
May 18, 2023
Version 2023.4.2
Section titled “Version 2023.4.2”Another small hotfix release:
- Fixes crash on
robots.txtif you built without wagtail. - Added tests that would have caught the above issue (and also check other important pages).
- Removed unused
TermsSignupFormwhen building with teams enabled.
Apr 25, 2023
Version 2023.4.1
Section titled “Version 2023.4.1”This release fixes two bugs:
- Fixes crash on sign up under certain conditions when teams was not enabled.
- Fixes crash when saving user profile data when API keys were not enabled.
Thanks to Simon for reporting these!
April 21, 2023
Version 2023.4
Section titled “Version 2023.4”This is a large maintenance release with many upgrades, cleanups, and a few small fixes. The biggest changes are upgrading the default Python version to 3.11, Node version to 18, and Docker compose version to 2.
Python 3.11 update
Section titled “Python 3.11 update”This release makes Python 3.11 the default supported version for everything in Pegasus. Details:
- Changed default Python version to 3.11. Older version of Python (back to 3.8) are still expected to work, but are no longer actively tested.
- Updated references in README and docs to use 3.11 everywhere.
- Updated development Docker image to use 3.11.
- Updated all deploy targets to default to 3.11.
- Updated
blackandisortconfigs to 3.11. - Updated Github Actions to run tests on 3.11 only. Older versions can still be added back manually.
- Upgraded most Python packages to latest compatible Python 3.11 versions. Django was not upgraded to 4.2, because Wagtail has not released support for it yet. If you aren’t using Wagtail, you can upgrade to 4.2 now with no known issues.
Node 18 update
Section titled “Node 18 update”This release makes Node 18 the default supported version for everything in Pegasus. Details:
- Changed default Node version to 18. Node 16 is still expected to work, but is not actively tested.
- Updated references in README and docs to use 18 everywhere.
- Updated development Docker image to use 18.
- Updated all deploy targets to default to 18.
- Updated Github Actions to run tests on 18 and 19 only. Older versions can be manually added back.
- Upgraded all node packages to their latest versions.
Docker compose update
Section titled “Docker compose update”This release switches Docker compose to use version 2. Version 1 will be removed from Docker in a few months. More details in the Docker docs.
Details:
- Switched all instances of
docker-compose(v1) todocker compose(v2) in theMakefile. - Update all documentation to use
docker composeinstead ofdocker-compose
Requirements update
Section titled “Requirements update”This release updates the Python requirements files (again). Apologies for the iteration on this---trying to find the best long-term workflow and hopefully this is it.
- The
requirements/dev-requirements.txt(and.in) file no longer includes everything inrequirements/requirements.txt. It now only has the requirements used only in development. And is (still) constrained to use the same requirements asrequirements/requirements.txtif any duplicate packages are included, as described here. - Added a
dev-requirements.txtfile in the root of the project to install both normal and dev-requirements. - Updated usages of dev-requirements to use the new system, e.g. in Github Actions.
Other changes
Section titled “Other changes”Smaller updates in this release are below.
- You can now automatically remove the teams example. Uncheck “include Teams example” in your project settings.
- Added an “I agree to terms” checkbox on sign up for all CSS frameworks.
- Added link to impersonate a user to the app navigation on tailwind builds.
- Added a basic
robots.txtfile that disables crawling on the admin and wagtail admin sites. (Thanks Alex for suggesting) - Added
OPENAI_API_KEYto.envfile if building with OpenAI examples enabled.
Changed
Section titled “Changed”- Switched template setting to use
loadersinstead ofAPP_DIRSand disable template caching in development (thanks Michael for suggesting) - Add apps directory to places Tailwind looks for templates, so that any CSS classes defined there are properly applied.
- Fixed a bug where
./manage.py bootstrap_contentdidn’t work if you didn’t have translations enabled. - Fixed a bug where
blackandisortoccasionally conflicted on import styles. - Changed a few single-quotes strings in commented code to use double-quotes to match black styling.
- Added a missing trailing slash in a teams url.
- Added a default empty string to
AWS_ACCESS_KEY_IDinsettings.py(this avoids potential crashes runningcollectstaticif it wasn’t set in the environment). - Fixed a bug where custom form classes were not applied to input fields on Tailwind. (thanks Lars for reporting)
- Always include
"allauth.socialaccount"inINSTALLED_APPS, otherwise deleting users fails. (thanks Jonathan for reporting)
Removed
Section titled “Removed”- Removed internal subscriptions API endpoints from the generated API documentation and API clients.
If you’d like to keep these, you can remove the
exclude=Trueline from theextend_schemadeclaration insubscriptions/views/api_views.py, and then rebuild the API client.
Documentation
Section titled “Documentation”- Overhauled the documentation on working with virtual environments and made
venvthe default recommendation overvirtualenv.
Upgrading / breaking changes
Section titled “Upgrading / breaking changes”- If you don’t have Docker compose V2 installed you will need to install it to continue using the
Makefile. This is recommended, since V1 is being removed from Docker Desktop soon. - There are no known breaking changes related to the Python and Node upgrades, but it is recommended to upgrade your projects if you haven’t already. You may need to rebuild your Python requirements on older versions to get backports packages.
April 20, 2023
Version 2023.3.5
Section titled “Version 2023.3.5”A hotfix release, which fixes an issue introduced in 2023.3 where alpine.js was not properly
included in the base template if you built with React instead of HTMX.
This resulted in the subscription selection UI not appearing properly.
March 25, 2023
Version 2023.3.4
Section titled “Version 2023.3.4”Another minor release with a few small fixes.
Changed
Section titled “Changed”- Add
restart: unless-stoppedto web container docker-compose config, so that the web process still restarts on things like syntax errors. (Thanks Moritz for suggesting) - Code formatting checks in Github Actions now run on the entire codebase instead of just the diffs in pull requests.
- Upgraded
cryptographyto version39.0.2which patches some high-severity vulnerabilities. (Thanks Michael for reporting) - Fixed an issue with
boto3accidentally not being included in requirements files when you enabled S3 media. (Thanks Elliott for reporting) - Fixed an issue caused by this issue behavior in Github Actions that always caused code formatting checks to fail. (Thanks Elliott for reporting)
March 22, 2023
Version 2023.3.3
Section titled “Version 2023.3.3”The main feature in this minor version is an OpenAI demo, showing how you can quickly integrate ChatGPT and DALL-E 2 into your Pegasus apps.
Here’s a 3-minute demo video:
There are also some small fixes (details below).
- ChatGPT and DALL-E 2 demos. To use these you need to check the “OpenAI demos” box in your project settings.
- You can now disable translations when building, which removes locale files and related code.
Changed
Section titled “Changed”dev-requirements.inandprod-requirements.innow constrain package versions to those included inrequirements.in. This should prevent library version conflicts between files.- Remove
apps.utils.slugand related test code if not building with teams enabled. - Remove entire JavaScript API client if not building with any APIs enabled.
- Remove
storage_backendsif not building with S3 media support.
- Removed extraneous packages that were accidentally be included in
dev-requirements.txteven if you had built without certain features enabled. If you saw a big diff after runningpip-compile requirements/dev-requirements.inon a recent build, this was why. - Made all package versions consistent between
requirements.txtanddev-requirements.txt
March 14, 2023
Version 2023.3.2
Section titled “Version 2023.3.2”This release fixes two small bugs (introduced in 2023.3):
- Fixed a syntax error in
render.yamlthat caused deployments to fail. Also removed unnecessary variables from that file if you weren’t using subscriptions or sentry. - Fixed an issue in the code formatting CI setup that caused the formatting checks to fail on commits made directly to a branch. Now formatting CI is only run on pull requests.
March 6, 2023
Version 2023.3.1
Section titled “Version 2023.3.1”This release fixes a bug (introduced in 2022.12) that caused the AUTH_PASSWORD_VALIDATORS setting to be ignored
when building with teams enabled.
You can also manually patch this bug with the following change:
In apps/teams/forms.py replace this line:
cleaned_data = super(SignupForm, self).clean()with
cleaned_data = super().clean()Apologies to any affected users! Will be adding a test for this in a future release.
March 5, 2023
Version 2023.3
Section titled “Version 2023.3”This release includes several new features as well a lot of maintenance work. These are the biggest changes:
Code formatting
Section titled “Code formatting”Pegasus will (optionally) now auto-format your Python code using black. In addition to formatting, Pegasus now ships with pre-commit hooks---which you can install to ensure your code matches the expected format---and adds format checks to your Github actions CI. Much more detail can be found in the new code formatting docs. This option is enabled by default for new projects, and it’s recommended that all existing Pegasus projects upgrade to this format, as it will make future merges/upgrades much easier. Guidance on upgrading can be found here.
S3 production media support
Section titled “S3 production media support”You can now use S3 to store your project’s production media with just a few lines of configuration. To use S3, enable the “Use S3 for storing public media files” option in your project’s configuration, and then follow the new S3 media documentation.
Django debug toolbar
Section titled “Django debug toolbar”Pegasus now (optionally) ships with the popular django-debug-toolbar package. You can enable this option in your project configuration, and it will be enabled by default in development environments and turned off in production. More details in the documentation.
Alpine.js support
Section titled “Alpine.js support”The Alpine.js library has been officially added as a dependency to all Pegasus builds. Using Alpine allows replacing large amounts of custom JavaScript with a small amount of markup. The subscriptions UI was updated to use Alpine, and more features will move to Alpine in the future.
Below is the complete changelog for this release:
- Added pre-commit/black support, as described above and in the code formatting docs
- Added django-debug-toolbar, as described above and in the
debug-toolbardocumentation - Added S3 media support, as described above and in the S3 media documentation.
- Added Alpine.js as a top-level JavaScript dependency, included on all pages.
- Added
dev-requirements.inanddev-requirements.txt, for requirements that should only be installed in development (e.g.pip-tools,debug-toolbar,black, etc. - Added health checks to Docker postgres and redis, to ensure they are ready before other containers start. (thanks Moritz for suggesting!)
- Added a
make npm-devcommand to build front end for development in Docker. - Added a wrapping
metablock tobase.htmlto make overriding the page-level metadata more flexible. Wagtail blog post pages now use this to override the page title and description for social sharing. - Added
.direnvand.envrcfiles to.gitignore - Added global
[x-cloak]style to hide elements in Alpine.
Changed
Section titled “Changed”- Migrated subscription selection flow from JavaScript to Alpine.js and deleted a lot of custom JavaScript code that was no longer necessary as a result.
- Updated
ProductWithMetadataserialization format remove monthly/annual/default prices, and add a dictionary of prices based on billing interval. - As a result, Pegasus now supports more than two billing intervals (you can now add any of Annual / Monthly / Weekly / Daily)
- Migrated help text under the billing interval selector to the
PlanIntervalMetadatahelper class and removed front-end styling. - Added
payment_amountfield to the Product/Price API serializer. - Removed stripe packages, dependencies, and all related code/styles if you build without subscriptions and without examples. (thanks Brett for suggesting!)
- Moved stripe
card_element.htmlcomponent topegasus/examples/payments/components/card_element.html, and only include it if you build with examples. - Upgraded generated API client to version 6.4.0, and regenerated the API client.
- Upgraded django to 4.1.7 and celery-progress to 0.2.
- Added
SOCIALACCOUNT_LOGIN_ON_GET = Truetosettings.py. This removes the extra confirmation page for social sign ups, improving the UX, though does open up a minor security risk outlined here. Remove this line if you prefer to keep the extra page. - Saving a user profile now shows a confirmation message. (thanks Viktor for suggesting!)
make upgradenow rebuilds yourrequirements.txtfiles and your front end. (thanks Brett for suggesting!)STRIPE_LIVE_MODEis now automatically set toTruein Render deployments. (Thanks Adrian for suggesting!)- Regenerated translation files for latest code changes.
- Removed “https” prefix from fly.io host checks, which caused them to fail.
- Fixed the url in the “Add a Password” link on the user’s profile to go to the set password page. This link is only visible if the user signs up via social auth. (Thanks Blake for reporting)
- Added a workaround for an allauth bug that causes occasional 500 errors when users tried to sign in
with a social account that was already tied to an existing email address, by using a
CustomSocialSignupForm. - Details here. (Thanks Simon for finding and fixing!)
- Fixed issue with
make npm-type-checknot being available if Wagtail wasn’t enabled. - Stop logging errors adding people to the mailing list if they were already on it.
- Improved styling of documentation link when subscriptions were improperly configured dn Tailwind builds.
Removed
Section titled “Removed”- Removed helper functions on
ProductWithMetadatarelated to monthly/annual pricing (e.g.monthly_price). - Removed the no-longer-used
get_payment_metadata_from_requesthelper function. - Removed the no-longer-used
catch_stripe_errorsdecorator. - Removed legacy styling markup from subscription details page. (thanks Viktor for reporting!)
Documentation
Section titled “Documentation”- Added write up about the front end files.
- Added write up about managing test vs live Stripe products
- Improved the internationalization/translation docs.
- Added a cookbook for how to enable auto-formatting on your existing project.
March 3, 2023
Version 2023.2
Section titled “Version 2023.2”This release was driven by feedback from the Pegasus community. It includes many library upgrades (including updating to the latest Django), the ability to build without the Pegasus examples, and small changes and fixes.
- You can now build Pegasus projects without the built-in examples.
- More type hints to return values in subscriptions module.
SubscriptionWrapperobject now has aproductsproperty to get associated Stripe products.
Changed
Section titled “Changed”- Upgraded all Python libraries to their latest versions (including Django to 4.1.6)
- Upgraded all JavaScript libraries to their latest versions.
- Update HTMX installation to use the webpack build pipeline. (HTMX builds only)
- Set CSRF token on the site body, for usage in HTMX, as outlined here.
- Added site name to admin sign up notification.
- Built-in admin emails now fail silently and don’t cause sign-up errors if email sending fails.
- Made it possible to configure
ACCOUNT_EMAIL_VERIFICATIONseparately by environment, so it can be enabled in production but disabled in dev. - Made it possible to view/edit User’s selected language in the Django admin.
- Updated
make pip-compileto also compile your production requirements file (if relevant). - Fly.io HTTP checks will now run using the site’s configured HTTP HOST header.
- Fixed a bug introduced in 2022.12 that resulted in a duplicate team being created when users created an account while accepting a team invitation (Bootstrap and Tailwind only).
- Cleaned up styling of Monthly/Annual selector buttons on subscription UI (Tailwind only).
- Made icons in menus consistent sizes, to prevent minor alignment issues with wider/narrower icons (Tailwind only).
- Fixed an issue preventing user profile data from being saved if internationalization was enabled, but only a single language was configured.
Upgrading
Section titled “Upgrading”If you don’t want to upgrade Django to 4.1 this upgrade should be backwards compatible. Pin the Django version to 3.2.x in your requirements file and rebuild requirements.
Feb 1, 2023
Version 2022.12
Section titled “Version 2022.12”This is a maintenance release with many small fixes and quality-of-life improvements suggested by the community.
Happy holidays!
- Added a
make upgradetarget to update docker containers and a local database after upgrading. - Added a Redis instance to Github actions CI setup, so that any tests which depend on Redis can run without modification.
- Added default error pages and url routes for 400 and 403 errors.
Changed
Section titled “Changed”- Updated usage of
.envfiles. Python environments now use.env, docker uses.env.docker, and the example was renamed from.env.dev.exampleto.env.example. Details here. See upgrade notes. - Invitations can now only be accepted from the email address that was invited. See upgrade notes.
- Blog posts in wagtail are now listed in descending order (by date)
- Optimized the
Dockerfile.devso that requirements are installed prior to copying the complete source code of the project. This results in substantially reduced image build times when requirements have not changed. - Replaced instances of
%string formatting withstr.format() - Update
make pip-compileandmake requirementsbuild targets to also build production requirements. (thanks Brett!) - Updated error pages to use a shared base template.
- Added translation markup to a handful of places.
- Remove
customerfrom the user admin for team builds (this was causing the User admin to error for team-based builds if subscriptions were enabled). - Update the
bootstrap_contentmanagement command to publish content (in addition to creating it). - Fixed crashing error on
@active_subscription_requireddecorator if user was not logged-in. - Fixed image responsiveness on Wagtail blog posts on Bootstrap-based builds.
- Set
LOGIN_URLin settings, which prevents issues arising if you change the default location ofallauthurls. - Fixed image styling on the teams list page if you weren’t a member of any teams. (htmx builds)
- Fixed a minor markdown-styling issue in the README.
- Automatically sync Stripe API keys from settings/environment to database when running
bootstrap_subscriptions. This fixes the following error on new projectsc: “You don’t have any API Keys in the database. Did you forget to add them?” - Removed unused import of C3 styles from the charts example template.
- Fixed a static image reference on the example pricing page.
Upgrade notes
Section titled “Upgrade notes”.env updates
The moving around of .env files may impact existing development environments.
For those using Docker, it is recommended to rename your .env.dev to .env.docker.
Invitation changes
If you wish to preserve the previous behavior that allowed accepting an invitation from any email address:
- Remove the email address validation check in
apps.teams.forms.TeamSignupFormby deleting these three lines:
if invite.email != email: raise forms.ValidationError(_( 'You must sign up with the email address that the invitation was sent to.' ))- In
templates/account/signup.htmlmake the email field editable by changing the following line
<input type="hidden" name="{{ form.email.name }}" value="{{ invitation.email }}"/>to:
{% render_text_input form.email %}Dec 27 2022
Version 2022.11.1
Section titled “Version 2022.11.1”This release is a minor/hotfix update with a few small changes.
- Added
clear_cached_subscriptionhelper function toSubscriptionModelBase
Changed
Section titled “Changed”- Upgraded dj-stripe to 2.7.2. This fixes several crashing errors when using more complex subscription/billing models.
- Catch and fix Stripe errors when trying to view a cancelled subscription that has not been synchronized with Stripe
Nov 4 2022
Version 2022.11
Section titled “Version 2022.11”There are a number of big updates in this release.
Feature: Feature flag support
Section titled “Feature: Feature flag support”Pegasus now supports using feature flags with waffle. For full details, see the new feature flag documentation.
Included in the implementation:
- A custom
Flagmodel that allows turning features on and off for an entireTeam. - A new example page showing how to use feature flags in Python, Django templates, and JavaScript
- Added some helper CSS classes to display badges (used in the example)
Cleanup: Settings Overhaul
Section titled “Cleanup: Settings Overhaul”The main change is to move most configurable settings into environment variables (now managed by
django-environ), and reduce the number of settings files used.
Supporting/related work:
- Switch environment variables in settings to use
django-environand made more settings configurable via environment variables. - Support configuring database with single
DATABASE_URLsetting if defined. - Moved redis configuration to default
settings.pyand allow overriding with environment variables. - Renamed all platform-specific settings files (e.g.
settings_heroku.py) tosettings_production.py. - Removed
settings_docker.pywhich was used in development with Docker. Docker-specific settings are now overridden via environment variables in the.env.devfile. - Replaced usage of
django-herokuwith normal settings. Previously this was used to configure the database URL and whitenoise for Heroku. Both of those changes have been rolled into the default settings files.
Feature: Render deployment option
Section titled “Feature: Render deployment option”Pegasus now officially supports deploying to Render. See the new Render deploy documentation.
Feature: Fly.io deployment option
Section titled “Feature: Fly.io deployment option”Pegasus now officially supports deploying to fly.io. See the new Fly.io deploy documentation.
Feature + Cleanup: Subscription updates
Section titled “Feature + Cleanup: Subscription updates”Most of these changes are backend cleanups to help improve future Subscription work. Full support for multiple subscriptions and metered billing will hopefully be in an upcoming release.
Enabled backend support for subscriptions with multiple products.
Related changes:
- Switched all references of djstripe’s deprecated
Planmodel to use thePricemodel. - Updated Subscription serialization to support multiple items / prices / products and changed
PlanSerializertoPriceSerializer. - Changed suffix in property names in
ProductWithMetadataclass from_planto_price. active_subscription_requireddecorator now checks all prices/products associated with a subscription iflimit_to_plansis specified.- Removed
get_product_and_metadata_for_subscriptionandget_subscription_metadatafunctions. - Added
SubscriptionWrapperclass to help encapsulate more complex subscription logic to a single place, and use it instead ofSubscriptionobjects and lots of extra context variables in templates. - Added
InvoiceFacadeclass to provide a few utilities to help display a Stripe Invoice object.
Enabled backend support for usage-based/metered billing.
Related changes:
- Fixed crashes on subscription signup and details pages if your plan was configured with metered billing.
- Added demo form for reporting usage to Stripe for metered plans.
Changed the Stripe Customer object to be associated with the Team (instead of the User) for Team-based projects.
Related changes:
- Remove
customerfrom theCustomUsermodel and add it toSubscriptionModelBase(which will go to theTeamon team-based builds) - Set the
DJSTRIPE_SUBSCRIBER_MODELto the Team object, if using teams. - Updated logic that gets/sets the customer to use the Team instead of the user.
- No longer force using the logged-in User’s email address at checkout (for team based builds), so they can specify a different billing email.
- No longer re-use credit cards / Customers when the same user signs up for subscriptions in multiple teams.
See the upgrading guide below for details on navigating this change.
Other Changes
Section titled “Other Changes”- Upgraded font awesome to the latest version (6.2) and load the CSS from a CDN.
- Upgraded djstripe to version 2.6.2
- Added user and team metadata to the Stripe subscription object during Checkout, so Subscriptions can be more easily linked back to your app from the Stripe Dashboard.
- Added translation markup to a handful of pages.
- Switched Google / Twitter brand icons to be displayed inline, and use icon-sized images.
- Replaced “icon” CSS class with “pg-icon” to avoid conflicts with framework classes. In particular, this fixes some issues with Creative Tim themes beyond what’s included in Pegasus.
- Removed icons from subscription plan selector.
- Use whitenoise for static files in development if deployment is configured for it. This makes development environments more like production, though is largely invisible.
- All docker-based deployments now build front end assets as part of the deploy step. Previously this was only done for Heroku-based deploys.
- All docker-based deployments are now based off the
busterimage. - Added
--noinputto heroku migrations command. - Deployments that run Celery now run it with the
--beatoption by default, and a concurrency of 2. - Increased length of generated secret key in production environment files.
- Upgraded Node versions that run on CI to 16, 18, and 19 to reflect the current releases.
- Upgraded Github actions versions for several steps to fix Node deprecation warnings.
- Production Dockerfiles now run gunicorn by default (this can be overridden in the platform-specific tools, e.g. to run celery)
- Rebuilt the JavaScript API client to reflect the latest API views and serializers.
Other Fixes
Section titled “Other Fixes”- Fixed all schema warnings from
drf-specatcular, by adding inline serializers or annotations to several APIs. - Fixed styling bug in showing a user’s connected accounts on Tailwind builds.
- Properly hide delete button text on small screens in HTMX object demo.
- Replaced many instances of
transwithtranslateandblocktranswithblocktranslate. - Set the page title of Wagtail blog posts to the blog post title.
- Fix active tab highlighting in examples navigation for some CSS frameworks.
Removed
Section titled “Removed”- Deleted no-longer-needed static images for Twitter / Google logos.
- Removed unused “is-small” class from various icon markup.
- Removed unused styling block for
thelements insubscriptions.sass
Upgrading
Section titled “Upgrading”The major change that requires care in upgrading is the migration of the customer field from the User to the Team
for team-based builds.
If you do NOT have any live customers associated with your Users the migration process is standard,
just run ./manage.py makemigrations followed by ./manage.py migrate.
Note: this will drop all User—>Customer relationships.
If you DO have live customers associated with your Users, and you want to preserve this data, the migration process is more complicated:
First, add the following line back to the CustomUser model:
customer = models.ForeignKey(Customer, null=True, blank=True, on_delete=models.SET_NULL)Next, create and run migrations:
./manage.py makemigrations./manage.py migrateNext you need to move the Customer from the user to their team. You can do this by running:
./manage.py migrate_customers_to_teamsIf the customer only had a single subscription, it will be correctly applied to the right team. If the customer had multiple subscriptions, the command will print out errors which you must resolve manually. You can either choose to drop this information, or associate the customer with a single Team.
Once you are happy with how you’ve migrated the data you can remove the customer field from above
from the user, and run ./manage.py makemigrations followed by ./manage.py migrate to drop it from the user table.
Feel free to reach out in #support on Slack if you need any assistance with this process!
Nov 4 2022
Version 2022.10
Section titled “Version 2022.10”This release adds two-factor authentication, and has a number of smaller improvements and fixes.
- Two-factor authentication. Users can now set up two-factor authentication on their account (using Google Authenticator or similar), and will be required to enter a token to login. This is configured from the user’s profile page. More documentation here.
Changed
Section titled “Changed”- Improved UI feedback in React Teams UI and Employee example when the API client can’t load data.
- Wagtail and admin login pages now redirect to the main login page (this prevents users from bypassing two-factor authentication, if enabled).
- Added top navigation bar to tailwind account pages.
- The teams middleware will now raise a 404 if a user tries to access a page associated with a team they were not
a member of. Previously this was only enforced by the
login_and_team_requireddecorator, not the middleware. Also added/updated tests for this case. - Added type hints in a few more places.
- Made minor improvements to API schemas, including fixing some warnings that arose during schema generation.
- Upgraded generated API client to version 6.2.0, and brought in changes from above schema changes.
- Upgraded Django to the latest security LTS release (3.2.16)
- Fix an issue in Bootstrap builds where some material styles were being applied to the initial download even if you didn’t choose the material theme.
- Fixed a bug where certain pages would fail to load if teams were enabled but the logged in user was not a member of any teams.
October 6, 2022
Version 2022.9
Section titled “Version 2022.9”The major addition in this release is support for internationalization, a.k.a. translating your app into multiple languages. Here is a quick demo:
This includes support for text localization in Python, Django templates, JavaScript and Wagtail. Translations can be set anonymously (via a cookie) or based on the logged-in user’s selected language.
See the new Internationalization docs for more information.
Major related changes:
- Added a language selector to the site footer for users who aren’t logged in.
- Added a
languagefield to theCustomUsermodel and profile page. - Added
UserLocaleMiddlewareto set the user’s language whenever they are logged-in. - Update wagtail bootstrap code to generate localizable pages.
- Added translations markup to a substantial subset of code across Django views, templates and JavaScript. More translation markup will be added incrementally with new releases.
- Replaced
transtemplatetag withtranslatein a number of places.
Other Changes
Section titled “Other Changes”- Attach team models to the request in middleware instead of view decorator.
This means that
request.teamwill be available on every request, so team navigation will be available even on pages like a user profile that are not team-specific. For details see the updated teams middleware docs, as well as the upgrade notes below. - Added tests for the above middleware, and updated other tests to be compatible with it.
- Added a context processor so that
teamis always available in the template context. Also removed code settingteamin context inTeamObjectViewMixin.
- Don’t show pages on the blog index if they are published then unpublished (Wagtail only, thanks Peter for reporting!)
Upgrade notes
Section titled “Upgrade notes”- If you use teams and are upgrading from a older version you must make sure that your
middleware includes
apps.teams.middleware.TeamsMiddleware. It should be placed directly afterdjango.contrib.auth.middleware.AuthenticationMiddleware.
September 1, 2022
Version 2022.8.2
Section titled “Version 2022.8.2”This is another hotfix release. Thanks Daniel and Jacob for reporting bugs!
- Fix error loading API Schema file when building without API keys enabled.
- Added a test that would have caught the above error.
- Removed unused site-bundle.js file.
- Fix pyyaml requirements conflict when installing with Google Cloud enabled.
August 5, 2022
Version 2022.8.1
Section titled “Version 2022.8.1”This is a hotfix release with a few fixes from the last build. Thanks to Jim and Logan for quickly reporting issues!
- Fix environment variable name used for database port in settings.py.
- Removes accidentally added text from the landing page (Tailwind builds only).
- Added instructions to run
./manage.py makemigrationswhen setting up a database to the README.
August 3, 2022
Version 2022.8
Section titled “Version 2022.8”The major addition in this release is official support for Tailwind CSS. There were also a number of smaller fixes and improvements.
Official Tailwind CSS support
Section titled “Official Tailwind CSS support”Pegasus now officially supports Tailwind CSS! Here’s a 3-minute walkthrough:
Some of the larger changes to the Tailwind functionality include:
- Upgraded TailwindCSS to version 3 and all dependencies to the latest versions.
- Added a daisyUI dependency and overhauled most of the tailwind templates with daisyUI components.
- Overhauled navigation bar and menus, and added a daisyUI-based mobile dropdown menu for mobile navigation.
- All Tailwind pages are now mobile-friendly.
- Added
tailwindcss/typographyplugin for content. - Improved tailwind-based Django form rendering and integrated the forms with daisyUI components.
- Improved styling of app notifications/messages.
- Added modal dialogs to the team deletion and membership removal workflows (team builds only).
- Removed many no-longer-used classes form
site-tailwind.css.
See the updated Tailwind docs for more information and customization options.
Other Additions
Section titled “Other Additions”- Pegasus now ships with a default, customizable logging configuration. Documentation.
- Added several new helper CSS classes, including
pg-content(for content),pg-columns-reversed(for reversed columns),pg-align-items-center(a flexbox utility), and variouspg-text-classes for coloring text.
Other Changes
Section titled “Other Changes”- React-based team deletion now works like the HTMX version, with a pop-up confirmation modal. The “Delete” button was removed from the team list UI.
- Deleting a team/user will now automatically cancel any subscription associated with that team/user. (thanks Florian for reporting!)
- Updated many templates to use
pg-Pegasus helper CSS classes instead of CSS-framework-specific ones. Affected places include: several places in the Pegasus examples,app_home.html, the userprofile_form.htmland social account connections page, the React teams editing UI, subscription helper pages, default landing page, password reset pages, team invitation pages, user impersonation, wagtail / blog pages, 404 / 500 pages and more. - Replaced underscores with hyphens in example URLs.
- Increased margins between buttons and forms/controls in a few templates.
- Improved styling of the default email management page.
- Upgraded several NPM packages to the latest versions including Bootstrap version to 5.2.
- Overhauled CSS docs.
- Mark
help_textas safe in form_tags (allows adding links and other HTML to your help text) - Add trailing slash to urls in
apps/web/urls.py. - Updated default CI configuration to build all pull requests (was previously all pull requests to
mainonly)
Other Fixes
Section titled “Other Fixes”- Fixed bug where non-admins did not see a link to manage their own membership from the team details page. (React builds only)
- Fixed styling issues with some tables on small screens.
- Removed empty if/else block from
team_nav.htmlif building without subscriptions. - Fixed a bug in
@active_subscription_requireddecorator where an invalid subscription could cause a crashing error instead of redirecting to the subscription management page. (thanks Jon for reporting!) - In object home examples, list “four” technologies instead of “three”
August 1, 2022
Version 2022.7.1
Section titled “Version 2022.7.1”This is a hotfix release that fixes an “Undefined variable” error when building the front end with the Bootstrap Material theme, and Bootstrap 5.2.
More details on the root issue can be found here.
July 22, 2022
Version 2022.7
Section titled “Version 2022.7”This release was largely focused on addressing technical debt and further modernizing some of the front end code that ships with Pegasus.
Due to the large number of updates, a few major changes have been grouped together.
Added TypeScript support
Section titled “Added TypeScript support”The Pegasus front-end build pipeline now supports TypeScript. You can continue to write code in normal JavaScript, or introduce TypeScript incrementally on new code, on a file-by-file basis. Future versions of Pegasus are likely to incrementally port more code to TypeScript, similar to how types have been incrementally introduced into the Python code.
Related changes:
- Added TypeScript transpilation to the front end build pipeline.
- Added
npm run type-checkandnpm run type-check-watchtargets. - Added
make npm-type-checktarget for Docker environments. - Run type checks as part of the Github Actions front end build step
Upgraded all JavaScript packages
Section titled “Upgraded all JavaScript packages”The npm-check-updates command was run on the entire front end, and with the exception of TailwindCSS,
every package in package.json was upgraded to the latest version.
Some of the larger updates (for which there were also code changes to make them compatible) include:
- Upgraded Vue.js from version 2 to version 3 and made Employee app compatible with Vue 3.
- Upgraded React to version 18 and react-router to version 6, and updated all code to be compatible with new versions.
Overhauled the API documentation and API clients
Section titled “Overhauled the API documentation and API clients”This release removed the deprecated CoreAPI-based API schemas and JavaScript client and replaced it with OpenApi3 schemas (using drf-spectacular) and generated client code. For more information on using APIs in your Pegasus app, see the new API docs.
Details related to this change:
- Added new
drf-spectacularPython dependency and removed thecoreapiPython dependency. - Added
@extend_schemamarkup to most APIs to improve and simplify the generated OpenAPI3 schemas - Added new default endpoints for the OpenAPI3 schema.yml file, Swagger API docs, and Redoc API docs.
- Added a new TypeScript API client that ships with the front end code.
- Updated all JS client code to use the new client, including the employee demos, React-based team management views, and chart demo.
- Removed no-longer-used coreAPI helper functions from
assets/javascript/api.js. - Removed no-longer-needed
assets/javascript/teams/api.js. - Removed no-longer-needed
app.Apifrom the front end code. - Added
openapitools.jsonto.gitignore - Added documentation related to these changes.
Other Additions
Section titled “Other Additions”project_metacontext processor now includesserver_url(the absolute URL of your app) in the context.get_server_roothelper function to support the above.- Doc strings for helper functions in
apps/web/meta.py - Type hints for various helper methods inside Django models.
- Add
pip-toolsto dev Dockerfile sorequirements.txtcan be built in the container. (Thanks Brett for the suggestion!) - Add
make pip-compiletarget for rebuildingrequirements.txtandmake requirementsfile for rebuilding requirements.txt, and rebuilding/restarting your Docker containers. - Team management URL is now included in team API urls. (React UI only)
Other Fixes
Section titled “Other Fixes”- Properly handle team name and slug validation in team editing UI (React UI only)
- Changing the team slug now properly refreshes the page, so links don’t break. (React UI only)
- Fixed typo in variable name in
get_team_api_url_templates.
Other Changes
Section titled “Other Changes”- Switched chart examples and supporting code from
c3.jstoChart.js. - Upgraded Django to the latest LTS security release (3.2.14).
- Dev docker set up now starts celery with the beat flag enabled.
- Increased the top margin between the navigation and content in content base template. (Bootstrap only, thanks Will for suggesting!)
- Deleted some accidentally-included commented out code in the Vue employee demo.
July 8, 2022
Version 2022.6
Section titled “Version 2022.6”The main feature of this release is a brand-new integration with Wagtail. Wagtail is a powerful CMS (Content Management System) built on top of Django. You can use it to create rich websites that can be edited directly via an authoring admin interface without writing any code. It’s great for creating marketing sites, blogs, and other mostly-static content.
You can learn more about Wagtail and Pegasus in this 5-minute overview, or by heading over to the Wagtail documentation.
Complete release notes are below:
- Pegasus now supports Wagtail! Documentation. There are a fair number of changes to support this work, most
of which are only relevant if you enable wagtail support. The main ones includ a new
contentapp, a large number of new Python package dependencies (all stemming fromwagtail), and some updates to the site navigation. - Pegasus now generates a sitemap for you. Documentation.
- Responsive HTML email templates were added for the default email confirmation and password reset emails.
- Add
get_protocolhelper function to return the string “http” or “https” depending onsettings.USE_HTTPS_IN_ABSOLUTE_URLS
Changed
Section titled “Changed”- Social sign ups will now automatically create a default team if not there.
- The
login_and_team_requireddecorator now falls back to the default team from the session/user if not available from URL (thanks Van for the suggestion) - Add link to the profile page to set a password if the user only has a social account setup.
- Improve the default UI for setting a password.
- Split the top navigation for the app template into its own template (
top_nav_app.html). (Material Theme Only) - Show top navigation menu even if user is logged in (but hide the sign up / sign in buttons) (Material Theme Only)
- Increase top margin on 404 and 500 error pages (Bootstrap only)
- Reduced whitespace in some html templates.
- Changed reference of
djstripe_sync_plans_from_stripetobootstrap_subscriptionsin subscription error message. - Removed “[project name]” prefix from signup / password reset emails
- Refactor: use
get_protocoland f-strings inabsolute_urlhelper function - Removed “More coming soon” text from the Pegasus examples homepage.
- Fixed
pyparsingversion conflict between regular and production requirements (Google Cloud builds only) - Fixed subscription price displays when using graduated pricing. (Thanks Lachlan for reporting)
- Remove Heroku Dockerfile from build if not using it
June 21, 2022
Version 2022.5
Section titled “Version 2022.5”This release improves many of the details of the Stripe subscriptions integration. To streamline these changes, Stripe Elements support has been removed, and subscriptions will be Checkout-based moving forwards.
The release also many small fixes and improvements.
- Re-use the Stripe
Customerobject when a User has multiple subscriptions / payments (by saving it on the User model). This prevents users from having to re-enter their cards multiple times. - Added an
active_subscription_requireddecorator for easier subscription feature-gating. Docs - Added a periodic task to sync subscriptions with Stripe every day when per-seat billing is enabled.
- Added a slug field to
ProductMetadatato be able to uniquely refer to products in code. - Added
sync_subscription_model_with_stripehelper function (logic was previously only insync_subscriptionsmanagement command) - Stripe subscriptions are now created with a human-readable description with the team/user associated with the subscription.
- Show expiration date on subscription details when auto-renewal has been turned off
- Docker projects now include a
.env.dev.examplefile to use as a reference for sharing across team members (the.env.devfile that ships with Pegasus was .gitignored) - Added Docker-based instructions for running tests while watching for changes.
- Add
lang="en"to base template for improved accessibility
- Fixed bootstrap button CSS classes in a few templates to use the
pg-class styles instead of the legacy Bulma version. (thanks Lisa for reporting) - Removed unreachable template code in
view_subscription.html. - Removed accidental references to teams from user-based subscription views.
- Fixed subscription payment display amount when subscription quantity is > 1
URLFieldnow renders with same styles as other inputs- Don’t sync Stripe subscriptions if they don’t need to be changed (per-seat billing only)
- Don’t show hidden labels for inputs in
render_field/render_formtags - Fixed typo in
update_billing_date_on_membership_deletiondoc string
Changed
Section titled “Changed”- Upgraded Python packages to their latest versions.
- Heroku-based docker deployments now use a
busterbase image instead ofalpine. This helps to simplify build issues when adding certain packages / libraries. - Simplified team-based subscription views to no longer have redundant functions
- Improved layout of
socialaccount/signup.html(shown when someone signs up with a social account but the email is already in use). (thanks Lisa for reporting) - Updated migration file in api app to match latest expected column sizes
upgrade_subscription_checkout.htmltemplate has been combined withupgrade_subscription.html- Upgrade htmx version from 1.5 to 1.7
- Improved error message when running
bootstrap_subscriptionswith bad Stripe credentials - Extracted
get_price_display_with_currencyhelper function fromget_friendly_currency_amount - Increased size of titles in socialaccount templates.
- Reduced whitespace in HTML templates that were modified from 4-spaces to 2-spaces.
- Added
celerybeat-scheduleto.gitignore
Removed
Section titled “Removed”- The deprecated Stripe elements support for subscriptions has been removed. Subscriptions require using Checkout moving forwards.
May 30, 2022
Version 2022.4.2
Section titled “Version 2022.4.2”This is a hotfix release, which adds a missing closing </div> tag to the signup template on Tailwind
builds when not using teams.
April 27, 2022
Version 2022.4.1
Section titled “Version 2022.4.1”This is a hotfix release, which fixes the make init command to start containers in the background
so that migrations will properly run.
April 26, 2022
Version 2022.4
Section titled “Version 2022.4”Version 2022.4 is a mix of new features and maintenance improvements. Major updates include new “Login with Twitter” functionality, allowing users to manage their own social accounts, and some Docker development improvements.
- Added “login with Twitter” as a first-class supported authentication option.
- Users can now see and manage (connect and disconnect) social accounts (Google and Twitter) from their profile pages.
- Added new Docker makefile targets, including
make start-bgto run docker containers in the background (previous default behavior), andmake restartto restart docker containers - Added view to simulate errors (by raising an Exception). This is helpful for testing Sentry integrations.
- Added ability to override page titles in templates using the
{% page_title %}block. - Added better page titles to several app pages.
- Continued adding translation markup in user-facing text that was modified (this will be an incremental effort towards full-site translation)
Changed
Section titled “Changed”- Upgraded version of node that runs in the Docker container from 14 to 16.
- Sentry is now a first-class build option enabled in the UI. If enabled, it will be automatically included in requirements and configured in
settings.py. - README file now includes Docker-specific instructions for everything that was included (Docker builds only)
- Made more settings variables configured via environment variables.
- Docker
make startcommand now runs in the foreground instead of in the background. - Merged
meta.htmlpartial template intobase.htmlto enable overridding blocks inside of it. - The
socialiconCSS class is now shared in all CSS frameworks and also sets the max width/height of the icon. - Updated outdated Django docs references to Django 3.2
- Extracted social login buttons to their own templates which are shared on signup and login pages.
- Upgraded Django to 3.2.13
- Filter out inactive (archived) Stripe prices/plans from the list of plans
Removed
Section titled “Removed”- Removed
dev-requirementsfiles. Pip tools should now be installed withpip install --upgrade pip-tools. - No longer call
npm installin theDockerfile, since it wasn’t working as expected. - Cleaned up unnecessary
type="application/javascript"markup from many<script>tags.
Documentation
Section titled “Documentation”- Added page metadata documentation for working with project / page metadata (e.g. page titles).
- Updated the upgrading documentation to recommend a branch-based approach.
- Updated the Sentry documentation with the new setup and testing instructions.
April 22, 2022
Version 2022.3
Section titled “Version 2022.3”The main feature of this release is Github Actions support. Pegasus projects can now (optionally) run back end tests and build the front end automatically on Github.
This should work automatically for all projects out-of-the-box. See the documentation for more details.
Changed
Section titled “Changed”- Postgres database settings can now be configured by environment variables directly in
settings.py - Upgrade default Python version to 3.9 (including in all Docker files)
- Development Dockerfile now installs all npm packages when being built (thanks Brian for suggesting)
- Upgraded ~all Python packages to their latest versions, apart from leaving Django on 3.2 LTS
- More consistent support for using Celery with all versions of Heroku and Redis secure/insecure URLs (thanks Brett for reporting).
This release also introduces a new versioning convention, where future releases will be named: yyyy.mm or yyyy.mm.n in the case
of multiple releases in the same month.
This was done to make it clearer to customers when they last upgraded, because the previous release numbers were not meaningful,
and because the author had developed decision fatigue about when to declare a “1.0” release.
March 28, 2022
Version 0.22.1
Section titled “Version 0.22.1”This is a hotfix release that fixes a crashing bug with Heroku deployments that don’t use Redis (thanks James for reporting).
March 15, 2022
Version 0.22
Section titled “Version 0.22”The main feature of this release is a new front-end theme for Pegasus based off of the Material Kit and Material Dashboard products from Creative Tim.
You can get a sense of the theme in this 3-minute video:
This release also adds support for Django 4.0. See note below for details.
- New Bootstrap Material theme based on Creative Tim’s Material Kit / Material Dashboard
- Added breadcrumbs to the Employee demo app pages
- Unofficial support for Django 4.0 (see note below).
Package upgrades
Section titled “Package upgrades”dj-stripeto 2.6.1
Changed
Section titled “Changed”- All tables are now responsive (scrollable) on Bootstrap builds
- Add vertical gutters to columns on Bootstrap builds
- Better spacing of grid layouts in the examples
- Default pegasus form input styling is now handled with
pg-input-groupclass - Updated
djstripe_settingsimport to be compatible with new version - Added top navigation bar to various account templates (password reset, password change, etc.). (thanks James for suggesting!)
- Use
render_fieldin more account templates - Heroku runtime now uses Python 3.8.12 (thanks Allan for reporting!)
- Fixed widget class overrides from not being populated for some widgets. This also fixes “select all” functionality in the Django admin for Bootstrap builds. (Thanks Will for reporting!)
- Fixed connection strings for Redis on Heroku if you were not on the free tier, by adding
?ssl_cert_reqs=noneto Redis connection strings. (Thanks Reid for reporting!) - Fixed 500 error in payments example if the “Pay” button was clicked before the JavaScript on the page fully loads.
- Replaced references to deprecated
ugettexttranslation functions withgettextversions. - Removed unused
manage/<path:path>url route in HTMX-based teams builds (thanks Peter for reporting!)
Django 4.0 support
Section titled “Django 4.0 support”This version unofficially supports Django 4.0, however still ships with 3.2.12.
This is due to one issue with the dj-stripe dependency generating migration files
that may cause migration problems across multiple Pegasus environments (e.g. dev and prod, or two developer machines).
This is a very similar issue to the one described in the 0.14.2 release notes.
If you wish to use Django 4.0, update the pinned version to 4.0.2 (or latest) in your requirements.txt file after downloading Pegasus,
and all should work.
Feb 28, 2022
Version 0.21.1
Section titled “Version 0.21.1”This maintenance release simplifies how users are accessed via API key authentication, to make it easier to transition views. It mostly undoes a small handful of changes from the 0.21 release.
Changed
Section titled “Changed”HasUserAPIKeypermission class now populatesrequest.userwith the associated user, if a validUserAPIKeyis present.- API Views and Viewsets now continue to access users via
request.userinstead of theget_user()helper functions TeamSerializernow accesses the user from the request instead of the explicit["user"]context.
Removed
Section titled “Removed”- Now-redundant
UserAPIKeyMixinclass
Feb 4, 2022
Version 0.21
Section titled “Version 0.21”This release has one major feature: API Keys. You can get an overview in this 2-minute video or check out the documentation for details.
There are also a number of smaller fixes and upgrades.
- API Key support! See the new API key documentation for details.
- Example
DJSTRIPE_WEBHOOK_SECRETto.env.devfile for local Docker deployments
Package upgrades
Section titled “Package upgrades”djangoto 3.2.11psycopg2-binaryto 2.9.3 (fixes installation issues on latest macOS processors) (thanks Eric for reporting!)djangorestframeworkto 3.13.1
Changed
Section titled “Changed”- Updated how some type hints are done to reduce potential for circular imports caused by typing
- Updated headings of account pages to be more consistent with rest of site
- Added missing closing
</section>tag totemplates/accounts/password_change.html(thanks Peter for reporting!) - Removed redundant tailwind imports from
assets/styles/pegasus/tailwind.csswhich were causing duplicate CSS definitions in the generatedsite-tailwind.cssfile (thanks Anna for reporting!) - Fixed bug that triggered an error when subscribing new users to a Mailchimp email list
- The Docker development setup now works on the latest macOS processors
Removed
Section titled “Removed”- Building for multiple CSS frameworks has been removed. To try different CSS frameworks you will need to edit your project and download each codebase separately.
Deprecated
Section titled “Deprecated”The following features will likely be removed in an upcoming release. Let me know if you would miss these!
- Stripe Elements support is deprecated and will be removed in favor of Stripe Checkout.
Feb 2, 2022
Version 0.20
Section titled “Version 0.20”This release involves a substantial update to Pegasus’s subscriptions functionality. The biggest new feature is that per-seat (also known as per-unit) billing is now supported (for Stripe Checkout only). Team-based installments can now create and manage subscriptions based on the number of users in the team, with built-in infrastructure to track changes and keep them in sync with Stripe.
You can find a 6-minute overview of the feature in this video:
The implementation is customizable and can also be used by non-team builds with some additional configuration. See the updated Subscription documentation for an overview of this functionality, and bear in mind that it’s a little complicated with several moving parts!
There were many code changes to support this work-as well as future planned improvements to the subscriptions module. Additionally there were a number of smaller, unrelated updates and fixes.
You can read the complete notes below. The format for this release (and likely future releases) was borrowed from keep a changelog. The most significant changes are in bold. Also please note the announcement of a few features that will be removed soon!
- Support for per-unit / per-seat billing. See the docs on using this
SubscriptionSerializerclass for including Subscription objects in APIs- Management command and logic to sync subscriptions when team membership changes (useful for per-seat billing workflows)
- APIs for creating Stripe checkout and portal sessions and returning the URL to be used by JavaScript front ends
- Stripe webhook support for provisioning a subscription after a sucessful checkout session
- Allow specifying promotion codes when using Stripe Checkout
- Add ability to override display prices for individual billing plans
- Celery on Digital Ocean app platform now supports multiple processes (using gevent)
- More type hints in various places
Package upgrades
Section titled “Package upgrades”- Upgrade Django version to 3.2.10 LTS
- Upgrade dj-stripe to 2.5.1
Changed
Section titled “Changed”- Changed URLs of Stripe integration API calls to be more consistent
- Removed
subscriptions.views.helpersand merged intosubscriptions.helpers - Moved
SubscriptionModelMixinfromapps.subscriptions.helperstoapps.subscriptions.models.SubscriptionModelBaseand made it an abstract model - Add
created_attoMembershipadmin - Add
subscriptionandhas_active_subscriptiontoTeamserializer - Moved
ProductWithMetadataAPItoapi_viewsmodule - Access
stripethroughget_stripe_modulehelper function - Extract Stripe checkout and portal session creation to helper functions
- Extract subscription provisioning to helper function
- Add several properties and methods to
SubscriptionModelBaseto help track and use per-seat billing - Removed redundant extra functions in
apps.subscriptions.checkout_views - Prices on subscriptions are no longer centered (it looked silly with only 1 or 2 plans)
- Prices on subscription page for annual plans now display total amount with billing interval (e.g. $300/year) instead of monthly price ($25/month)
- Changed
get_friendly_currency_amounthelper function to take aPlanobject instead of an amount and a currency.
- Team and invitation list APIs now require authentication (results in a 403 instead of 500 error when accessed anonymously)
- Archived products are not included in the default product list generated by
bootstrap_subscriptions - Automatically select the first plan if none is configured as the default
- Don’t crash displaying subscription plan prices for subscriptions with tiered pricing (instead displays “Unknown”
- Removed some subscriptions templates when building without subscriptions for certain CSS frameworks.
- [tailwind-only] Removed reference to team name from logged-in homepage when not building with teams
Dec 23, 2021
Deprecated
Section titled “Deprecated”The following features will likely be removed in an upcoming release. Let me know if you would miss these!
- Building for multiple CSS frameworks is deprecated and will be removed in the next release.
- Stripe Elements support is deprecated and will be removed in favor of Stripe Checkout the next release.
Version 0.19
Section titled “Version 0.19”This release has two major updates - improved team member management and improved Heroku deployment support.
Improved Team member management
Most of the changes below are summarized in this video:
From a user’s perspective there are three main updates:
- Admins can now change any team members’ role from the new “member details” page.
- Admins can also remove anyone from a team.
- All team members (including admins) can leave teams they belong to.
The following supporting changes were also made:
- Added a comprehensive test suite supporting the above workflows.
- Fixed a bug that prevented re-inviting the same email address to a team even if the previous invitation had already been accepted. Duplicate pending invitations are still prevented. This change also removed the DB constraint requiring team and email address to be unique.
- Fixed bug where “resend invitation” and “cancel invitation” buttons were incorrectly showing up for non-admins.
- Added helper
is_adminmethod to teamMembershipobjects. - Added a
CustomUserSerializerto pass user information to the front end. - Added the
user_idfield toMembershipSerializer - Add the site name to body of team email invitations.
- Add
__str__function to teamMembershipobjects. - Introduce
TeamPermissionErrorexception class and start using it for permission-related failures. - Added better display of front-end validation issues when issuing invitations fails.
- Various bits of formatting and cleanup in teams React code.
Heroku deployment improvements
A few updates were made to make deployments to Heroku containers faster and more comprehensive:
- Bump
cryptographyto3.4.8and remove no-longer-necessary dependencies from production dockerfiles. This results in vastly improved build times for Heroku docker deployments. - Build the front end files as part of Heroku container deployments
- Run database migrations by default on Heroku container deployments
- Set various production-recommended settings in
settings_heroku.py. For more details see the new production checklist in the documentation.
Other minor updates
- Added fall back to
usernameon User display functions if the user does not have an associated email address. - Extracted logic for opening modals to a shared JavaScript function (Bulma builds only).
- Remove commented out / unused code from
templates/web/components/top_nav.htmland modal dialogs. (Tailwind builds only). - Bump
djangoto3.2.8 - Add
pg-text-mutedhelper CSS class - Add some more type hints to URL helpers
- Extracted React form validation logic to
ValidationErrorscomponent.
Upgrade Notes
If you are upgrading from a previous version you should not merge any changes in the teams migration files,
and run ./manage.py makemigrations and ./manage.py migrate to remove the DB constraint on team invitations
after upgrading.
Oct 27, 2021
Version 0.18.1
Section titled “Version 0.18.1”This hotfix release fixes a bug affecting React builds that caused the sign up page to be broken.
Oct 3, 2021
Version 0.18
Section titled “Version 0.18”This release adds a new Django + HTMX implementation of Pegasus’s team management functionality. Now, you can choose whether to use React or HTMX for your teams UI.
This choice is configured by the new “Front-End Framework” setting in your project’s Pegasus settings. The setting currently only impacts the Teams UI (and has no impact on Pegasus builds that don’t use teams), but will be extended in future releases.
The HTMX teams UI also has a few user-facing improvements:
- You can now choose a role when inviting new team members.
- Team deletion has moved to the team details page, and now has a confirmation dialog.
- Editing the team name and ID now require the team admin role.
Additionally, there are bug fixes and code-related improvements throughout the teams functionality:
- Fixed “sign out” link on invitation acceptance page.
- Improved workflow when attempting to accept an invitation to a team you already belong to.
- Broke the teams
views.pyfile into multiple Python modules. - Set
team_membershiponrequestobject in team decorator functions, so it can be easily accessed in views/templates. - Cleaned up bits of HTML in existing teams React implementation.
- Various doc strings, type hints, and formatting cleanup throughout code.
- Combined
accept_invitationandaccept_invitation_confirminto a single view. - Remove a few teams-related templates when not building with teams enabled.
Finally, there were minor updates to other functionality:
- Bootstrap JavaScript is now built and used from the local install instead of using a pinned CDN. (Bootstrap builds only)
- Extract Mailchimp mailing list logic to its own module and add mailing list documentation.
- Fix quirks in HTMX example when back-end validation fails.
- Minor cleanup of HTMX example code.
- Rename
paymentsandtasksview modules topayments_viewsandtasks_views. - Upgrade Django to
3.2.7. - Changed default value of
USE_HTTPS_IN_ABSOLUTE_URLSsetting toFalse
Potentially breaking changes
The change of the default value of USE_HTTPS_IN_ABSOLUTE_URLS could impact production environments
that have not overridden this setting. In particular, it would cause Stripe checkout / portal callbacks
and invitation emails to have http links instead of https links.
To fix this, add USE_HTTPS_IN_ABSOLUTE_URLS = True to all production settings files / environments.
Sep 28, 2021
Version 0.17.1
Section titled “Version 0.17.1”This fixes a crashing issue when resending team invitations.
Sep 8, 2021
Version 0.17
Section titled “Version 0.17”This release adds an HTMX demo, a Teams example app, and more.
This video provides a 4-minute overview of the key features, or read on for details.
The HTMX object demo
The object demo application now has an htmx implementation. HTMX is a library that allows you to build rich, single-page, interactive experiences by adding HTML attributes.
The provided demo application is a single page app with no native JavaScript, backed by Django forms.
The Teams Example app
This release also adds a Teams example app, which has Create, Read, Update, Delete (CRUD) views for an example model that is part of a team (called a “Player”).
As part of this work, a new base model class, BaseTeamModel was added which can be extended
to create models that belong to a Team.
Additionally, two view mixin classes, LoginAndTeamRequiredMixin and TeamAdminRequiredMixin were added,
which can be used to easily create class-based model views on Team models.
A test suite for these mixins was also added.
More details can be found in the Teams documentation.
A big thanks to Peter Cherna, who’s Pegasus example apps was a big inspiration for this example.
Other changes
- Add generic breadcrumbs CSS classes compatible with Bulma, Bootstrap and Tailwind (used by teams example)
- Default all Pegasus apps to using
BigAutoFieldinstead ofAutoField(see upgrade notes) - Use f-strings instead of string templates in management commands
- Reduce indentation level in some html template files
Upgrade notes
The default ID for all Pegasus models was changed from AutoField to BigAutoField.
If you are upgrading a project using AutoField you should not merge any changes to initial migration
files in the affected apps. Then you can either:
- To change your apps from
AutoFieldtoBigAutoField, run./manage.py makemigrationsand./manage.py migrate - To keep using
AutoField, change the setting back toAutoFieldinapps.pyfor all Pegasus apps.
Aug 24, 2021
Version 0.16.2
Section titled “Version 0.16.2”This release upgrades django-hijack from 2.3 to 3.0 and adds hijack links to the admin site.
Aug 11, 2021
Version 0.16.1
Section titled “Version 0.16.1”This minor release fixes styling issues with Tailwind builds that were accidentally introduced in 0.16.
Aug 9, 2021
Version 0.16
Section titled “Version 0.16”This is a grab-bag release of mostly cleanup work and bug fixes.
Please review the breaking changes closely if you are upgrading an existing project! Not doing so could lead to unexpected behavior and demo data loss!
Potentially breaking changes:
- Changed the
login_and_team_requiredandteam_admin_requiredview decorators to no longer allow superusers to access the views. It is recommended to use the new user impersonation feature to allow superusers to access teams they don’t belong to. - Removed
user_can_access_teamanduser_can_administer_teamhelper functions which provided team access to superusers. - Removed
attrslibrary dependency and switched its usages todataclasses. - The
Employeeexample data model has moved, and runningmigratewill drop all of your demoEmployeedata.
New: Improved Django form support:
- Added a Django forms implementation of the employee / object demo
- Rename
bootstrap_form_fieldsandbulma_form_fieldstemplatetags toform_fieldsif not using multiple-css-framework support - Add
render_form_fieldshelper function to render an entire form. (Note: this currently only supports text-style, checkbox, and select input types.) - Add
render_checkbox_inputto bootstrap form rendering tags - Added a basic non-model form example
Fixes:
- Fix cryptography build issue affecting Heroku docker deployments
- Improve textarea styling on Bootstrap forms
- Better default styling of checkboxes in Bootstrap forms.
- Don’t require that
team_slugbe the first argument to a url to use the team-based decorator functions.
Cleanup:
- Upgrade Django to 3.2.6
- Remove redundant
null=Truefrom user avatars - Added more type hints
- Split object / employee example out into its own app and template folder.
- Added help text to employee example model fields
- Changed some navigation and text around the employee app example
- Remove inline style declarations from a few examples
- Added some instructions about initializing your database to the README
- Update migrations to be compatible with latest Django / Pegasus code
Upgrade notes:
If you receive a warning like this when generating Database migrations:
You are trying to change the nullable field ‘avatar’ on customuser to non-nullable without a default; we can’t do that (the database needs something to populate existing rows).
It is safe to choose option 2, “Ignore for now…”.
There won’t be any NULL values in the database, since Django automatically populates FileFields with an
empty string.
Aug 6, 2021
Version 0.15
Section titled “Version 0.15”Version 0.15 is a major release with two big features: Stripe Checkout and User Impersonation.
For 3-minute summary you can watch the video below, or read on for details.
Stripe Checkout Support
Now you can use Stripe Checkout for payments instead of - or in addition to -
the Stripe Elements-based embedded UI. Stripe Checkout support has been added to the subscriptions page, as well
as the payment example. You can build new Pegasus projects with Checkout, Elements, or toggle between them
via a settings.py setting.
User Impersonation
This release also adds optional user impersonation functionality for superusers, allowing admins and support staff to “login as” another user with a few clicks. This is a great tool for troubleshooting user-specific issues. This feature depends on django-hijack and can be disabled at build time.
Other updates
- Make http/https in absolute URLs (e.g. email invitations) configurable via the
USE_HTTPS_IN_ABSOLUTE_URLSsetting - Start adding type hints to the codebase, primarily in helper functions. More coming soon!
- Added more tests for teams helper functions
- Split out
subscription/views.pyinto multiple files to make it clearer which views affect which functionality. - Break
upgrade_subscription.htmlinto multiple files to support elements and checkout-based flows. - Improve default string representation of user model
- Improve the default styling of select widgets (Bootstrap builds only)
- Clean up doc strings and code for team API permission helpers (teams builds only)
- Rename
teams.utiltoteams.helpersto be consistent with other apps (teams builds only) - Fix issue with
apps/subscriptions/__init__.pynot being created for certain configurations - Various minor cleanups of whitespace, url ordering, etc.
July 22, 2021
Version 0.14.5
Section titled “Version 0.14.5”Another grab-bag of minor fixes and improvements.
- Reduce scope of hiding file inputs to just the profile upload form
- Add
NoNewUsersAccountAdapterto allow disabling public sign ups for an app - Extract Bulma and Bootstrap form rendering to helper template tags
- Fix subscription details start date display (subscriptions builds only)
- Explicitly set
DEFAULT_AUTO_FIELDtoAutoFieldin settings to remove runtime warnings. - Minor README improvements
- Upgrade Django to 3.2.5
Changes only affecting builds with teams enabled:
- Fix error on sign up if email passes front-end validation but fails back-end validation
- Change
/teams/URL to go to the teams management page instead of API docs - Improve styling of teams page when no teams exist on Bootstrap
- Fix React warning in teams JavaScript
July 15, 2021
Version 0.14.4
Section titled “Version 0.14.4”A very minor release:
- Don’t include
djstripeand associated settings inINSTALLED_APPSif not using subscriptions
June 30, 2021
Version 0.14.3
Section titled “Version 0.14.3”A very minor release:
- Update Django to 3.2.4
- Remove
DEFAULT_AUTO_FIELDdeclaration from settings. This was causing issues with allauth migrations being generated, as a result of this issue. Until more libraries have worked around these migration issues, Pegasus will just ship with the default setting.
June 17, 2021
(v-0-14-2)=
Version 0.14.2
Section titled “Version 0.14.2”This release upgrades dj-stripe to version 2.4.4 which should fix cross-environment migration issues.
Upgrade notes:
Projects using a “clean” 0.14 or 0.14.1 release may have been affected by this issue in dj-stripe
where running makemigrations automatically generated a migration file inside the dj-stripe library code.
Local app migrations would then add a dependency to this migration, which would not be available on other environments.
This often manifested as an error along the lines of the following when setting up a second environment:
django.db.migrations.exceptions.NodeNotFoundError: Migration .0003_auto_20210524_1532 dependencies reference nonexistent parent node ('djstripe', '0008_auto_20210521_2314')`To fix this there are a few steps:
- You should explicitly uninstall and reinstall
dj-stripeinstead of just installing requirements to ensure the generated migration file is removed.pip uninstall dj-stripe && pip install dj-stripe==2.4.4 - You should rebuild your own app’s migrations to no longer depend on the generated
dj-stripemigration, by deleting the bad files and re-runningmakemigrationson a fresh environment. - You will need to “fake” migrations for any existing DBs, by manually deleting relevant rows from the
django_migrationstable and then running./manage migrate <appname> --fakefor each affected app.
Please reach out for support on Slack if you run into any issues with this, and I’m happy to help!
May 26, 2021
Version 0.14.1
Section titled “Version 0.14.1”This is a minor release including the latest Django security updates, the official Bootstrap 5.0 version, and a few small features and fixes.
- Fix incorrectly generated
urls.pyif you built with teams and without subscriptions - Add password confirmation field to sign up pages if configured by allauth
- Add
project_settingsexample for passing project-level settings to templates via context processor - Update
bootstrapto5.0.1. - Update
djangofrom3.2to3.2.3 - Remove unused
kombudependencies from requirements.
Changes affecting experimental features only:
- Slightly improved styling of Tailwind sign up page
May 19. 2021
Version 0.14
Section titled “Version 0.14”Version 0.14 is a major release with a focus on Teams and package upgrades. It also upgrades Pegasus to Django’s 3.2 LTS release. Details are below:
Teams Upgrade
- Make team name optional on signup, and auto-generate a team if none specified.
- Update team-based URL-routing to be more consistent (put all team urls behind
/a/team-slug/) - Migrate teams React code to functional components / hooks
- Add URL-routing and back button support to teams page
- Restrict ability to edit/delete teams to team admins only
- Restrict ability to manage team invitations via API to team admins only
- Add manage/view team page to main team navigation
- Other minor teams JS cleanup (replace
varwithconst, etc.) - Delete
team_nav.htmlwhen not using teams - Improve loading screen for teams page and extract to shared component
Package Upgrades
- Upgrade all python packages to latest versions (including Django to 3.2 LTS)
- Updated settings file to the version that ships with Django 3.2
- Update formatting of requirements files to the latest version used by
pip-tools - Upgrade all JS packages to latest versions
- Switch from deprecated node-sass to dart-sass
Other updates
- Set base URL in React object demo from Django
- Fix doc strings of npm-related
makecommands - Extract logic for getting CoreAPI JavaScript client to a shared function
- Add support for celery workers to Digital Ocean deployments (and updated docs)
- Add
make dbshelldocker command to get a database shell - Remove some tailwind files that were accidentally included in non-tailwind builds
Changes affecting experimental features only:
- Improve Tailwind styling of examples, teams and other built-in pages
- Add
@tailwind/formsplug in for improved form styling - Split Pegasus Tailwind CSS classes into a new file to mirror Bootstrap/Bulma implementations
- Fix collectstatic errors when building with tailwind and whitenoise (affected Heroku and Digital Ocean deployments)
- Remove broken landing page and pricing page examples, and point people to Tailwind UI instead
Upgrade notes:
- Django added the new Default primary key field type
setting. If you wish to use the default in 3.2 you will have to add DB migrations for it. Otherwise you
can change the value of
DEFAULT_AUTO_FIELDto'django.db.models.AutoField'in yoursettings.pyfile. - Bootstrap users may need to run
npm update bootstrapbefore building static assets to get all styling of the examples working again.
April 28, 2021
Version 0.13.2
Section titled “Version 0.13.2”This is a minor release primarily focusing on an improved Docker experience and updates to the experimental TailwindCSS support:
- Update development
Dockerfilefromalpinetobusterand install front-end dependencies. - Add
Makefilewith self-documenting targets for various common operations (see docs) - Update generated
READMEwith better Docker instructions - Use double quotes for description and name settings to reduce issues with apostrophes
Changes affecting experimental features only:
- Properly support for using PurgeCSS with Tailwind
- Include (purged) Tailwind bundle files with Pegasus
March 10, 2021
Version 0.13.1
Section titled “Version 0.13.1”This is a minor maintenance release with a few small changes and fixes.
- Fix Docker image when deploying to Heroko containers
- Fix SSL mixed content issues on Heroku Docker builds
- Remove teams JavaScript files if not using teams.
- Add
body_wrapperblock for overriding the whole base template - Label closing
endblocktags in base template - Add
.DS_Storefiles to.gitignore - Minor compatibility fixes to
teamsCSS.
February 24, 2021
Version 0.13.0
Section titled “Version 0.13.0”This release adds support for the Bootstrap CSS framework and includes several changes to how the CSS files are structured in Pegasus. See the new CSS documentation for an overview of the new structure.
Major changes:
- Full support for Bootstrap CSS!
- Restructure CSS files, creating framework-level subfolders, splitting
site-baseandsite-<framework>files out, and making Sass imports implicit in the Bulma files. - Examples CSS overhaul, converting styles to
pg-classes and adding thepegasus/<framework>.sassfiles to style examples and JavaScript.
Minor changes:
- Improved UI of object demo tables on small screens.
- Remove unused “tagline” CSS styles and replace with the CSS frameworks’ vertical centering utilities.
- Update progress bar styles to use CSS variables instead of Sass variables.
- Remove unused redundant “section” classes from a number of places.
- Split profile page into multiple HTML templates.
- Remove duplicate cookie-handling code JavaScript on profile page and use the same JS code used in other places.
- Remove unused
plan-priceandplan-taglineclasses from subscription page. - Fixed bad reference to
subsriptions.sasswhen not building with subscriptions. - Remove unused
has-vcentered-cellsclass. - Start splitting out teams JavaScript into multiple files.
- Remove redundant
custom-file-uploadCSS class. - Add /404 and /500 endpoints for viewing custom 404 and 500 pages.
- Remove unnecessary raw string formatting from severeal
urls.pyfiles. - Upgrade Django to
3.1.6
February 8, 2021
Version 0.12.1
Section titled “Version 0.12.1”This release continues the overhaul of the Pegasus CSS and templates to include experimental support for the Bootstrap CSS framework. Details on using Bootstrap can be found here.
Changes affecting everyone:
- Fix “view subscription” page start date display, and accommodate when start date is not set in Stripe.
- Default
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = Trueto avoid double-login after email confirmation. - Move navbar avatar styling to standalone
navbar.sassfile to be shared across CSS frameworks. - Change navbar avatar class and CSS from
.avatarto.navbar-avatar. - Split subscription details on the “view subscription” page into its own component templates.
- Split hero section on the “upgrade subscription” page into its own component templates.
- In
subscriptions.sass, use css variables instead of sass variables for colors. - On subscription page, change “upgrade-features” selector from an ID to a class in HTML and CSS.
- Remove unused styles from
subscriptions.sass - Clean up whitespace in a number of files
Changes affecting experimental features:
- Booststrap CSS build! Details here.
- Building for multiple CSS frameworks now includes Bootstrap (along with Bulma and Tailwind)
- Building for Tailwind now overwrites Bulma templates instead of maintaining them in a separate directory.
January 26, 2021
Version 0.12.0
Section titled “Version 0.12.0”This release is a set of changes laying the groundwork for future Pegasus improvements.
Existing Pegasus users will need to upgrade their installer to use the latest version
(pip install --upgrade pegasus-installer)
Experimental support for Tailwind CSS
More details can be found in the Tailwind documentation.
Note: this feature is not yet fully supported and is in an experimental pre-release.
Simplified upgrade process
Pegasus now saves your configuration when you install it, to simplify the upgrade process. Instructions on upgrading can be found on the “upgrading” page.
Additional related changes and fixes
- Remove
package-lock.jsonfrom Pegasus for improved compatibility across NPM / OS versions. It is recommended to runnpm installand then check in the resultingpackage-lock.jsonfile to source control. More details can be found in the front end docs. - Switch some styling from Sass variables to CSS variables (e.g. colors) for compatibility with multiple CSS frameworks
- Add a
site-base.sassfile for base Pegasus styles that aren’t dependent on any CSS framework. - Fix issue with
PlanSerializeranddj-stripeversion 2.4.1 - Remove no-longer-used
subscription_title.htmltemplate. - Remove no-longer-used tooltip styles
- Remove unused HTML from subscriptions upgrade page and split it out into partial templates
- Change a few default settings, e.g. project and author name.
- Upgrade django to 3.1.5.
January 13, 2021
Version 0.11.3
Section titled “Version 0.11.3”This release overhauls the Payments example to use the Stripe PaymentIntent API
and support 3DS / SCA cards.
Minor changes:
- Upgrade
dj-stripeto2.4.1 - Pull
DJSTRIPE_WEBHOOK_SECRETsetting from environment variable if available
If you are upgrading from a previous installation, you may need to change
the following two values in settings.py:
DJSTRIPE_FOREIGN_KEY_TO_FIELD = 'id' # change to 'djstripe_id' if not a new installationDJSTRIPE_USE_NATIVE_JSONFIELD = True # change to False if not a new installationDecember 17, 2020
Version 0.11.2
Section titled “Version 0.11.2”- Fixes to subscription workflow when using a trial period - automatically refresh page after card is accepted and support 3D-Secure validation for credit cards when using a trial.
December 9, 2020
Version 0.11.1
Section titled “Version 0.11.1”- Fix bug in development Dockerfile from a new OS dependency introduced by the
django-allauthupgrade.
December 7, 2020
Version 0.11.0
Section titled “Version 0.11.0”This release is a grab-bag of fixes and upgrades based on recent feedback.
- Force users to reconfirm their email when changing it and email verification is enabled
- Switch from
extract-text-webpack-plugintomini-css-extract-pluginfor CSS handling in Webpack - Rename
assets/index.jstoassets/site.jsto support more styles in the future. - Use randomly generated identicons for users instead of a default empty profile picture
- Move
.env.dev.exampleto.env.devand.env.production.exampleto.env.productionso they don’t have to be copied to get running (Docker builds only) - Clean up payments UI a little
- Remove accidentally included
team_admin.htmltemplate when not building with teams - Remove accidentally included
Dockerfile.devtemplate when not building with Docker - Remove unused CSS classes from examples
- Upgrade various NPM packages to latest versions
- Upgrade
django-allauthto0.44.0 - Upgrade
djangoto3.1.4
December 2, 2020
Version 0.10.5
Section titled “Version 0.10.5”This release adds native support for deploying to Digital Ocean app platform. See the deployment guide for details.
Additional updates:
- Remove duplicate
ACCOUNT_EMAIL_VERIFICATIONdeclaration insettings.py - Rename development
DockerfiletoDockerfile.devfor clarity and ease of deployment to other platforms - Fix SSL / mixed content errors when deploying on Google Cloud Run
Nov 17, 2020
Version 0.10.4
Section titled “Version 0.10.4”This release adds experimental native support for deploying to Google Cloud Run. More details can be found in the deployment guide.
Additional updates:
- Fix static file references to favicons.
- Upgrade
certifito2020.11.8 - Rename
heroku-requirements.txttoprod-requirements.txtto be consistent across platforms (Heroku builds only) - Switch production Docker images from Python-alpine to Python-slim (Docker builds only)
Nov 10, 2020
Version 0.10.3
Section titled “Version 0.10.3”This release adds native support for deploying to Heroku using Docker containers. More details can be found in the new deployment guide.
Additional minor updates:
- Upgrade
urllibto1.25.11 - Allow requirements to load from multiple sources when using Docker
- Add static directories and config files to
.gitignore
Nov 5, 2020
Version 0.10.2
Section titled “Version 0.10.2”This release adds support for using Docker in development. More details can be found in the new Docker documentation.
Oct 28, 2020
Version 0.10.1
Section titled “Version 0.10.1”This release adds Heroku deployment support. More details can be found in the new deployment guide.
Oct 26, 2020
Version 0.10.0
Section titled “Version 0.10.0”This is largely a maintenance release with mostly minor updates and fixes, but there are enough library upgrades that it warrants a version bump.
- Upgrade all Python packages including upgrading to Django 3.1.2
- Upgrade all npm packages
- Add a new API for products and metadata at
/subscriptions/api/active-products/. Also includes adding some serialization classes and helper functions to subscriptions models. Subscriptions only. - Fix a bug where clicking on “Dashboard” didn’t always take you to the right team.
Also set team ID in the request session so it can be accessed across requests, and
add
get_default_teamhelper function to pull the last/current team from a request. Teams only. - Fix default styling of textarea widgets in Django forms
- Use
constandletin subscriptions page JavaScript - Add
has-vcentered-cellstable formatting class to center table rows, and use in teams UI and object lifecyle demos - Remove unnecessary
subscriptions.sassfile when Pegasus is built without subscriptions enabled
Oct 14, 2020
Version 0.9.0
Section titled “Version 0.9.0”This release is a large overhaul of the React example that ships with Pegasus, including:
- Add url-routing support. Add/edit URLs now update and are linkable. This also enables back button support
- Add validation feedback missing / bad data
- Switch all components from using classes to hooks
- Split React components out into their own files
- Better loading UX
Other minor updates:
- Upgrade Django to 3.0.10 (3.1 support coming soon)
- Upgrade various JavaScript dependencies
- Generate random
SECRET_KEYfor each new installation - Upgrade to Bulma 0.9.0
- Remove some spacing utility classes in favor of the ones that ship with bulma
Upgrading:
Existing Pegasus users will need to upgrade the installer to run this.
pip install --upgrade pegasus-installer>=0.0.2Sep 4, 2020
Version 0.8.3
Section titled “Version 0.8.3”- Fix default styling of number inputs in forms.
- Default
ACCOUNT_CONFIRM_EMAIL_ON_GETtoTrueif using email confirmation. - Fix issue building front end on certain newer versions of nodejs/npm
- Upgrade
celery-progressfrom0.0.10to0.0.12
Aug 31, 2020
Version 0.8.2
Section titled “Version 0.8.2”This release fixes an edge case in the invitation accepting logic that didn’t work if a user left the page and came back later.
Aug 24, 2020
Version 0.8.1
Section titled “Version 0.8.1”A minor maintenance/bugfix release:
- Fixed a bug in the invitation workflow that prevented invitations from being accepted
when creating accounts with social logins. Note that this requires changing the
ACCOUNT_ADAPTERsetting to'apps.teams.adapter.AcceptInvitationAdapter' - Make site branding in the navigation stay visible on mobile devices
- Make it more obvious that
settings.SECRET_KEYshould be overridden. - Upgrade Django to 3.0.9
Aug 21, 2020
Version 0.8.0
Section titled “Version 0.8.0”Stripe billing portal integration is here!
You can now use Stripe’s new customer portal to manage subscriptions in your app.
Supported operations and configurations include upgrading and downgrading subscriptions, subscription cancellations (both immediately, and at period end), and subscription renewals.
Additional documentation can be found in the subscription docs.
Details and other changes:
- Added “manage billing” redirect to subscription pages if you have an active subscription, which goes to the Stripe customer portal
- Added webhook functionality to sync subscription changes and cancellations made via the Stripe portal
- Removed built-in “Cancel” option and supporting code.
- Upgraded
stripelibrary to version2.48.0 - Removed the
.customerfield fromCustomUserobject. Customers are now always accessed via their associated subscriptions. - Removed a lot of no-longer-needed code from
SubscriptionModelMixinrelated to accessing subscriptions from the.customerfield. References to.stripe_subscriptionshould be changed to simple.subscriptionon theCustomUserandTeamobjects. - Added
avatartoCustomUseradmin. - Fixed bug where “http://” was incorrectly assigned to the
Site.domainobject (fixes issues usingabsolute_url)
July 16, 2020
Version 0.7.4
Section titled “Version 0.7.4”This is another minor release with mostly small fixes and updates to the front end.
- Added number formatting of Salary to object demo examples
- Fixed styling of number form inputs
- Removed unnecessary imports from
assets/index.js - Fixed incorrect distinction between
dependenciesanddevDependenciesinpackage.json - Upgraded React to 16.13.1
- Moved React object lifecycle example to a
reactsubfolder - Started splitting up React object lifecycle demo into multiple files, and refactoring it to use hooks
- Renamed React object lifecycle example bundle file from
object-lifecycle-bundle.jstoreact-object-lifecycle-bundle.js - Removed unused “bower_components” exclusion in
webpack.config
July 13 2020
Version 0.7.3
Section titled “Version 0.7.3”- Upgraded to Django 3.0.7
- Fixed display of renewal details in subscription view to work with the latest Stripe Prices API
- Added ability to resend invitations from the team management page
- Added sort order to team member list (by email address)
- Cleaned up teams JavaSript (removed console logging statements, updated whitespace, removed commented code)
June 30 2020
Version 0.7.2
Section titled “Version 0.7.2”- Improved styling of Stripe credit card forms in subscriptions and payments examples
- Fixed bug in subscriptions where not setting a default plan prevented the UI from working
- Fixed bug where monthly subscriptions would not work if you also had a quarterly or 6-month price configured
- Changed the order of some examples in examples home page and navigation
June 17 2020
Version 0.7.1
Section titled “Version 0.7.1”- Added ability to cancel a Subscription directly on the site. Demo (you have to create a Subscription first)
- Don’t show password change links if using social authentication (thanks Yaniv!)
June 11, 2020
Version 0.7.0
Section titled “Version 0.7.0”Pegasus now supports Vue.js!
Version 0.7 adds a Vue.js implementation of the Object Lifecycle demo so you can start with a foundation of either React or Vue.
Minor changes:
- Added
Membershipinline admin editing toTeamsmodel (thanks Troels!) - Added a few more spacing utility css classes to
utilities.sass
June 5, 2020
Version 0.6.1
Section titled “Version 0.6.1”- Upgrade
requeststo version0.23.0to fix installation version conflict.
May 26, 2020
Version 0.6.0
Section titled “Version 0.6.0”This release begins the move of Pegasus’s core functionality out of the “pegasus” app and into the user-defined apps. It’s a relatively big release from a code perspective, although there is very little new / changed in terms of functionality.
Philosophy
Section titled “Philosophy”The philosophy guiding this change is “your starting code base should be as understandable as possible”.
Historically, Pegasus has attempted to separate “Pegasus-owned” files from “user-owned” files. The thinking behind this structure was that Pegasus upgrades and code merges would be as easy as possible since - in theory - users would not need to modify anything in the “Pegasus-owned” space.
In practice, the line between “Pegasus-owned” and “user-owned” was fuzzy, and customizing an application often required editing files in the “Pegasus-owned” space. So the benefit was not realized.
Furthermore, this split caused the initial codebase to be more confusing, since core functionality was split across two places.
Changelog
Section titled “Changelog”Changes related to the restructure above include:
- Moved all base templates from
templates/pegasus/totemplates/web/ - Moved team invitation templates from
templates/pegasus/email/totemplates/teams/email/ - Merged
pegasus/apps/usersand all related code intoapps/users - Merged
pegasus/apps/teamsand all related code intoapps/teams - Removed
pegasus/apps/componentsand moved code to more specific apps - further details below - Moved
promote_user_to_superusermanagement command intousersapp - Moved
bootstrap_subscriptionsmanagement command intosubscriptionsapp - Moved
google_analytics_idcontext processor to web app - Moved
meta.pyfrom pegasus app to web app - Moved
pegasus/utils/subscriptions.pytoapps/subscriptions/helpers.py - Added
apps.utilsand moved most ofpegasus.utilsthere - Moved
pegasus/decorators.pytoapps/utils/decorators.py - Moved
PegasusBaseModeltoapps.utilsand renamed toBaseModel - Removed unused
stripe.pyfile (replacing functionality with equivalent functions indjstripe) - Removed “Pegasus” from API url names
- Moved non-example JS imports out of
pegasus/Pegasus.jsand intoApp.js - Lowercased (and kebab-cased) all JS file names for consistency
- Moved sass files from
assets/styles/pegasus, toassets/styles/app - Renamed various layout classes, e.g.
pegasus-two-column,pegasus-message, etc. toapp-[name] - Moved
static../../assets/images/pegasus/undraw/folder tostatic../../assets/images/undraw - Removed unused
pegasus/teams/serializers.pyfile
Other changes and fixes include:
- Fix accepting an invitation if you’re already signed in
- Remove subscription-related fields from team and user models if not using subscriptions
- Only ship base migration files for users and teams, and have applications manage their own migrations
- Improved checks and error-handling around accepting invitations multiple times
- Upgraded
bulmaCSS framework to0.8.2 - Upgraded
node-sassto4.14.1 - Ran
npm audit fixto update other JS library dependencies - Upgraded
pip-toolsand other packages indev-requirements.txt - Added backend check to the payments example, to show how to prevent client-side exploits
- Improve password reset email copy
- Use
$linkcolor in$navbar-item-active-colorand$menu-item-active-background-color - Externalized styles on progress bar demo
A Note on Database Migrations
Section titled “A Note on Database Migrations”Historically, Pegasus has shipped with complete database migrations. However, maintaining a set of migrations for each possible Pegasus configuration or forcing all configurations to use the same DB schema has proven unwieldy. Thus, migrations are now expected to be managed outside of Pegasus.
For new users, the only change is that prior to running ./manage.py migrate for the first time,
you must first run ./manage.py makemigrations.
For existing users you can either keep your current migrations folder, or you can run
./manage.py makemigrations and then ./manage.py migrate --fake. If you have changed the user or team
models, then you should keep your current folder.
May 19, 2020
Version 0.5.2
Section titled “Version 0.5.2”- Fixed default Postgres DB settings (adding host and port)
- Removed Stripe webhooks from project urls if not using subscriptions
- Fixed but where subscription and teams templates were still being included even if not enabled for a project
- upgrade
celery-progressto 0.0.10 - Cleaned up progress bar demo
- Used javascript cookie library for CSRF token
- Switched from
vartoconstin a few places - Removed debug logging statements
May 7, 2020
Version 0.5.1
Section titled “Version 0.5.1”Version 0.5.1 is a minor maintenance release with a few minor bug fixes and bits of cleanup:
- Upgraded Django to 3.0.5
- Fixed bug where certain input types were getting overridden in Django Forms (thanks Yaniv for reporting!)
- Fixed bug with Object Lifecycle and Charts demos not working on Team installations (thanks Greg for reporting!)
- Moved example chart JavaScript to the webpack pipeline and share Api access variables (thanks Greg for the suggestion!)
- Switch
admin.pyfiles to use the@admin.registerdecorator syntax
April 17, 2020
Version 0.5
Section titled “Version 0.5”This is the biggest release to Pegasus since it’s launch. Read below for all the details.
Subscriptions!
Section titled “Subscriptions!”Added the Stripe Subscriptions feature.
Documentation for subscriptions can be found here.
Model changes
Section titled “Model changes”- Added a
subscriptionfield toTeamandCustomUserobjects, and acustomerfield toCustomUser. - Added
SubscriptionModelMixinhelper class for accessing / checking subscription status on a model.
Javascript build changes
Section titled “Javascript build changes”- Added
Pegasus.jsand made different modules available in front end code (see subscriptions upgrade page example usage).
Sass / CSS changes
Section titled “Sass / CSS changes”- Added
tooltiputilities. - Added a few margin helper classes (e.g.
my-1,my-2)
New Python Library Dependencies
Section titled “New Python Library Dependencies”New JavaScript Library Dependencies
Section titled “New JavaScript Library Dependencies”Small fixes and changes:
Section titled “Small fixes and changes:”- Moved app-specific templates from inside the apps to global templates directory as recommended by Two Scoops of Django
- Remove redundant raw prefix on some
pathurl declarations - Reduced some duplicate access to
teamobject when already available via therequestobject. - Made team permission template tags more consistent with rest of site (also allow access to superusers)
- Removed
PEGASUS_USING_TEAMSandpegasus_settingscontext processor. All config is now handled at installation time instead of by settings variables. - Catch Stripe card errors in the payments example
- Upgraded various
npmpackages - Upgraded Bulma to 0.8.0
Documentation
Section titled “Documentation”- Added release notes page (this one)
- Added subscriptions overview page
- Updated “delete teams code” cookbook to reflect latest team changes (all the backend work is now done for you on installation)
March 30, 2020
Version 0.4 and earlier
Section titled “Version 0.4 and earlier”Release notes for earlier versions are no longer publicly available.