Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load(self):
appier.base.Part.load(self)
self.logger.debug("Generating admin interfaces ...")
for model_c in self.models_r:
self.logger.debug(model_c)
""" The license for the module """
import os
import random
import cStringIO
import appier.base
try:
import PIL.Image
import PIL.ImageDraw
import PIL.ImageFont
except:
pass
class CaptchaPart(appier.base.Part):
"""
Modular part class that provides the required infra-structure
for the generation and management of a captcha image.
Should be used with proper knowledge of the inner workings of
the captcha mechanism to avoid any security problems.
@see: http://en.wikipedia.org/wiki/CAPTCHA
"""
def routes(self):
return [
(("GET",), "/captcha", self.image),
(("GET",), "/captcha/validate", self.validate)
]
""" The revision number of the module """
__date__ = "$LastChangedDate$"
""" The last change date of the module """
__copyright__ = "Copyright (c) 2008-2012 Hive Solutions Lda."
""" The copyright for the module """
__license__ = "GNU General Public License (GPL), Version 3"
""" The license for the module """
import appier.base
import models
class AdminPart(appier.base.Part):
"""
Modular part class providing the automation functionality for
the generation of a web interface based on the application
data model for fast prototyping.
The interface configuration should be done by the way of
"annotations" in the data model attributes.
"""
def load(self):
appier.base.Part.load(self)
self.logger.debug("Generating admin interfaces ...")
for model_c in self.models_r:
self.logger.debug(model_c)