Skip to content

Commit

Permalink
docs: add minimal steps for incorporating Pinecone into a Django proj…
Browse files Browse the repository at this point in the history
…ect (#215)
  • Loading branch information
erictheise committed Jan 30, 2020
1 parent fc9744b commit 908e450
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,25 @@ Pinecone is built and deployed automatically to [Netlify](https://netlify.com/).

## Usage

TODO: Add usage guide.
### In a Django Project

1. Download a [release](https://github.com/platform-coop-toolkit/pinecone/releases) or `git clone` this repository.
2. Change directories and install dependencies: `npm install`
3. Build Pinecone: `npm run build`
4. Copy the contents of `./build/` to your project's static directory:

`cp -r ./build/ /path/to/myproj/static/myproj/`

5. Add links to the JavaScript, stylesheet, and potentially the favicon somewhere in the head element of in your template, e.g., `./templates/myproj/index.html`
```
<script src="{% static 'myproj/scripts/pinecone.umd.js' %}"></script>
<link href="{% static 'myproj/styles/pinecone.css' %}" rel="stylesheet">
<link rel="shortcut icon" href="{% static 'myproj/images/favicon.png' %}" type="image/x-icon">
```
6. This should be enough for local development. In production, these static files should be collected, e.g.,

```
python manage.py collectstatic
```

TODO: Expand this section to other use cases.

0 comments on commit 908e450

Please sign in to comment.