File tree 4 files changed +25
-3
lines changed
4 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,12 @@ From Source
70
70
71
71
git clone https://github.com/django-json-api/django-rest-framework-json-api.git
72
72
cd django-rest-framework-json-api
73
- pip install -e .
74
73
pip install -r example/requirements.txt
75
74
django-admin.py runserver
76
75
77
76
Browse to http://localhost:8000
78
77
79
78
## Running Tests
80
79
81
- python runtests.py
80
+ tox
82
81
Original file line number Diff line number Diff line change 1
1
# Requirements specifically for the example app
2
2
packaging
3
+ Django >= 1.11
4
+ django-debug-toolbar
5
+ django-polymorphic >= 2.0
6
+ djangorestframework
7
+ inflection
8
+ pluggy
9
+ py
10
+ pyparsing
11
+ pytz
12
+ six
13
+ sqlparse
Original file line number Diff line number Diff line change 63
63
'debug_toolbar.middleware.DebugToolbarMiddleware' ,
64
64
)
65
65
66
+ MIDDLEWARE = (
67
+ 'debug_toolbar.middleware.DebugToolbarMiddleware' ,
68
+ )
69
+
66
70
INTERNAL_IPS = ('127.0.0.1' , )
67
71
68
72
JSON_API_FORMAT_KEYS = 'camelize'
Original file line number Diff line number Diff line change 8
8
CommentViewSet ,
9
9
CompanyViewset ,
10
10
EntryViewSet ,
11
- ProjectViewset
11
+ ProjectViewset ,
12
+ EntryRelationshipView ,
12
13
)
13
14
14
15
router = routers .DefaultRouter (trailing_slash = False )
22
23
23
24
urlpatterns = [
24
25
url (r'^' , include (router .urls )),
26
+ url (r'^entries/(?P<pk>[^/.]+)/relationships/(?P<related_field>\w+)' ,
27
+ EntryRelationshipView .as_view (),
28
+ name = 'entry-relationships' ),
29
+ url (r'^entries/(?P<entry_pk>[^/.]+)/suggested/' ,
30
+ EntryViewSet .as_view ({'get' : 'list' }),
31
+ name = 'entry-suggested'
32
+ ),
25
33
]
26
34
27
35
You can’t perform that action at this time.
0 commit comments