Remove Flask dependencies

This commit is contained in:
Ruud committed 2013-06-12 23:37:08 +02:00
1 parent 1694ed7758
commit 6e0857c6c1
157 files changed
+757 -37916

No files matched your search

+8 -11
View File
@@ -2,7 +2,6 @@ from __future__ import with_statement
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.encoding import isInt, toUnicode
from couchpotato.core.helpers.request import getParams, jsonified
from couchpotato.core.helpers.variable import mergeDicts, tryInt
from couchpotato.core.settings.model import Properties
import ConfigParser
@@ -170,18 +169,16 @@ class Settings(object):
def view(self):
return jsonified({
return {
'options': self.getOptions(),
'values': self.getValues()
})
}
def saveView(self):
def saveView(self, **kwargs):
params = getParams()
section = params.get('section')
option = params.get('name')
value = params.get('value')
section = kwargs.get('section')
option = kwargs.get('name')
value = kwargs.get('value')
# See if a value handler is attached, use that as value
new_value = fireEvent('setting.save.%s.%s' % (section, option), value, single = True)
@@ -192,9 +189,9 @@ class Settings(object):
# After save (for re-interval etc)
fireEvent('setting.save.%s.%s.after' % (section, option), single = True)
return jsonified({
return {
'success': True,
})
}
def getProperty(self, identifier):
from couchpotato import get_session