diff --git a/.gitignore b/.gitignore index 65ed3f37..0ddcf2a3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ .coverage .idea docs/_build -local_settings.py pip-log.txt +mopidy/settings/local.py spotify_appkey.key src/ tmp/ diff --git a/docs/installation.rst b/docs/installation.rst index 004454e8..4f15f101 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -147,9 +147,8 @@ Test your libspotify setup:: Spotify settings ================ -Create a file name ``local_settings.py`` in the same directory as -``settings.py``. Enter your Spotify Premium account's username and password -into the file, like this:: +Create a file named ``local.py`` in the directory ``mopidy/settings/``. Enter +your Spotify Premium account's username and password into the file, like this:: SPOTIFY_USERNAME = u'myusername' SPOTIFY_PASSWORD = u'mysecret' @@ -157,11 +156,11 @@ into the file, like this:: Currently the despotify backend is the default. If you want to use the libspotify backend, copy the Spotify application key to ``mopidy/spotify_appkey.key``, and add the following to -``mopidy/mopidy/local_settings.py``:: +``mopidy/mopidy/settings/local.py``:: - BACKEND = u'mopidy.backends.libspotify.LibspotifyBackend' + BACKENDS = (u'mopidy.backends.libspotify.LibspotifyBackend',) -For a full list of available settings, see :mod:`mopidy.settings`. +For a full list of available settings, see :mod:`mopidy.settings.default`. Running Mopidy diff --git a/docs/settings.rst b/docs/settings.rst index b449b247..7e67de50 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -2,7 +2,7 @@ Settings ******** -.. automodule:: mopidy.settings +.. automodule:: mopidy.settings.default :synopsis: Available settings and their default values. :members: :undoc-members: diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 9cd068a6..0c54ab33 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -1,8 +1,8 @@ -from mopidy import settings from mopidy.exceptions import ConfigError +from mopidy import settings def get_version(): - return u'0' + return u'0.1.dev' def get_mpd_protocol_version(): return u'0.15.0' diff --git a/mopidy/settings/__init__.py b/mopidy/settings/__init__.py new file mode 100644 index 00000000..58715fd0 --- /dev/null +++ b/mopidy/settings/__init__.py @@ -0,0 +1,6 @@ +from mopidy.settings.default import * + +try: + from mopidy.settings.local import * +except ImportError: + pass diff --git a/mopidy/settings.py b/mopidy/settings/default.py similarity index 91% rename from mopidy/settings.py rename to mopidy/settings/default.py index fc335ae3..e07bde02 100644 --- a/mopidy/settings.py +++ b/mopidy/settings/default.py @@ -4,7 +4,7 @@ Available settings and their default values. .. warning:: To users Do *not* change settings here. Instead, add a file called - ``mopidy/local_settings.py`` and redefine settings there. + ``mopidy/settings/local.py`` and redefine settings there. .. note:: To developers @@ -47,8 +47,3 @@ SPOTIFY_USERNAME = u'' #: Your Spotify Premium password. Used by all Spotify backends. SPOTIFY_PASSWORD = u'' - -try: - from mopidy.local_settings import * -except ImportError: - pass