From: richard Date: Wed, 18 Sep 2002 05:13:11 +0000 (+0000) Subject: additions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=82dd70bd421034f8cfc585b29127eb8c69356c0b;p=roundup.git additions git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1190 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/templates/classic/html/file.item b/roundup/templates/classic/html/file.item new file mode 100644 index 0000000..2c2d8d5 --- /dev/null +++ b/roundup/templates/classic/html/file.item @@ -0,0 +1,52 @@ + +You are not allowed to view this page. + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Name
Content Type
Content
 submit button here
+
+ +download + + + + + + + + + + +
Name
Content Type
+ + + diff --git a/scripts/schema_diagram.py b/scripts/schema_diagram.py new file mode 100644 index 0000000..d48cb6f --- /dev/null +++ b/scripts/schema_diagram.py @@ -0,0 +1,48 @@ +#! /usr/bin/python +# +# Schema diagram generator contributed by Stefan Seefeld of the fresco +# project http://www.fresco.org/. +# +# It generates a 'dot file' that is then fed into the 'dot' +# tool (http://www.graphviz.org) to generate a graph: +# +# %> ./schema.py +# %> dot -Tps schema.dot -o schema.ps +# %> gv schema.ps +# +import sys +import roundup.instance + +# open the instance +instance = roundup.instance.open(sys.argv[1]) +db = instance.open() + +# diagram preamble +print 'digraph schema {' +print 'size="8,6"' +print 'node [shape="record" bgcolor="#ffe4c4" style=filled]' +print 'edge [taillabel="1" headlabel="1" dir=back arrowtail=ediamond]' + +# get all the classes +types = db.classes.keys() + +# one record node per class +for i in range(len(types)): + print 'node%d [label=\"{%s|}"]'%(i, types[i]) + +# now draw in the relations +for name in db.classes.keys(): + type = db.classes[name] + attributes = type.getprops() + for a in attributes.keys(): + attribute = attributes[a] + if isinstance(attribute, roundup.hyperdb.Link): + print 'node%d -> node%d [label=%s]'%(types.index(name), + types.index(attribute.classname), + a) + elif isinstance(attribute, roundup.hyperdb.Multilink): + print 'node%d -> node%d [taillabel="*" label=%s]'%(types.index(name), + types.index(attribute.classname), + a) +# all done +print '}'