Skip to content

Commit 21078f9

Browse files
authored
Update README.md
1 parent e98380b commit 21078f9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ INSTALLED_APPS = [
5757

5858
### Usage
5959

60+
#### Using the `SubscriptionModelMixin` and `SubscriptionQuerySet`
61+
62+
```py
63+
from model_subscription.mixin import SubscriptionModelMixin
64+
from model_subscription.model import SubscriptionQuerySet
65+
66+
67+
class TestModel(SubscriptionModelMixin, models.Model):
68+
name = models.CharField(max_length=255)
69+
70+
objects = SubscriptionQuerySet.as_manager()
71+
```
72+
73+
#### Subclassing the `SubscriptionModel` base class.
74+
75+
```py
76+
from model_subscription.model import SubscriptionModel
77+
78+
79+
class TestModel(SubscriptionModel):
80+
name = models.CharField(max_length=255)
81+
82+
```
83+
84+
6085
#### Creating subscribers.
6186

6287
- Using `OperationType`

0 commit comments

Comments
 (0)