Skip to content

Commit

Permalink
Merge pull request #32 from matthijswendelaar/update-getting-started-…
Browse files Browse the repository at this point in the history
…documentation

Updated getting started documentation in README.md
  • Loading branch information
matthijswendelaar committed Jan 19, 2021
2 parents 79b107b + 5eab647 commit 0cd639b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ This is a collection of Django Model Field classes that are encrypted using PyNa

## Getting Started

Install `django-nacl-fields`:
```sh
pip install django-nacl-fields
```

Add `nacl_encrypted_fields` to your `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
...
'nacl_encrypted_fields'
...
]
```

Create a key to be used for encryption:
```sh
$ python manage.py createkey
Expand All @@ -33,7 +43,7 @@ NACL_FIELDS_KEY = b'p1Et2Rb@;^BYdo`ZRFi!Hc-MXu(^|bVqA-FGqffM'
Then, in your `models.py`:
```python
from django.db import models
from nacl_encrypted_fields import NaClTextField
from nacl_encrypted_fields.fields import NaClTextField


class MyModel(models.Model):
Expand Down

0 comments on commit 0cd639b

Please sign in to comment.