Repository: brianjbuck/drf_orjson_renderer (language: python)

Issue:
drf_orjson_render 1.4.0 fail.
My application breaks after upgrading to drf_orjson_render 1.4.0

```python

ERROR    django.request:log.py:224 Internal Server Error: /path-replaced/97336477996045/55391693115234
Traceback (most recent call last):
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/falsetru/work/project-name-replaced-project/targetyo/util/db.py", line 53, in inner
    return f(*args, **kwargs)
  File "/home/falsetru/work/project-name-replaced-project/targetyo/api/decorators.py", line 36, in wrapper
    return func(request, *args, **kwargs)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/views.py", line 497, in dispatch
    self.initial(request, *args, **kwargs)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/views.py", line 406, in initial
    neg = self.perform_content_negotiation(request)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/views.py", line 310, in perform_content_negotiation
    return conneg.select_renderer(request, renderers, self.format_kwarg)
  File "/home/falsetru/.virtualenvs/project-name-replaced/lib/python3.8/site-packages/rest_framework/negotiation.py", line 65, in select_renderer
    full_media_type = ';'.join(
TypeError: sequence item 0: expected str instance, NoneType found
```

I think this is caused by `ORJSONRenderer.media_type` change in https://github.com/brianjbuck/drf_orjson_renderer/commit/9dddb215466bb1f371bb46df0b938cbd161a3c94#diff-af3668e3a8a4fd6a0dcb9a8d9a2550ac2f7fb3e562e2f5f94be73b28b0770684L21

In 1.3:
```python
>>> from drf_orjson_renderer.renderers import ORJSONRenderer
>>> ORJSONRenderer.media_type
'application/json'
```

In 1.4:
```python
>>> from drf_orjson_renderer.renderers import ORJSONRenderer
>>> ORJSONRenderer.media_type  # None
>>> 
```


Packages used:
- Django==3.2.10
- djangorestframework==3.12.4
- drf-orjson-renderer==1.4.0

REST_FRAMEWORK:
```python
REST_FRAMEWORK = {                                                                                                                                                                                         
    "DEFAULT_RENDERER_CLASSES": [
        "drf_orjson_renderer.renderers.ORJSONRenderer",
        "rest_framework.renderers.BrowsableAPIRenderer",
    ],
    "TIME_FORMAT": "%H:%M:%S",
}
```


Discussion / hints:

Fix patch:
diff --git a/drf_orjson_renderer/renderers.py b/drf_orjson_renderer/renderers.py
index 1ed0ba9..c4c362f 100644
--- a/drf_orjson_renderer/renderers.py
+++ b/drf_orjson_renderer/renderers.py
@@ -22,6 +22,7 @@ class ORJSONRenderer(BaseRenderer):
     format: str = "json"
     html_media_type: str = "text/html"
     json_media_type: str = "application/json"
+    media_type: str = json_media_type
 
     options = functools.reduce(
         operator.or_,


Test patch:
diff --git a/tests/test_renderer.py b/tests/test_renderer.py
index ac81752..a2fa869 100644
--- a/tests/test_renderer.py
+++ b/tests/test_renderer.py
@@ -75,6 +75,9 @@ def setUp(self):
             "e": {"foo": "bar"},
         }
 
+    def test_default_media_type(self):
+        assert self.renderer.media_type == "application/json"
+
     def test_basic_data_structures_rendered_correctly(self):
 
         rendered = self.renderer.render(self.data)