Skip to content

Commit

Permalink
Add Usage section with examples to README.md (#10)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Action (aider) <[email protected]>
  • Loading branch information
github-actions[bot] and actions-user authored Feb 7, 2025
1 parent 5ba7f59 commit 8497b07
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plain-sessions/plain/sessions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,17 @@ Manage sessions and save them in the database.

- associate with users?
- devices?

## Usage

To use sessions in your views, access the `request.session` object:

```python
# Example view using sessions
class MyView(View):
def get(self):
# Store a value in the session
self.request.session['key'] = 'value'
# Retrieve a value from the session
value = self.request.session.get('key')
```

0 comments on commit 8497b07

Please sign in to comment.