Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cf64f80

Browse files
author
Marcos Dione
committed
Merge from manosim/django-rest-framework-docs.
2 parents 3e64e0f + eef7e1b commit cf64f80

File tree

25 files changed

+225
-67
lines changed

25 files changed

+225
-67
lines changed

‎.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ drfdocs.egg-info/
1111

1212
site/
1313

14+
demo/node_modules/
15+
rest_framework_docs/static/rest_framework_docs/js/dist.min.js
16+
1417
rest_framework_docs/static/node_modules/
1518
rest_framework_docs/static/rest_framework_docs/js/dist.min.js.map

‎README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Document Web APIs made with Django Rest Framework. [View Demo](http://demo.drfdocs.com/)
44

5+
> **Contributors Wanted**: Do you like this project? Using it? Let's make it better!
6+
57
![DRFdocs](https://cloud.githubusercontent.com/assets/6333409/13193861/69e82aec-d778-11e5-95c4-77f4ef29e6e5.png)
68

79
### Supports
@@ -66,14 +68,14 @@ You can find detailed information about the package's settings at [the docs](htt
6668

6769
First of all thanks to the [Django](http://www.djangoproject.com/) core team and to all the contributors of [Django REST Framework](http://www.django-rest-framework.org/) for their amazing work. Also I would like to thank [Marc Gibbons](https://github.com/marcgibbons) for his *django-rest-framework-docs* project. Both projects share the same idea, it is just that Marc's is not maintained anymore and does not support DRF 3+ & Python 3.
6870

69-
[travis-image]: https://travis-ci.org/ekonstantinidis/django-rest-framework-docs.svg?branch=master
70-
[travis-url]: https://travis-ci.org/ekonstantinidis/django-rest-framework-docs
71+
[travis-image]: https://travis-ci.org/manosim/django-rest-framework-docs.svg?branch=master
72+
[travis-url]: https://travis-ci.org/manosim/django-rest-framework-docs
7173

7274
[pypi-image]: https://badge.fury.io/py/drfdocs.svg
7375
[pypi-url]: https://pypi.python.org/pypi/drfdocs/
7476

75-
[codecov-image]: https://codecov.io/github/ekonstantinidis/django-rest-framework-docs/coverage.svg?branch=master
76-
[codecov-url]:https://codecov.io/github/ekonstantinidis/django-rest-framework-docs?branch=master
77+
[codecov-image]: https://codecov.io/github/manosim/django-rest-framework-docs/coverage.svg?branch=master
78+
[codecov-url]:https://codecov.io/github/manosim/django-rest-framework-docs?branch=master
7779

7880
[slack-image]: https://img.shields.io/badge/slack-pythondev/drfdocs-e01563.svg
7981
[slack-url]: https://pythondev.slack.com

‎demo/project/organisations/serializers.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
from project.accounts.serializers import UserProfileSerializer
44

55

6+
class MembershipSerializer(serializers.ModelSerializer):
7+
class Meta:
8+
model = Membership
9+
fields = ('joined', 'is_owner', 'role')
10+
11+
612
class CreateOrganisationSerializer(serializers.ModelSerializer):
13+
membership_set = MembershipSerializer(many=True)
714

815
class Meta:
916
model = Organisation
10-
fields = ('name', 'slug',)
17+
fields = ('name', 'slug','membership_set')
1118

1219

1320
class OrganisationMembersSerializer(serializers.ModelSerializer):
@@ -27,3 +34,11 @@ class OrganisationDetailSerializer(serializers.ModelSerializer):
2734
class Meta:
2835
model = Organisation
2936
fields = ('name', 'slug', 'is_active')
37+
38+
39+
class RetrieveOrganisationSerializer(serializers.ModelSerializer):
40+
membership_set = MembershipSerializer()
41+
42+
class Meta:
43+
model = Organisation
44+
fields = ('name', 'slug', 'is_active', 'membership_set')

‎demo/project/organisations/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
urlpatterns = [
66

77
url(r'^create/$', view=views.CreateOrganisationView.as_view(), name="create"),
8+
url(r'^(?P<slug>[\w-]+)/$', view=views.RetrieveOrganisationView.as_view(), name="organisation"),
89
url(r'^(?P<slug>[\w-]+)/members/$', view=views.OrganisationMembersView.as_view(), name="members"),
910
url(r'^(?P<slug>[\w-]+)/leave/$', view=views.LeaveOrganisationView.as_view(), name="leave")
1011

‎demo/project/organisations/views.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
from rest_framework.response import Response
33
from project.organisations.models import Organisation, Membership
44
from project.organisations.serializers import (
5-
CreateOrganisationSerializer, OrganisationMembersSerializer
5+
CreateOrganisationSerializer, OrganisationMembersSerializer, RetrieveOrganisationSerializer
66
)
77

88

9+
class RetrieveOrganisationView(generics.RetrieveAPIView):
10+
11+
serializer_class = RetrieveOrganisationSerializer
12+
13+
914
class CreateOrganisationView(generics.CreateAPIView):
1015

1116
serializer_class = CreateOrganisationSerializer

‎docs/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ title: "Changelog"
33
source_filename: "changelog"
44
---
55

6+
### Release 0.0.10
7+
8+
- Use get_serializer_class for Views without serlaizer_class attribute [#92](https://github.com/ekonstantinidis/django-rest-framework-docs/pull/92)
9+
10+
611
### Release 0.0.9
712

813
- Support for more types of `ROOT_URLCONF`

‎docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ source_filename: contributing
55
### Development
66
If you want to **use the demo** app to work on this package:
77

8-
In the project [repository](https://github.com/ekonstantinidis/django-rest-framework-docs) you can find the demo app(at /demo). It is a project with Django & Django Rest Framework that will allow you to work with this project.
8+
In the project [repository](https://github.com/manosim/django-rest-framework-docs) you can find the demo app(at /demo). It is a project with Django & Django Rest Framework that will allow you to work with this project.
99

1010
From the root of the repository:
1111

‎docs/template/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656

5757
<footer class="col-md-12 footer">
5858
<div class="links">
59-
<a href="http://www.iamemmanouil.com"><i class="fa fa-link"></i></a>
60-
<a href="http://www.github.com/ekonstantinidis"><i class="fa fa-github"></i></a>
59+
<a href="http://www.manos.im/"><i class="fa fa-link"></i></a>
60+
<a href="http://www.github.com/manosim"><i class="fa fa-github"></i></a>
6161
<a href="http://www.twitter.com/iamemmanouil"><i class="fa fa-twitter"></i></a>
6262
</div>
6363
{% if copyright %}

‎docs/template/content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
{{ content }}
1212

1313
{% for filename in meta.source_filename %}
14-
<a class="btn btn-default btn-edit" href="https://github.com/ekonstantinidis/django-rest-framework-docs/blob/master/docs/{{ filename }}.md"><i class="fa fa-github"></i> Edit on Github</a>
14+
<a class="btn btn-default btn-edit" href="https://github.com/manosim/django-rest-framework-docs/blob/master/docs/{{ filename }}.md"><i class="fa fa-github"></i> Edit on Github</a>
1515
{% endfor %}
1616
</div>

‎docs/templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ To hide the GitHub badge from the page, just override it with an empty block.
4545
{% block footer %}
4646
<div class="footer">
4747
<div class="links">
48-
<a href="http://www.iamemmanouil.com"><i ></i></a>
49-
<a href="http://www.github.com/ekonstantinidis"><i class="fa fa-github"></i></a>
48+
<a href="http://www.manosim.com"><i class="fa fa-link"></i></a>
49+
<a href="http://www.github.com/manosim"><i class="fa fa-github"></i></a>
5050
<a href="http://www.twitter.com/iamemmanouil"><i class="fa fa-twitter"></i></a>
5151
</div>
5252
Copyright © 2016 Emmanouil Konstantinidis.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /