rabin 10 kuukautta sitten
vanhempi
commit
582593395e
4 muutettua tiedostoa jossa 20 lisäystä ja 21 poistoa
  1. 13 14
      LICENSE
  2. 2 1
      demeter/core.py
  3. 3 3
      demeter/model.py
  4. 2 3
      demeter/web.py

+ 13 - 14
LICENSE

@@ -1,20 +1,19 @@
-The MIT License (MIT)
+Copyright (c) 2024 Demeter
 
 
-Copyright (c) 2013 Hamza Faran
+Permission is hereby granted, free of charge, to any person obtaining a copy
-
+of this software and associated documentation files (the "Software"), to deal
-Permission is hereby granted, free of charge, to any person obtaining a copy of
+in the Software without restriction, including without limitation the rights
-this software and associated documentation files (the "Software"), to deal in
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-the Software without restriction, including without limitation the rights to
+copies of the Software, and to permit persons to whom the Software is
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+furnished to do so, subject to the following conditions:
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
 
 
 The above copyright notice and this permission notice shall be included in all
 The above copyright notice and this permission notice shall be included in all
 copies or substantial portions of the Software.
 copies or substantial portions of the Software.
 
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 2 - 1
demeter/core.py

@@ -532,7 +532,8 @@ class File(object):
 		handle = open(file, 'w')
 		handle = open(file, 'w')
 		handle.write(content)
 		handle.write(content)
 		handle.close()
 		handle.close()
-		Shell.popen('chmod +x ' + file)
+		#Shell.popen('chmod +x ' + file)
+		os.chmod(file, 0o666)
 
 
 	@staticmethod
 	@staticmethod
 	def read(path, name = ''):
 	def read(path, name = ''):

+ 3 - 3
demeter/model.py

@@ -744,9 +744,9 @@ class Sql(object):
 			value = str((int(page['current'])-1) * page['num']) + ',' + str(page['num'])
 			value = str((int(page['current'])-1) * page['num']) + ',' + str(page['num'])
 		if value:
 		if value:
 			value = value.split(',')
 			value = value.split(',')
-			if self.type == 'mysql':
+			if self.type == 'postgresql':
-				result = ' LIMIT ' + value[0] + ',' + value[1]
-			elif self.type == 'postgresql':
 				result = ' LIMIT ' + value[1] + ' OFFSET ' + value[0]
 				result = ' LIMIT ' + value[1] + ' OFFSET ' + value[0]
+			else:
+				result = ' LIMIT ' + value[0] + ',' + value[1]
 
 
 		return result
 		return result

+ 2 - 3
demeter/web.py

@@ -196,11 +196,10 @@ class Web(object):
 
 
 	@classmethod
 	@classmethod
 	def setting(self, method):
 	def setting(self, method):
-		return self.async(method)
+		return self.run(method)
 		
 		
 	@staticmethod
 	@staticmethod
-	def async(method):
+	def run(method):
-		@tornado.web.asynchronous
 		@tornado.gen.coroutine
 		@tornado.gen.coroutine
 		@functools.wraps(method)
 		@functools.wraps(method)
 		def callback(self, *args, **kwargs):
 		def callback(self, *args, **kwargs):