Skip to content

Commit 8d5a272

Browse files
authored
fix: set JSONRenderer as the DEFAULT_RENDERER_CLASSES (openedx#403)
This will introduce a similar approach as edx-platform to set JSONRenderer as the DEFAULT_RENDERER_CLASSES. with this, we don't have Browsable API Anymore. also, some RST cleanup in README. See here for more context: overhangio/tutor-notes#35
1 parent fbef9a5 commit 8d5a272

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

README.rst

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,38 @@
1-
Part of `edX code`__.
2-
3-
__ http://code.edx.org/
4-
51
edX Student Notes API |build-status|
6-
====================================
2+
####################################
73

84
This is a backend store for edX Student Notes.
95

106
Overview
11-
--------
7+
********
128

139
The edX Notes API is designed to be compatible with the `Annotator <http://annotatorjs.org/>`__.
1410

1511
Getting Started
16-
---------------
12+
***************
1713

1814
1. Install `ElasticSearch 7.8.0 <https://www.elastic.co/blog/elasticsearch-7-8-0-released>`__.
1915

2016
2. Install the requirements:
2117

22-
::
18+
.. code-block:: bash
2319
24-
$ make develop
20+
make develop
2521
2622
3. Create index and put mapping:
2723

28-
::
24+
.. code-block:: bash
2925
30-
$ make create-index
26+
make create-index
3127
3228
4. Run the server:
3329

34-
::
30+
.. code-block:: bash
3531
36-
$ make run
32+
make run
3733
38-
Configuration:
39-
--------------
34+
Configuration
35+
*************
4036

4137
``CLIENT_ID`` - OAuth2 Client ID, which is to be found in ``aud`` field of IDTokens which authorize users
4238

@@ -49,40 +45,41 @@ Configuration:
4945
``ELASTICSEARCH_DSL['default']['hosts']`` - Your ElasticSearch host
5046

5147
Running Tests
52-
-------------
48+
*************
5349

5450
Run ``make validate`` install the requirements, run the tests, and run
5551
lint.
5652

5753
How To Resync The Index
58-
-----------------------
54+
***********************
55+
5956
edX Notes Store uses `Django elasticsearch DSL <https://django-elasticsearch-dsl.readthedocs.io/>`_ which comes with several management commands.
6057

6158
Please read more about ``search_index`` management commands
6259
`here <https://django-elasticsearch-dsl.readthedocs.io/en/latest/management.html>`_.
6360

6461
License
65-
-------
62+
*******
6663

6764
The code in this repository is licensed under version 3 of the AGPL unless
6865
otherwise noted.
6966

7067
Please see ``LICENSE.txt`` for details.
7168

7269
How To Contribute
73-
-----------------
70+
*****************
7471

7572
Contributions are very welcome.
7673

7774
Please read `How To Contribute <https://github.com/openedx/.github/blob/master/CONTRIBUTING.md>`_ for details.
7875

7976
Reporting Security Issues
80-
-------------------------
77+
*************************
8178

8279
Please do not report security issues in public. Please email security@openedx.org
8380

8481
Mailing List and IRC Channel
85-
----------------------------
82+
****************************
8683

8784
You can discuss this code on the `edx-code Google Group`__ or in the
8885
``edx-code`` IRC channel on Freenode.

notesserver/settings/common.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.SessionAuthentication'],
8484
'DEFAULT_PERMISSION_CLASSES': ['notesapi.v1.permissions.HasAccessToken'],
8585
'DEFAULT_PAGINATION_CLASS': 'notesapi.v1.paginators.NotesPaginator',
86+
'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',),
8687
}
8788

8889
# CORS is configured to allow all origins because requests to the

0 commit comments

Comments
 (0)