Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ pip-delete-this-directory.txt
*.sw*
manage.py
.DS_Store

# example database
drf_example
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Add sorting configuration to `REST_FRAMEWORK` as defined in [json api spec](http://jsonapi.org/format/#fetching-sorting)
* Add `HyperlinkedRelatedField` and `SerializerMethodHyperlinkedRelatedField`. See [usage docs](docs/usage.md#related-fields)
* Add related urls support. See [usage docs](docs/usage.md#related-urls)
* Replaced binary `drf_example` sqlite3 db with a [fixture](example/fixtures/drf_example.yaml). See [usage docs](docs/usage.md#running-the-example-app).


v2.5.0 - Released July 11, 2018
Expand Down
1 change: 1 addition & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ From Source
pip install -r example/requirements.txt
pip install -e .
django-admin migrate --settings=example.settings
django-admin loaddata drf_example --settings=example.settings
django-admin runserver --settings=example.settings


Expand Down
Binary file removed drf_example
Binary file not shown.
62 changes: 62 additions & 0 deletions example/fixtures/drf_example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
- model: example.blog
pk: 1
fields: {created_at: ! '2016-05-02 08:27:16.889061', modified_at: ! '2016-05-02
08:27:16.889123', name: Personal, tagline: ''}
- model: example.blog
pk: 2
fields: {created_at: ! '2016-05-02 08:27:23.871459', modified_at: ! '2016-05-02
08:27:23.871515', name: Work, tagline: ''}
- model: example.author
pk: 1
fields: {created_at: ! '2016-05-02 10:09:48.277428', modified_at: ! '2016-05-02
10:09:48.277487', name: Alice, email: [email protected], type: null}
- model: example.author
pk: 2
fields: {created_at: ! '2016-05-02 10:09:57.133336', modified_at: ! '2016-05-02
10:09:57.133380', name: Bob, email: [email protected], type: null}
- model: example.authorbio
pk: 1
fields: {created_at: ! '2016-05-02 10:10:23.429393', modified_at: ! '2016-05-02
10:10:23.429463', author: 1, body: I just want to send messages to Bob.}
- model: example.authorbio
pk: 2
fields: {created_at: ! '2016-05-02 10:11:30.327832', modified_at: ! '2016-05-02
10:11:30.327860', author: 2, body: I get messages from Alice and send them to
Carol}
- model: example.entry
pk: 1
fields:
created_at: 2016-05-02 10:43:21.271618
modified_at: 2016-05-02 10:43:21.271678
blog: 1
headline: This is a test, this is only a test
body_text: 'And this is the body text for the blog entry. To see comments included
in this payload visit: /entries/1?include=comments'
pub_date: 2015-01-01
mod_date: 2015-04-05
n_comments: 0
n_pingbacks: 0
rating: 0
authors: [1]
- model: example.entry
pk: 2
fields:
created_at: 2016-05-02 10:44:14.376649
modified_at: 2016-05-02 10:49:30.150845
blog: 1
headline: Django, the framework for perfectionists with deadlines
body_text: 'And this is the body text. Try out includes by using this uri: /entries/2?include=comments,authors,authors.bio'
pub_date: 2015-05-01
mod_date: 2015-09-03
n_comments: 0
n_pingbacks: 0
rating: 0
authors: [2]
- model: example.comment
pk: 1
fields: {created_at: ! '2016-05-02 10:44:35.093205', modified_at: ! '2016-05-02
10:44:35.093284', entry: 1, body: Love this article!, author: 2}
- model: example.comment
pk: 2
fields: {created_at: ! '2016-05-02 10:44:55.482302', modified_at: ! '2016-05-02
10:44:55.482339', entry: 2, body: Frist comment!!!, author: null}
1 change: 1 addition & 0 deletions example/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pyparsing
pytz
six
sqlparse
PyYAML