Many to many
Saturday, October 29th, 2005I have just check in support for many to many relations in CatWalk.
See a short clip of how it works here.
I have just check in support for many to many relations in CatWalk.
See a short clip of how it works here.
I was very pleased last week when Kevin Dangoor ask me if I could see CatWalk as part of TurboGears.
Of course I could!
Now you can get CatWalk out of the box if you checkout the developer version of TG from SVN.
To mount CatWalk to your app, you should add the following to your controller:
import model
from […]
Now, you can change the order of your fields in CatWalk’s structure view!
I’m using the ToolMan DHTML Library to get some nice cross platform drag and drop reordering functionality.
Reordering doesn’t affect your database schema (or model). This are only view properties within the model browser.
I have still some clean up to do but […]
I think I wasn’t clear about my last post regarding IE and eval on dynamically generated input fields.
Here can you see what I meant:
<html>
<head>
<title>eval test</title>
<script src="/tg_js/MochiKit.js"></script>
<script>
function addInputToForm()
{
var newField = createDOM('INPUT',
{'type':'text',
'name':'youCantEvalMeInIE',
'value':'hello'
}
)
replaceChildNodes('formContent',newField);
}
function evalNewField()
{
//works on firefox and safari, by not IE
var f = eval('document.myform.youCantEvalMeInIE');
alert(f.value);
}
function lookUpField()
{
//works on firefox, safari and iE
for(var i=0;i<document.myform.elements.length;i++)
{
if(document.myform.elements[i].name=='youCantEvalMeInIE')
{
alert(document.myform.elements[i].value);
}
}
}
</script>
</head>
<body bgcolor="#FFFFFF">
<a href="javascript:addInputToForm()">Add field</a>
<form name="myform">
<div […]
While using MochiKit to render CatWalk’s views I stumble upon two quirks.
First, when you are generating tables dynamically with the DOM you have to add your rows to a tbody element.
I couldn’t get IE to display my table without it. This is something I discovered after heavy googling and a single malt.
It should be table->tbody->tr->td-> […]
http://www.checkandshare.com/catwalk
The site hosts a new release of CatWalk that among other things add support for:
IE6
MultipleJoins
Configuring which column to user as label for ForeignKey columns
Enum, Int, Floats, Bool columns. The stringCol enforce length settings
host based access control, by default only localhost has access
A brand new tutorial shows you how to use CatWalk to develop a […]
TurboGears 0.8 is out. Upgrade or get it while is hot =).
CatWalk has been updated to work with the new release. In practice this just mean updating the reference to MochiKit, so it now use <a href=”/tg_js/MochiKit.js” /> to load the Mochi stuff.
Last Saturday, TurboGears had it’s first sprint. Ann Arbor is quite far from Copenhagen, so decided to threw a one man sprint. CatWalk - a simple model browser, is the result. You can read about it, and download it here.
I have been playing with different ways to implement a REST protocol for my application.
I think I have founded an approach that suit my needs.
As I’m using TurboGears for my back-end, this will pretty much work for plain CherryPy too.
The cherryPy Wiki has a page about a way to implement RESTful resources that got […]
Dave Warnock blog about the increasing momentum (and convergence) of differente python projects in his post Pythonic Heros. He drop a couple of names, most prominently (and rightly so) Ian Bicking (who never sleeps).
To this list I will like to add Bob Ippolito. Been an OS X user he had really made python […]