Sqlobject Column Types Using Model Clases Controllers Kid

Sqlobject Column Types Using Model Clases Controllers Kid

tg-admin Commands SQLObject Column Types il8n BLOBCol Blob data (MySql, Postgres, and SQLlite only info BoolCol Stores true/false data works (differently) on all backends quickstart cherrypy.request shell CurrencyCol Equivalent to DecimalCol(size=10, precision=2) remoteAddr sql create stores date – returned as datetime DateCol queryString sql update DateTimeCol stores date and time – returned as datetime params Toolbox Stores a decimal (size=(Number of digits), simple_cookie update DecimalCol precision=after the decimal) SQLObject FloatCol Stores a float @expose Column Paramaters can store any python object (it’s an extension of template PickleCol inputform dbName BLOBCol which uses pickle) allow_json default Stores a string (if length is defined that’s the length if StringCol format alternateID not then a TEXT col is used. content_type unique UnicodeCol Special string col that encodes in utf-8 by default notNone @validate Using Model Clases form=formName SQLObject UserName(name=”Fiona”, Creates a new UserName object with two string Table Relations type=”Apple”) attributes – name and type. validators MultipleJoin Gets the first user row (as a UserName object) and u=UserName.get(1) NotEmpty SingleJoin assigns it to the variable u PlainText RelatedJoin u.set(name=”Johnny”) sets the name of the user referenced by u to “Johnny” Regex ForegnKey OneOf UserName.select() Returns all UserName objects matching the select criteria (eg Username.q.name=”Johnny”) DictConverter FastData IndexListConverter UserName.byName(‘Johnny’) Only works if Name is an alternateID! returns the user ‘Johnny’ DateValidator turbogears.widgets Email UserName.delete(1) Deletes User with ID=1 URL Field Widgets PhoneNumber AutoComplete DateConverter Button Controllers TimeConverter SubmitButton classes/methods = URL’s Your class hierarchy defines your URL schema, with StripField the first matching class/method ResetButton StringBool ImageButton def doMethod Parameters (self, Keywords) FieldsMatch CheckBox def default Special method which gets called when no method CreditCardValidator CheckBoxList matches (all sub-url’s work call this!) CalendarDateTimePicker def index Special method which gets called when the URL is @error_handler CalendarDatePicker called with no further method/paramater information @exception_handler HiddenField User=DataControler( Creates a set of /User urls to add, delete, edit, and list PasswordField sql_class=UserName) UserName records RadioButtonList identity SelectionField SingleSelectField Kid Templates Secure entire tree MultipleSelectField <?python SecureResource TextArea x = 0 Embed larger chunks of python in Kid with <?python SecureObject TextField ?> ?> syntax AutoComplete ${Variable} Replaces this expression with the value of Variable @identity.require in_group py:for repeats this tag once per item in the set provided Compound Widgets in_all_groups DataGrid py:if this element (and all it’s descendants) should be in_any_group Form rendered only if the py:if =value is true has_permissions TableForm has_all_permissions py:content replaces the contents of an xHTML element with the ListForm value of the py:content tag has_any_permissions LinkRemoteFunction Remote Form py:replace replaces the entire attribute with the value of the py: replace tag ©2006 Mark Ramm-Christesenen -- www.CompoundThinking.com -- Released under Creative Commons Attribution Licence http://my_app/greetings/greet?name=ronald Running Apache up front If you choose to deploy behind Apache the request will be forwarded by mod_rewrite after adding the X-Forwarded-Host and X-Forwarded-For headers Mapping the request CherryPy maps the request into an object tree, it tries to find the best matching method for ex.: root.greetings.greet(name=ronald) TurboGears Identity If TurboGears identity is active and your method is decorated with access rules, the system checks if there is a valid session with a user having the needed set of permissions Is there a session? Redirect to log-in page no Required privileges? Access denied no Validation If your method is decorated with a validator the incoming values will be controlled and coerced into Python types befored being handled over to your method Controller Model Postgress MySQL Do application specific stuff Create, update, select or delete records Firebird here and return a dictionary in your database without SQL by simple object manipulation regardless of your SQLite Widgets datastore SyBase SAPDB SQLServer Templates FastData FeedController Basic database functionality for free - Package and return your Kid Cheetah CRUD data as an Atom or RSS feed Stan HtmlPy Internationalization The I18n filter will replace your strings if you have a translation file available for the requested locale HTML XHTML JSON XML RSS Atom Mochikit Copyright 2006 Ronald Jaramillo AJAX http://www.checkandshare.com licensed under a Creative Commons Attribution 2.5 License .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us