For the doc sprint, todo items have been given three categories:
Todo
Difficulty: Medium. make docs more linky. provide link to pylons, and why tg2 is now based on it. eventually, I’d really like to see links to pylonsbook for specific “more information”, and how turbogears is different/expands upon it
(The original entry is located in index.rst, line 127 and can be found here.)
Todo
Provide sample code for the “Log in with ...” implementations.
(The original entry is located in main/Auth/OpenID.rst, line 268 and can be found here.)
Todo
Difficulty Medium/Hard: document how to provide group/permission support when using an OpenID Authentication provider.
(The original entry is located in main/Auth/OpenID.rst, line 299 and can be found here.)
Todo
Difficulty Hard: document how to store OpenID identifiers in SQLAlchemy (i.e. add records for each new OpenID identity)
(The original entry is located in main/Auth/OpenID.rst, line 301 and can be found here.)
Todo
Add links to Beaker region (task-specific caching mechanisms) support.
(The original entry is located in main/Caching.rst, line 348 and can be found here.)
Todo
Document what the default Beaker cache setup is for TG 2.x quickstarted projects (file-based, likely).
(The original entry is located in main/Caching.rst, line 349 and can be found here.)
Todo
Provide code-sample for use of cache within templates
(The original entry is located in main/Caching.rst, line 350 and can be found here.)
Todo
Difficulty: Medium. More doc types will be defined here when doc templates are brought online.
(The original entry is located in main/Contributing.rst, line 97 and can be found here.)
Todo
Difficulty: Hard. Document use of IIS with TurboGears thru a proxy.
(The original entry is located in main/Deployment.rst, line 85 and can be found here.)
Todo
Difficulty: Hard. Document usage of http://pypi.python.org/pypi/wsgisvc to deploy as a Win32 service
(The original entry is located in main/Deployment.rst, line 86 and can be found here.)
Todo
Difficulty: Easy. Make this extension more prominent, more likely to be found
(The original entry is located in main/Extensions/index.rst, line 18 and can be found here.)
Todo
Difficulty: Hard. At some point, we should also find a way to document how to handle Horizontal and Vertical Partitioning properly, and document that in here, too.
(The original entry is located in main/MultipleDatabases.rst, line 174 and can be found here.)
Todo
Difficulty: Easy to Medium. Does pagination still work this way for 2.1?
(The original entry is located in main/Pagination/index.rst, line 247 and can be found here.)
Todo
Difficulty: Medium to Hard. This is an empty file. We need to discuss this topic in depth.
(The original entry is located in main/Performance/TemplatePerformance.rst, line 5 and can be found here.)
Todo
Difficulty: Easy. previous paragraph referenced “widget browser” and “toolbox” as links. These do not exist for tg2. Need to add them back in here when they are eventually re-written.
(The original entry is located in main/SimpleWidgetForm.rst, line 396 and can be found here.)
Todo
Difficulty: Medium. Document how to install and use chameleon.genshi in tg2.1
(The original entry is located in main/Templates/ChameleonGenshi.rst, line 9 and can be found here.)
Todo
Difficulty: Medium. Document writing your own render function for templates
(The original entry is located in main/Templates/index.rst, line 38 and can be found here.)
Todo
Difficulty: Medium to Hard. write a tutorial to add a star rating widget to an application
(The original entry is located in main/ToscaWidgets/Cookbook.rst, line 138 and can be found here.)
Todo
Difficulty: Medium to Hard. Need some basic dojo widgets here.
(The original entry is located in main/ToscaWidgets/Cookbook.rst, line 153 and can be found here.)
Todo
Difficulty: Medium to Hard. write tutorial to show how to update select fields based on other choices
(The original entry is located in main/ToscaWidgets/Cookbook.rst, line 182 and can be found here.)
Todo
Difficulty: Medium to Hard. create a tutorial for an ajax enabled progress bar
(The original entry is located in main/ToscaWidgets/Cookbook.rst, line 189 and can be found here.)
Todo
Difficulty: Medium to Hard. create a tutorial for a file upload with progress bar
(The original entry is located in main/ToscaWidgets/Cookbook.rst, line 196 and can be found here.)
Todo
Difficulty: Medium to Hard. create tutorial for adding tabbed browsing to your website
(The original entry is located in main/ToscaWidgets/Cookbook.rst, line 248 and can be found here.)
Todo
Difficulty: Medium. This is nothing but code snippets. Add text describing what the code does.
(The original entry is located in main/ToscaWidgets/Cookbook/ActiveForm.rst, line 50 and can be found here.)
Todo
Difficulty: Medium. document the answer to this question: What about if someone is using this widget for a select field, and the value they want returned is the value of the id of an object of select values in a database?
(The original entry is located in main/ToscaWidgets/Cookbook/AutoComplete.rst, line 121 and can be found here.)
Todo
Difficulty: Medium. extend tutorial to include the SingleSelectCombo widget in a Form
(The original entry is located in main/ToscaWidgets/Cookbook/ExtSingleSelectCombo.rst, line 69 and can be found here.)
Todo
Difficulty: Medium. extend the tutorial to populate the options list by sending a JSON request
(The original entry is located in main/ToscaWidgets/Cookbook/ExtSingleSelectCombo.rst, line 70 and can be found here.)
Todo
Difficulty: Medium. extend the tutorial to have form field validation
(The original entry is located in main/ToscaWidgets/Cookbook/ExtSingleSelectCombo.rst, line 71 and can be found here.)
Todo
Difficulty: Medium. This entire tutorial is code snippets. Add some text to explain what is going on
(The original entry is located in main/ToscaWidgets/Cookbook/ExtTreeView.rst, line 63 and can be found here.)
Todo
Difficulty: Medium. Getting output as JSON and updating a data grid
(The original entry is located in main/ToscaWidgets/Cookbook/JQueryAjaxForm.rst, line 116 and can be found here.)
Todo
Difficulty: Medium. add section about the javascript callbacks
(The original entry is located in main/ToscaWidgets/Creation.rst, line 100 and can be found here.)
Todo
Difficulty: Easy. check this (.child_args), it’s been a while
(The original entry is located in main/ToscaWidgets/Creation.rst, line 170 and can be found here.)
Todo
Difficulty: Hard. get the widget browser working for toscawidgets.org
(The original entry is located in main/ToscaWidgets/Library.rst, line 94 and can be found here.)
Todo
Difficulty: Medium. This info is just copied over from the TG1 wiki tutorial, and needs to be vetted, expanded, and edited.
(The original entry is located in main/Wiki20/JSONMochiKit.rst, line 6 and can be found here.)
Todo
Difficulty: Medium. update the expose reference article for tg2
(The original entry is located in main/Wiki20/JSONMochiKit.rst, line 39 and can be found here.)
Todo
Difficulty: Medium. Understand “variable_provider”: you define tg.config[‘variable_provider’] = callable and that returns a dict with all the variables you want in all templates.
(The original entry is located in misc.rst, line 9 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/7db400f92f652fd4/95c256ac817a5102?hl=en How can I configure genshi?
(The original entry is located in misc.rst, line 13 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/daf8db234df8105b?hl=en Critical security update for tg2 users! (session cookie secret)
(The original entry is located in misc.rst, line 16 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/55d6bb9704b3127a?hl=en Accessing configuration
(The original entry is located in misc.rst, line 19 and can be found here.)
Todo
Difficulty: Medium. add in notes regarding how to use repoze.who’s user_checker
(The original entry is located in misc.rst, line 27 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/c2aa4cb5ed07f52d?hl=en Everything there is to know about the current auth/identity in TG2
(The original entry is located in misc.rst, line 29 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/3afbc13d88af57d3?hl=en TG2 repoze.who and multiple auth sources
(The original entry is located in misc.rst, line 32 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/f3c2c616f5530426?hl=en Help with Authentication
(The original entry is located in misc.rst, line 35 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/54306a9fd9b76a7d?hl=en How to check if the user is authorized for a controller or action
(The original entry is located in misc.rst, line 38 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/f6c61b5f1668e6d3?hl=en Auth can now be configured via config [ini] files percious: priority high
(The original entry is located in misc.rst, line 41 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/ba405adcabf4f78f?hl=en Configuring LDAP authentication on turbogears2 percious: priority high on this one
(The original entry is located in misc.rst, line 45 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/4a87b275876647b6?hl=en list of connected users?
(The original entry is located in misc.rst, line 49 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/9fab648428c20761?hl=en login_handler
(The original entry is located in misc.rst, line 52 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/f35ef3d347793682?hl=en What’s wrong with predicates being “booleanized”
(The original entry is located in misc.rst, line 55 and can be found here.)
Todo
Difficulty: Hard. TW2 usage documentation
(The original entry is located in misc.rst, line 62 and can be found here.)
Todo
Difficulty: Easy. Add note for “validator=Schema(allow_extra_fields=True)” for ToscaWidgets and RestController classes
(The original entry is located in misc.rst, line 64 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/33a64a06ee4020ce?hl=en Upload images to a TG2 app with Dojo (Ajax style)
(The original entry is located in misc.rst, line 66 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/bb07ff87d38367f0?hl=en Best way to add fields on the fly to TW Forms?
(The original entry is located in misc.rst, line 69 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/ca5ddeabdc7cb517?hl=en trying to inject Dojo resources with ToscaWidgets
(The original entry is located in misc.rst, line 72 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/72e106fc6512b1cb?hl=en Toscawidgets form with multiple buttons priority: low
(The original entry is located in misc.rst, line 75 and can be found here.)
Todo
Difficulty: Hard. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/a691ae9d3b31138d?hl=en Flash Widget
(The original entry is located in misc.rst, line 79 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/7d5a07b4a21d7226?hl=en Visitor IP & pre-populated toscawidget field from database
(The original entry is located in misc.rst, line 82 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/be2939380bfe0f2b?hl=en Using ImageButton() as submit throws an error
(The original entry is located in misc.rst, line 85 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/c721e2d15bb2c134?hl=en Return to form after custom validation and keep form data?
(The original entry is located in misc.rst, line 88 and can be found here.)
Todo
Difficulty: Medium. Document @restrict decorator, restricts request types that a given method will respond to
(The original entry is located in misc.rst, line 94 and can be found here.)
Todo
Difficulty: Medium. incorporate custom routes docs from here http://simplestation.com/locomotion/routes-in-turbogears2/ percious: There is a better way of doing this by overriding _dispatch in 2.0 so I would wait until I re-write RoutedController with _dispatch before documenting this
(The original entry is located in misc.rst, line 96 and can be found here.)
Todo
Difficulty: Hard. RestController requires that all data come in as a key/value pair, can’t just get raw POST body. percious: not sure what you mean by this. You want to provide RestController with just a blob of data? jorge: yes, this was the complain from europe74 this goes against the atom protocol http://tools.ietf.org/html/rfc5023#section-9.2 I think that this needs to be a trac ticket, not a doc todo
(The original entry is located in misc.rst, line 100 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/ad87eeef701ed1b1?hl=en exception object in ErrorController
(The original entry is located in misc.rst, line 105 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_thread/thread/3ba7ca9d35fd9d75?fwc=1 mounting test-controllers/getting root-controller instance?
(The original entry is located in misc.rst, line 108 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/b97ee4faeb6acd53?hl=en CRC does wacky pluralization percious: this should probably be a trac ticket, not a doc todo.
(The original entry is located in misc.rst, line 111 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/d4635f5eb2ad1dc4?hl=en how could a controller method know whether it’s invoked as an error_handler or directly
(The original entry is located in misc.rst, line 115 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/9b451d82b410f844?hl=en TG2 serveFile equivalent?
(The original entry is located in misc.rst, line 118 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/1c4158ad3035082c?hl=en Secure Static Files TG2
(The original entry is located in misc.rst, line 121 and can be found here.)
Todo
Difficulty: Medium. http://turbogears.org/2.0/docs/main/DownloadInstall.html references ttp://www.turbogears.org/2.0/downloads/current/tg2-bootstrap.py and this needs to be updated. Or does it? request from percious, the code to generate the installer currently has tg.devtools/scripts/_installer.py and it’s fixed at 2.0 only update needed is to hg
(The original entry is located in misc.rst, line 127 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/263233e9a8081c7a?hl=en easy_install and offline installation in virtualenv og TG2 percious: we need to add an offline install section to deployment. This should not be very difficult, it’s basically 2 commands.
(The original entry is located in misc.rst, line 132 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/bbf8c847e77ca740?hl=en TG2 on Webfaction - Make TG not see the extra part of the URL
(The original entry is located in misc.rst, line 136 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/1b82fa2b4a95957e?hl=en How do I save to DB using paster shell
(The original entry is located in misc.rst, line 141 and can be found here.)
Todo
Difficulty: Hard. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/92581851b407cdd6?hl=en migrate priority: high
(The original entry is located in misc.rst, line 144 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/57229bc8677f0e6b/a9843e77e67af793?hl=en Problem with accessing attributes after transaction.commit()
(The original entry is located in misc.rst, line 147 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/d64d27b2cf54bb2e?hl=en Suggestion about how turbojson handle SQLAlchemy object circuit jorge: this seems like a feature request rather than a docs item
(The original entry is located in misc.rst, line 150 and can be found here.)
Todo
Difficulty: uncertain. Document how SA+TG+Transaction manager work together.
(The original entry is located in misc.rst, line 153 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/4fc2abf3b91b9ce3?hl=en tg_template is now override_template
(The original entry is located in misc.rst, line 159 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_thread/thread/1174aad1b3350b5c TurboGears2: Overriding meta element on child template.
(The original entry is located in misc.rst, line 162 and can be found here.)
Todo
Difficulty: Medium. critique the toc, and other organization.
(The original entry is located in misc.rst, line 169 and can be found here.)
Todo
Difficulty: Hard. add prerequisites to all pages - well, especially tutorials
(The original entry is located in misc.rst, line 175 and can be found here.)
Todo
Difficulty: Hard. Compare Our Docs to Django Docs <http://docs.djangoproject.com/en/dev/, see where we can do better. Also compare to pylons book!
(The original entry is located in misc.rst, line 177 and can be found here.)
Todo
Difficulty: Medium. laurin is following the tutorial path. right now, I created a tutorials directory under _static. perhaps, all tutorial images, etc should go in there? just a thought.
(The original entry is located in misc.rst, line 180 and can be found here.)
Todo
Difficulty: Medium. make docs more linky. provide link to pylons, and why tg2 is now based on it. eventually, I’d really like to see links to pylonsbook for specific “more information”, and how turbogears is different/expands upon it
(The original entry is located in misc.rst, line 184 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/1f9853eac52decd5?hl=en Rolling back transactions in TG2 (I think this is documented, need to double check)
(The original entry is located in misc.rst, line 188 and can be found here.)
Todo
Difficulty: Hard. Resolve all tickets that match this query: http://trac.turbogears.org/query?status=new&status=assigned&status=reopened&component=Documentation&order=id
(The original entry is located in misc.rst, line 191 and can be found here.)
Todo
Difficulty: Medium. include links to “read more” - especially true of tutorials that just scratch the surface (this kind of replaces the “more linky” todo)
(The original entry is located in misc.rst, line 197 and can be found here.)
Todo
Difficulty: Medium. parts is parts: the text on the frontgage of a quickstart says: “standing on the shoulders of giants, since 2007” - provide a main place to see what components are used (by default) in turbogears. don’t be afraid to mention TG2 is built on pylons now, and link to the pylonsbook for more info
(The original entry is located in misc.rst, line 200 and can be found here.)
Todo
Difficulty: Hard. only after showing the default components - show what components can be easily switched in TG2, and how
(The original entry is located in misc.rst, line 205 and can be found here.)
Todo
Difficulty: Medium. Add lifecycle of TG project in the getting to know TG section.
(The original entry is located in misc.rst, line 207 and can be found here.)
Todo
Difficulty: Medium. make sure that override_template is more visible, and provide a tutorial on how to use it
(The original entry is located in misc.rst, line 209 and can be found here.)
Todo
Difficulty: Medium. http://code.google.com/p/tgtools/source/browse/projects/tgext.admin/trunk/tgext/admin/tgadminconfig.py#114 << how to override tgext.admin controllers properly
(The original entry is located in misc.rst, line 211 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/9b07a8d34611f5d7?hl=en TG2 virtualenv MySQLdb ImportError. Should we be providing documentation to debug MySQLdb problems? Seems out of scope.
(The original entry is located in misc.rst, line 213 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/5dd5b090eb0d4c49?hl=en List of Quickstarted files that are safe to remove percious: I think this is a terrible idea to document
(The original entry is located in misc.rst, line 217 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/ae89ea2b3a354bc2?hl=en Lukasz Szybalski’s docs: http://lucasmanual.com/mywiki/TurboGears2
(The original entry is located in misc.rst, line 221 and can be found here.)
Todo
Difficulty: Medium. Include these docs: http://groups.google.com/group/turbogears/browse_frm/thread/4023f34fd114121e?hl=en Trouble with WebHelpers
(The original entry is located in misc.rst, line 227 and can be found here.)
Todo
Difficulty: Medium. Incorporate these docs: http://groups.google.com/group/turbogears/browse_frm/thread/b718855725da557d?hl=en tgext and i18n
(The original entry is located in misc.rst, line 230 and can be found here.)
Todo
Difficulty: Hard. Performance deployment enhancements pretty much explain all the YSlow issues * serving static files from the frontent, /config/app_cfg.py base_config.serve_static = False * compressing JS/html/CSS,etc
(The original entry is located in misc.rst, line 233 and can be found here.)
Todo
Difficulty: Medium. Add shell script which validates environment for building docs
(The original entry is located in misc.rst, line 237 and can be found here.)
Todo
Add beginner’s documentation on how to link the Feed via link tags for auto-discovery and how to link for manual discovery. Also need to document e.g. what to do about escaping HTML content or
(The original entry is located in modules/thirdparty/webhelpers_feedgenerator.rst, line 59 and can be found here.)
Todo
link repoze.who, repoze.what, and the other key middleware
(The original entry is located in recipesandfaq.rst, line 34 and can be found here.)
Todo
Document initial DB setup in websetup.py
(The original entry is located in recipesandfaq.rst, line 50 and can be found here.)
Todo
Link DB setup (MySQL, PostgreSQL, etceteras) docs
(The original entry is located in recipesandfaq.rst, line 51 and can be found here.)
Todo
document the transaction module, part of the repoze.tm package, introduction for implementers here... http://repoze.org/tmdemo.html
(The original entry is located in recipesandfaq.rst, line 52 and can be found here.)
Todo
JQuery, Dojo, EXT usage doc-links
(The original entry is located in recipesandfaq.rst, line 142 and can be found here.)
Todo
Link documentation for doing JSON RPC/Ajax here
(The original entry is located in recipesandfaq.rst, line 143 and can be found here.)
Todo
Difficulty Medium: document how to “freeze” applications (PIP, zc.buildout, etceteras) for re-deployment with precisely the same software on each machine (no downloads etceteras)
(The original entry is located in recipesandfaq.rst, line 167 and can be found here.)
Todo
Difficulty: Medium. optimization tips for SQLAlchemy usage
(The original entry is located in recipesandfaq.rst, line 207 and can be found here.)
Todo
Difficulty: Hard. Add testimonials
(The original entry is located in testimonials.rst, line 12 and can be found here.)
Todo
Difficulty: Medium. Validate that toctree maxdepth values are appropriate
(The original entry is located in toc.rst, line 90 and can be found here.)
Todo
Difficulty: Medium. Validate that this toctree actually reflects what we want. Reduce it as necessary, reorg it, make it somewhat simpler.
(The original entry is located in toc.rst, line 92 and can be found here.)
Todo
Difficulty: Hard. Add cardlist manager whitepaper (from m.pedersen)
(The original entry is located in whitepapers/cardlist.rst, line 9 and can be found here.)
The existing tutorial is great marketing ... very compelling. However, it’s pedagogically weak. It’s too rushed and assumes far too much familiarity with the ORM ... and the overall conceptual basis for web development frameworks. For example there’s no explanation of MVC and not discussion of how a new developer would recognize the separation semantics.
Make sure to discuss mod_wsgi more fully < peep1> should tg2/mod_wsgi work slower than stock paste/pylons installation? < peep2> yea, tg2 will be somewhat slower than stock pylons < peep2> genshi is not as fast as mako < peep2> there’s a couple more pre-loaded wsgi middleware components, etc < peep2> if you use mako they get pretty close together
Root Url of app is in environ, SCRIPT_PATH
Don’t use AddRecordForm, use FormBase instead. AddRecordForm automatically disables the primary key fields. The only other difference between AddRecordForm and FormBase is the assignment of the __check_if_unique__ property to True.
Q: How can I enable editing of the ‘id’ field on a Sprox AddRecordForm? A: Override _do_get_disabled_fields(self) in your subclass and return self.__disable_fields__[:]. By default it excludes the field(s) returned by self.__provider__.get_primary_field(self.__entity__) Or, since that is the only feature added by AddRecordForm, don’t use AddRecordForm. XD From the docstrings: “”“Override this function to define how”“”
the tg.config variable is created when middlware.py does the load_environment call well, not created, but updated with the ini file values, etc you can’t use it before that. But all the ini values are passed in to the make_middlware call in middlware.py so you can use them there if you need to
< peep1> hey all, i’m using TG1, and wondering what my options are for making an asynchronous HTTP request from a controller method < peep1> i want the controller to return ASAP, and don’t care about callbacks from the (long-running) HTTP request < peep1> threads don’t seem to work (they get killed off when the controller method exits), and i’d prefer not to go down the rabbit warren of twisted or similar < peep1> calling curl from subprocess seems my best option at the moment, but seems to be The Wrong Solution - any other ideas? < peep2> I’d look into threads, and find out why the thread gets killed, and then fix that. < peep1> ah, rather than started threads directly from the controller, I’ll put a queue in there, see if it helps < peep3> goodgracious: you pretty much need to fork in some way. threads will be no good as the webserver will recycle it as you found out.
< peep1> where should one place robots.txt in a tg2 installation? < peep1> ./public ? < peep2> that should work < peep2> according to pylons docs, public is searched before going through controllers < peep2> I assume this still applies with turbogears < peep1> y, that worked
< peep> map.connect(‘/{lang}/{controller}/’, requirements=dict(lang=’bg|en|ro|ru’))
from tg.controllers import CUSTOM_CONTENT_TYPE
class FilesController(RestController):
@@expose(content_type=CUSTOM_CONTENT_TYPE)
def get_one(self, file_type, *file_path):
file_path = list(file_path)
if pylons.request.response_ext:
file_path[-1]+=pylons.request.response_ext
pylons.response.headers['Content-Type'] = 'text/plain'
pylons.response.headers['Content-Disposition'] = 'attachment; filename="'+file_path[-1]+'"'
return file(file_path, "r").read()