Remove Project docstring (shown in browseable API resource)
@@ -75,56 +75,6 @@ class ProjectsViewSet(APIv3Settings, NestedViewSetMixin, ProjectQuerySetMixin,
FlexFieldsMixin, ProjectImportMixin, CreateModelMixin,
ReadOnlyModelViewSet):
- # Markdown docstring is automatically rendered by BrowsableAPIRenderer.
-
- """
- Endpoints related to ``Project`` objects.
-
- * Listing objects.
- * Detailed object.
-
- Retrieving only needed data using ``?fields=`` URL attribute is allowed.
- On the other hand, you can use ``?omit=`` and list the fields you want to skip in the response.
-
- ### Filters
-
- Allowed via URL attributes:
-
- * slug
- * slug__contains
- * name
- * name__contains
-
- ### Expandable fields
-
- There are some fields that are not returned by default because they are
- expensive to calculate. Although, they are available for those cases where
- they are needed.
-
- Allowed via ``?expand=`` URL attribute:
-
- * users
- * active_versions
- * active_versions.last_build
- * active_versions.last_build.confg
-
-
- ### Examples:
-
- * List my projects: ``/api/v3/projects/``
- * List my projects with offset and limit: ``/api/v3/projects/?offset=10&limit=25``
- * Filter list: ``/api/v3/projects/?name__contains=test``
- * Retrieve only needed data: ``/api/v3/projects/?fields=slug,created``
- * Retrieve specific project: ``/api/v3/projects/{project_slug}/``
- * Expand required fields: ``/api/v3/projects/{project_slug}/?expand=active_versions``
- * Translations of a project: ``/api/v3/projects/{project_slug}/translations/``
- * Subprojects of a project: ``/api/v3/projects/{project_slug}/subprojects/``
- * Superproject of a project: ``/api/v3/projects/{project_slug}/superproject/``
-
- Go to [https://docs.readthedocs.io/page/api/v3.html](https://docs.readthedocs.io/page/api/v3.html)
- for a complete documentation of the APIv3.
- """ # noqa
-
model = Project
lookup_field = 'slug'
lookup_url_kwarg = 'project_slug'
@@ -169,23 +119,6 @@ class ProjectsViewSet(APIv3Settings, NestedViewSetMixin, ProjectQuerySetMixin,
'users',
)
- def get_view_description(self, *args, **kwargs): # pylint: disable=arguments-differ
- """
- Make valid links for the user's documentation browseable API.
-
- If the user has already one project, we pick the first and make all the
- links for that project. Otherwise, we default to the placeholder.
- """
- description = super().get_view_description(*args, **kwargs)
-
- project = None
- if self.request and self.request.user.is_authenticated():
- project = self.request.user.projects.first()
- if project:
- # TODO: make the links clickable when ``kwargs.html=True``
- return mark_safe(description.format(project_slug=project.slug))
- return description
-
def create(self, request, *args, **kwargs):
"""
Import Project.
