Skip to content

Commit

Permalink
#550 Add code example for creating context
Browse files Browse the repository at this point in the history
  • Loading branch information
duker33 committed Sep 3, 2018
1 parent 7343451 commit 541168e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions shopelectro/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
It stands between urls and view functions.
Every context class is used via objects composition.
For example:
TODO - add example of objects composition
Code example to create tagged:
>>> from django.http import HttpRequest
>>> url_kwargs = {'slug': 'my-page'}
>>> Category(url_kwargs, request=HttpRequest()) | TaggedCategory()
"""

import typing
Expand Down

0 comments on commit 541168e

Please sign in to comment.