Files
zitadel/docs/docs/sdk-examples/python-django.mdx
Fabi a065ddc706 docs: Make Examples and SDK Pages easier to understand (#7291)
* docs: first attempt to restructure the sdks and examples to make it better understandable

* docs: first attempt to restructure the sdks and examples to make it better understandable

* docs: first attempt to restructure the sdks and examples to make it better understandable

* docs: first attempt to restructure the sdks and examples to make it better understandable

* docs: first attempt to restructure the sdks and examples to make it better understandable

* docs: first attempt to restructure the sdks and examples to make it better understandable

* docs: adding more example pages

* docs: adding more example pages

* docs: add all sdk/examples

* docs: add tile component

* docs: introduction page

* docs: introduction page

* docs: add react

* docs: remove old sdk and example pages

* docs: fix broken links

* docs: fix broken links

* styles

* Update docs/docs/sdk-examples/introduction.mdx

Co-authored-by: Livio Spring <livio.a@gmail.com>

* Update docs/docs/sdk-examples/java.mdx

Co-authored-by: Livio Spring <livio.a@gmail.com>

* Update docs/docs/sdk-examples/python.mdx

Co-authored-by: Livio Spring <livio.a@gmail.com>

* Update docs/docs/sdk-examples/python.mdx

Co-authored-by: Livio Spring <livio.a@gmail.com>

* docs: review changes

* docs: smaller tiles

* docs: changes from go and java review

* docs: correct python description

* Update docs/docs/sdk-examples/python.mdx

Co-authored-by: Livio Spring <livio.a@gmail.com>

* Update docs/docs/sdk-examples/introduction.mdx

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>

* Update docs/docs/sdk-examples/python.mdx

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>

* docs: flask logo

* flask, rust imgs

* docs: flask logo

* Update go.mdx

* Update java.mdx

* Update docs/docs/sdk-examples/flutter.mdx

Co-authored-by: Livio Spring <livio.a@gmail.com>

* Update docs/src/css/tile.module.css

Co-authored-by: Livio Spring <livio.a@gmail.com>

* docs: sidebar alphabetic

* docs: sidebar alphabetic

* docs: django logo

---------

Co-authored-by: peintnermax <max@caos.ch>
Co-authored-by: Livio Spring <livio.a@gmail.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
Co-authored-by: Stefan Benz <stefan@caos.ch>
2024-02-07 12:44:20 +01:00

71 lines
3.2 KiB
Plaintext

---
title: Python Django
sidebar_label: Python Django
---
<table>
<tr>
<td width="100px">
<img width="100px" src="/docs/img/tech/django.png" alt="phyton logo"/>
</td>
<td>
<a href="https://www.djangoproject.com/" target="_blank">Django</a> is a high-level <a href="https://www.python.org">Python</a> web framework that encourages rapid development and clean, pragmatic design.
Get started integrating authentication to your Django API Application by checking out our <a href="https://github.com/zitadel/example-python-django-oauth" target="_blank">example-python-django-oauth</a> or your Django Web application by checking out our <a href="https://github.com/zitadel/example-python-django-oidc" target="_blank">example-python-django-oidc</a> Example.
</td>
</tr>
</table>
### Resources
- [Example API App Repository](https://github.com/zitadel/example-python-django-oauth)
- [API App Step-By-Step Guide](/docs/examples/secure-api/python-django)
- [Example Web App Repository](https://github.com/zitadel/example-python-django-oidc)
- [Web App Step-By-Step Guide](/docs/examples/login/python-django)
### Django SDK
ZITADEL does not provide a Python Django specific SDK.
But you can integrate ZITADEL to your application by using any OIDC Library such as [mozilla-django-oidc](https://github.com/mozilla/mozilla-django-oidc) or [authlib](https://github.com/lepture/authlib).
### Examples Application
What does the API Application Example include:
- REST API Application secured with OAuth2
- Public Endpoint: Accessible without authentication
- Private Endpoint: Accessible with a token
- Administrator Endpoint: Accessible with a token of a user with admin role
[Example API App](https://github.com/zitadel/example-python-django-oauth)
What does the Web Application Example include:
1. Example Web Application with integrated ZITADEL Login
2. Example page accessible by authenticated user showing retrieved user information
3. Example page accessible by authenticated user showing polls
- Votes for polls can only be done if authenticated
- New polls can be created by user with admin role
4. Logout
5. Correct setup for your application in ZITADEL
[Example Web App](https://github.com/zitadel/example-python-django-oidc)
### Step-By-Step Guide
After completing the Step-By-Step Guide for an API you will have:
1. Example REST API checking tokens against ZITADEL with OAuth2
2. Public Endpoint accessible by any user
3. Private Endpoint accessible by authenticated user
4. Private Endpoint accessible by user with role 'admin'
5. Correct setup for your application in ZITADEL
[API App Step-By-Step Guide](/docs/examples/secure-api/python-django)
After completing the Step-By-Step Guide for an Web application you will have:
1. Example Web Application with integrated ZITADEL Login
2. Example page accessible by authenticated user showing retrieved user information
3. Example page accessible by authenticated user showing polls
- Votes for polls can only be done if authenticated
- New polls can be created by user with admin role
4. Logout
5. Correct setup for your application in ZITADEL
[Web App Step-By-Step Guide](/docs/examples/login/python-django)