Skip to content

Latest commit

 

History

History
 
 

django-ory-cloud

Secure a Django application using Ory Cloud

This repo demonstrates how you can use Ory Cloud or Ory Kratos with Django apps. This app is not for production use and serves as an example of integration.

Read the tutorial on the Ory blog:

Overview

  • Generated using the default django-admin startproject command.
  • Uses sqlite3 as the database backend.
  • Consider using django-cookiecutter

Develop

Prerequisites

  1. Python 3.10
  2. Poetry - Python dependency manager.
  3. Docker (if you want to self-host Ory Kratos)

Environment variables

export ORY_SDK_URL=https://playground.projects.oryapis.com
export ORY_UI_URL=https://playground.projects.oryapis.com/ui

Run locally

git clone git@github.com:ory/examples
cd examples/django-ory-cloud
poetry install
cd mysite
poetry run python manage.py migrate
poetry run python manage.py runserver

Open http://127.0.0.1:8000 for testing

Contribute

Feel free to open a discussion to provide feedback or talk about ideas, or open an issue if you want to add your example to the repository or encounter a bug. You can contribute to Ory in many ways, see the Ory Contributing Guidelines for more information.