Commit 0c648673 authored by Alex's avatar Alex
Browse files

More docs

parent b32b495f
...@@ -30,6 +30,16 @@ def dashboard(materials_client, user): ...@@ -30,6 +30,16 @@ def dashboard(materials_client, user):
**Important:** if using other decorators such as ```@login_required``` provided by the [imperial_ldap package](https://gitlab.doc.ic.ac.uk/paas-packages/imperial_ldap), the parameters to the function appear in inverse order. For example, in the code above, the login decorator appears first, so the ```user``` parameter provided by it goes last. **Important:** if using other decorators such as ```@login_required``` provided by the [imperial_ldap package](https://gitlab.doc.ic.ac.uk/paas-packages/imperial_ldap), the parameters to the function appear in inverse order. For example, in the code above, the login decorator appears first, so the ```user``` parameter provided by it goes last.
## Creating a client at login
In you login route, you should create a client for the logged in user by passing in the username and password. This will create a Materials client in the session:
```python
from imperial_doc_materials import materials_login
materials_login(username, password)
```
## The API ## The API
### ```Materials``` class: ### ```Materials``` class:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment