File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ Read our [docs here](https://identity-library.readthedocs.io/en/latest/)
118
118
## Installation
119
119
120
120
This package is [ available on PyPI] ( https://pypi.org/project/identity/ ) .
121
- You can install it by ` pip install identity ` .
121
+ Choose the package declaration that matches your web framework:
122
+
123
+ * Django: ` pip install identity[django] `
124
+ * Flask: ` pip install identity[flask] `
122
125
123
126
## Versions
124
127
Original file line number Diff line number Diff line change @@ -22,10 +22,12 @@ as a reference. What we need are basically these steps:
22
22
def index(request):
23
23
return HttpResponse("Hello, world. Everyone can read this line.")
24
24
25
- Django configuration
26
- --------------------
25
+ Identity-for- Django configuration
26
+ ---------------------------------
27
27
28
- #. Firstly, create an instance of the :py:class: `identity.django.Auth ` object,
28
+ #. Install dependency by ``pip install identity[django] ``
29
+
30
+ #. Create an instance of the :py:class: `identity.django.Auth ` object,
29
31
and assign it to a global variable inside your ``settings.py ``::
30
32
31
33
import os
Original file line number Diff line number Diff line change @@ -8,8 +8,10 @@ Create `a hello world web project in Flask <https://flask.palletsprojects.com/en
8
8
Here we assume the project's main file is named ``app.py ``.
9
9
10
10
11
- Flask configuration
12
- -------------------
11
+ Identity-for-Flask configuration
12
+ --------------------------------
13
+
14
+ #. Install dependency by ``pip install identity[flask] ``
13
15
14
16
#. Add an ``app_config.py `` file containing the following::
15
17
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ include_package_data = True
55
55
flask =
56
56
# If Flask-Session is not maintained in future, Flask-Session2 should work as well
57
57
Flask-Session>=0.3.2,<0.6
58
+ django =
59
+ # Placeholder, in case we will introduce Django-relevant dependency in the future
58
60
59
61
[options.entry_points]
60
62
# See also https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html
You can’t perform that action at this time.
0 commit comments