Author: fredlin
Date: Mon Jul 23 22:48:13 2007
New Revision: 3357
URL: http://trac.turbogears.org/changeset/3357
Log:
tgcrud: update for cheesecake rating
Added:
projects/tgcrud/trunk/NEWS.txt
Modified:
projects/tgcrud/trunk/CHANGELOG.txt
projects/tgcrud/trunk/INSTALL.txt
projects/tgcrud/trunk/README.txt
projects/tgcrud/trunk/tgcrud/command.py
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/form.html_tmpl
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/list.html_tmpl
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/master.html
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/show.html_tmpl
Modified: projects/tgcrud/trunk/CHANGELOG.txt
==============================================================================
--- projects/tgcrud/trunk/CHANGELOG.txt (original)
+++ projects/tgcrud/trunk/CHANGELOG.txt Mon Jul 23 22:48:13 2007
@@ -1,9 +1,26 @@
tgcrud Changelog
====================
-1.0 Beta2 (April 11, 2007):
+1.0 (June 20, 2007):
-------------------------
+*Features*
+
+* db-auto detection
+* able to specify primary_key with -i(id) option for SA models
+
+*Changes*
+
+* now 'edit' and 'new' actions share the same template
+
+*Contributors*
+
+Fred Lin
+
+
+1.0 Beta2 (April 11, 2007):
+----------------------------
+
*Fixes*
* remove db auto detection
Modified: projects/tgcrud/trunk/INSTALL.txt
==============================================================================
--- projects/tgcrud/trunk/INSTALL.txt (original)
+++ projects/tgcrud/trunk/INSTALL.txt Mon Jul 23 22:48:13 2007
@@ -4,11 +4,11 @@
If you have downloaded a tgcrud package, follow this steps:
-1) Unpack tgcrud-0.9.zip
+1) Unpack tgcrud-1.x.zip
2) Change to the cheesecake directory::
- cd tgcrud-0.9/
+ cd tgcrud-1.x/
3) Run setup.py that will install tgcrud automatically. This step
need to be run as root::
@@ -34,7 +34,7 @@
will not automatically download the latest version. You can ask for a
particular
version by running for example::
- easy_install tgcrud==0.9
+ easy_install tgcrud==1.x
If you're feeling adventurous you may install development version::
Added: projects/tgcrud/trunk/NEWS.txt
==============================================================================
--- (empty file)
+++ projects/tgcrud/trunk/NEWS.txt Mon Jul 23 22:48:13 2007
@@ -0,0 +1 @@
+tgcrud 1.0 was released in June 20, 2007
\ No newline at end of file
Modified: projects/tgcrud/trunk/README.txt
==============================================================================
--- projects/tgcrud/trunk/README.txt (original)
+++ projects/tgcrud/trunk/README.txt Mon Jul 23 22:48:13 2007
@@ -1,5 +1,15 @@
tgcrud
-This is a TurboGears (http://www.turbogears.org) project.
+tgcrud is an TurboGears (http://www.turbogears.org) command extension,
+which could generate a sqlobject/sqlalchemy backend
+editor/crud (create, read, update, delete) interface based
+on your Model with genshi template.
+It could be plugged into any projects even if you don't use genshi template.
+
+The generated codes are fully customizable.
+tgcrud heavily use form widgets and show you many
+TG 1.0 features in it's controllers/templates.
+
+Please refer to http://docs.turbogears.org/1.0/CRUDTemplate for detail
2007 Fred Lin [EMAIL PROTECTED]
\ No newline at end of file
Modified: projects/tgcrud/trunk/tgcrud/command.py
==============================================================================
--- projects/tgcrud/trunk/tgcrud/command.py (original)
+++ projects/tgcrud/trunk/tgcrud/command.py Mon Jul 23 22:48:13 2007
@@ -1,3 +1,4 @@
+"""templates and command"""
import pkg_resources
from turbogears.util import get_package_name, load_project_config
import optparse
@@ -6,6 +7,7 @@
from turbogears import config
class CrudTemplate(TGTemplate):
+ """crud templates"""
#egg_plugins = ["tgcrud"]
#required_template = [""]
_template_dir = pkg_resources.resource_filename(
@@ -15,6 +17,7 @@
summary = "tg crud base template"
class CrudSOTemplate(TGTemplate):
+ """crud controller with sqlobject"""
required_template = ["tgcrudbase"]
_template_dir = pkg_resources.resource_filename(
"tgcrud.templates",
@@ -23,6 +26,7 @@
summary = "tg crud sqlobject template"
class CrudSATemplate(TGTemplate):
+ """crud controller with sqlalchemy"""
required_template = ["tgcrudbase"]
_template_dir = pkg_resources.resource_filename(
"tgcrud.templates",
@@ -62,6 +66,7 @@
name = package
def __init__(self,*args, **kwargs):
+ """parser"""
parser = optparse.OptionParser(
usage="%prog crud [model name] [modelpackage name]")
parser.add_option("-m", "--model",
Modified:
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/form.html_tmpl
==============================================================================
---
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/form.html_tmpl
(original)
+++
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/form.html_tmpl
Mon Jul 23 22:48:13 2007
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
Modified:
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/list.html_tmpl
==============================================================================
---
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/list.html_tmpl
(original)
+++
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/list.html_tmpl
Mon Jul 23 22:48:13 2007
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
Modified:
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/master.html
==============================================================================
---
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/master.html
(original)
+++
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/master.html
Mon Jul 23 22:48:13 2007
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
@@ -32,20 +32,19 @@
<a href="${tg.url('/logout')}">Logout</a>
</span>
</div>
- <div id="header"> </div>
+ <div id="header"> </div>
<div id="main_content">
<div id="status_block" py:if="tg_flash" class="flash"
py:content="tg_flash"></div>
<div py:for="js in tg_js_bodytop" py:replace="ET(js.display())" />
<div py:replace="select('*|text()')" />
- <div py:for="js in tg_js_bodybottom" py:replace="ET(js.display())" />
+ <div py:for="js in tg_js_bodybottom" py:replace="ET(js.display())" />
- <!-- End of main_content -->
- </div>
+ </div><!-- End of main_content -->
<div id="footer"> <img
src="${tg.url('/static/images/under_the_hood_blue.png')}" alt="TurboGears" />
<p>TurboGears is a open source front-to-back web development
framework written in Python</p>
- <p>Copyright © 2007 Kevin Dangoor</p>
+ <p>Copyright © 2007 Kevin Dangoor</p>
</div>
</body>
Modified:
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/show.html_tmpl
==============================================================================
---
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/show.html_tmpl
(original)
+++
projects/tgcrud/trunk/tgcrud/templates/crud/+modelpackage+/templates/show.html_tmpl
Mon Jul 23 22:48:13 2007
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"