File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040# documentation root, use os.path.abspath to make it absolute, like shown here.
4141sys .path .insert (1 , dirname (dirname (abspath (__file__ ))))
4242
43- os .environ ['DJANGO_SETTINGS_MODULE' ] = 'networkapi.settings'
44- import networkapi .settings
43+ # Skip Django configuration on ReadTheDocs to avoid SECRET_KEY errors
44+ if not os .environ .get ('READTHEDOCS' ):
45+ os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'networkapi.settings' )
46+ try :
47+ import networkapi .settings
48+ except Exception :
49+ pass
4550
4651# -- General configuration ------------------------------------------------
4752
7782# built documents.
7883#
7984# The short X.Y version.
80- version = networkapi .VERSION
85+ try :
86+ import networkapi
87+ version = networkapi .VERSION
88+ except (ImportError , AttributeError ):
89+ version = '3.14.11'
8190# The full version, including alpha/beta/rc tags.
82- release = networkapi .VERSION
91+ try :
92+ import networkapi
93+ release = networkapi .VERSION
94+ except (ImportError , AttributeError ):
95+ release = '3.14.11'
8396
8497# The language for content autogenerated by Sphinx. Refer to documentation
8598# for a list of supported languages.
You can’t perform that action at this time.
0 commit comments