Make mopidy.settings a module

This commit is contained in:
Stein Magnus Jodal 2010-02-23 00:03:46 +01:00
parent 3f0b216d19
commit a7850dbabe
6 changed files with 16 additions and 16 deletions

2
.gitignore vendored
View File

@ -3,8 +3,8 @@
.coverage
.idea
docs/_build
local_settings.py
pip-log.txt
mopidy/settings/local.py
spotify_appkey.key
src/
tmp/

View File

@ -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

View File

@ -2,7 +2,7 @@
Settings
********
.. automodule:: mopidy.settings
.. automodule:: mopidy.settings.default
:synopsis: Available settings and their default values.
:members:
:undoc-members:

View File

@ -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'

View File

@ -0,0 +1,6 @@
from mopidy.settings.default import *
try:
from mopidy.settings.local import *
except ImportError:
pass

View File

@ -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