summaryrefslogtreecommitdiff
path: root/docs/gl_objects/settings.rst
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2018-05-20 09:01:05 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2018-05-20 09:01:05 +0200
commit5292ffb366f97e4dc611dfd49a1dca7d1e934f4c (patch)
tree220659b39e0e5384504de3c63bbff003ad50eec2 /docs/gl_objects/settings.rst
parent2c342372814bbac2203d7b4c0f2cd32541bab979 (diff)
downloadgitlab-5292ffb366f97e4dc611dfd49a1dca7d1e934f4c.tar.gz
[docs] Rework the examples pages
* Get rid of the .py files and bring all the python examples in the RST files * Fix a few things
Diffstat (limited to 'docs/gl_objects/settings.rst')
-rw-r--r--docs/gl_objects/settings.rst19
1 files changed, 5 insertions, 14 deletions
diff --git a/docs/gl_objects/settings.rst b/docs/gl_objects/settings.rst
index cf3fd4d..4accfe0 100644
--- a/docs/gl_objects/settings.rst
+++ b/docs/gl_objects/settings.rst
@@ -11,25 +11,16 @@ Reference
+ :class:`gitlab.v4.objects.ApplicationSettingsManager`
+ :attr:`gitlab.Gitlab.settings`
-* v3 API:
-
- + :class:`gitlab.v3.objects.ApplicationSettings`
- + :class:`gitlab.v3.objects.ApplicationSettingsManager`
- + :attr:`gitlab.Gitlab.settings`
-
* GitLab API: https://docs.gitlab.com/ce/api/settings.html
Examples
--------
-Get the settings:
+Get the settings::
-.. literalinclude:: settings.py
- :start-after: # get
- :end-before: # end get
+ settings = gl.settings.get()
-Update the settings:
+Update the settings::
-.. literalinclude:: settings.py
- :start-after: # update
- :end-before: # end update
+ settings.signin_enabled = False
+ settings.save()