Allow settings access from api templates

This commit is contained in:
Matthew Jones
2015-07-23 12:07:34 -04:00
parent 88128a2e87
commit 3041fce503
3 changed files with 3 additions and 2 deletions

View File

@@ -202,6 +202,7 @@ class GenericAPIView(generics.GenericAPIView, APIView):
'model_verbose_name_plural': unicode(self.model._meta.verbose_name_plural),
})
d.update({'serializer_fields': self.get_serializer().metadata()})
d['settings'] = settings
return d
def metadata(self, request):

View File

@@ -21,7 +21,7 @@ to specify a range of line numbers to retrieve.
Use `dark=1` or `dark=0` as a query string parameter to force or disable a
dark background.
Files over 1MB (configurable) will not display in the browser. Use the `txt_download`
Files over {{ settings.STDOUT_MAX_BYTES_DISPLAY|filesizeformat }} (configurable) will not display in the browser. Use the `txt_download`
format to download the file directly to view it.
{% include "api/_new_in_awx.md" %}