Permalink
Browse files

Tweaks from dev3

  • Loading branch information...
1 parent d96763a commit caa71db144af92aa676508e6c0eee6d829622e53 @brendonh committed Jun 2, 2011
Showing with 13 additions and 13 deletions.
  1. +11 −12 twisted/plugins/warp_plugin.py
  2. +1 −1 warp/crud/colproxy.py
  3. +1 −0 warp/tools/autocrud.py
@@ -59,6 +59,16 @@ def makeService(self, options):
siteDir = FilePath(options['siteDir'])
+ sys.path.insert(0, siteDir.path)
+
+ configModule = __import__('warpconfig')
+ config = configModule.config
+ runtime.config.update(config)
+ runtime.config['siteDir'] = siteDir
+ runtime.config['warpDir'] = FilePath(runtime.__file__).parent()
+ store.setupStore()
+ translate.loadMessages()
+
if options.subCommand == "skeleton":
print "Creating skeleton..."
from warp.tools import skeleton
@@ -85,18 +95,7 @@ def makeService(self, options):
autocrud.autocrud(nodes, options.subOptions['name'], options.subOptions['model'])
raise SystemExit
-
- sys.path.insert(0, siteDir.path)
-
- configModule = __import__('warpconfig')
- config = configModule.config
- runtime.config.update(config)
- runtime.config['siteDir'] = siteDir
- runtime.config['warpDir'] = FilePath(runtime.__file__).parent()
- store.setupStore()
- translate.loadMessages()
-
- if options.subCommand == 'adduser':
+ elif options.subCommand == 'adduser':
from warp.tools import adduser
adduser.addUser()
raise SystemExit
View
@@ -81,7 +81,7 @@ def __init__(self, obj, col, rows=6, cols=80):
self.cols = cols
def render_view(self, request):
- return u'<div style="white-space: pre">%s</div>' % unicode(getattr(self.obj, self.col) or "")
+ return u'<div style="">%s</div>' % unicode(getattr(self.obj, self.col) or "")
def render_edit(self, request):
return u'<textarea name="warpform-%s" cols="%s" rows="%s">%s</textarea>' % (
View
@@ -8,6 +8,7 @@
def autocrud(nodes, name, modelFQN):
+
model = reflect.namedObject(modelFQN)
schema = [a for a in dir(model) if isinstance(getattr(model, a), PropertyColumn)]

0 comments on commit caa71db

Please sign in to comment.