From 4fc94c207cec845aca11850e7aa349eda0b30959 Mon Sep 17 00:00:00 2001 From: Ben Lopatin Date: Thu, 23 Nov 2023 17:01:49 -0500 Subject: [PATCH] Update Read the Docs configuration (#263) * Add Read the Docs config file * Update quickstart * Add requirements * Pin all dependencies * Update install stanza --- .readthedocs.yaml | 16 ++++++++++++++++ docs/conf.py | 5 +++-- docs/getting_started.rst | 22 +++++++--------------- 3 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..26768c7d --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,16 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +sphinx: + configuration: docs/conf.py + +python: + install: + - method: pip + path: . + extra_requirements: + - docs diff --git a/docs/conf.py b/docs/conf.py index 453a75e6..71d18e5c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,6 +10,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. +from organizations import __version__ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -46,9 +47,9 @@ # built documents. # # The short X.Y version. -version = "2.2" +version = ".".join(__version__.split(".")[:2]) # The full version, including alpha/beta/rc tags. -release = "2.2.0" +release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 00664600..b4380375 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -28,16 +28,15 @@ First add the application to your Python path. The easiest way is to use pip install django-organizations -Upgrading Django for existing installations -------------------------------------------- +Quickstart Configuration +======================== -If you are upgrading the Django version of an existing deployment that -deprecates South in favor of Django's native migrations, you will need to fake -the migrations for Django Organizations (if you have installed the app -directly, of course). +.. note:: -Configuration -============= + If however you want to use single-table customized organization models and/or + custom *organization user* models, it may be best to treat Django organizations + as a library and *not* install it in your Django project. See the + :ref:`cookbook-advanced` section. Ensure that you have a user system in place to connect to your organizations. @@ -52,13 +51,6 @@ settings file.:: This should work for the majority of cases, from either simple, out-of-the-box installations to custom organization models. -.. note:: - - If however you want to use single-table customized organization models and/or - custom *organization user* models, it may be best to treat Django organizations - as a library and *not* install it in your Django project. See the - :ref:`cookbook-advanced` section. - URLs ----