From 0fa8520e66c985af95a5720fdfc82c41795344e3 Mon Sep 17 00:00:00 2001 From: Mohamed El-Kalioby Date: Sat, 26 Jan 2019 00:12:20 +0300 Subject: [PATCH] Trying Code Block --- docs/installation.md | 11 ++++++----- mkdocs.yml | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 4011387..0859b72 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,6 +1,6 @@ -# Installation +# Installation & Configuration 1. Install the package -```sh + ```sh pip install django-mfa2 ``` 1. in your settings.py add the application to your installed apps @@ -11,7 +11,7 @@ '......') ``` 1. Add the following settings to your file - + ```python MFA_UNALLOWED_METHODS=() # Methods that shouldn't be allowed for the user MFA_LOGIN_CALLBACK="" # A function that should be called by username to login the user in session MFA_RECHECK=True # Allow random rechecking of the user @@ -25,7 +25,7 @@ FIDO_SERVER_ID=u"localehost" # Server rp id for FIDO2, it the full domain of your project FIDO_SERVER_NAME=u"PROJECT_NAME" FIDO_LOGIN_URL=BASE_URL - + ``` **Method Names** * U2F @@ -38,6 +38,7 @@ 1. Add mfa to urls.py + ```python import mfa import mfa.TrustedDevice urls_patterns= [ @@ -46,7 +47,7 @@ url(r'devices/add$', mfa.TrustedDevice.add,name="mfa_add_new_trusted_device"), # This short link to add new trusted device '....', ] - + ``` 1. Provide `mfa_auth_base.html` in your templaes with block called 'head' and 'content' The template will be included during the user login. If you will use Email Token method, then you have to provide template named `mfa_email_token_template.html` that will content the format of the email with parameter named `user` and `otp`. diff --git a/mkdocs.yml b/mkdocs.yml index b1eead6..6746094 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,3 +2,5 @@ site_name: MkLorum nav: - Home: index.md theme: readthedocs +markdown_extensions: + - fenced_code