05 Apr 2014
http://docs.python-guide.org/en/latest/starting/install/win/ If you're behind a proxy, start with this guide: https://github.com/chocolatey/chocolatey/wiki/Proxy-Settings-for-Chocolatey#using-chocolatey-behind-a-proxy-server (only the part starting with "Using Chocolatey behind a proxy server")03 Apr 2014 Add the following to the end of the List page's URL: ?ToolPaneView=202 Apr 2014 https://github.com/amoffat/bootstrap-application-wizard That looks like it will be useful someday.01 Apr 2014 This has an awesome example of how to override your base ModelView: http://code.vokor.org/vokorbb/src/04de9dcb666d2fb35513ca29c97654b6eef80648/vokorbb/admin.py?at=tip You would want to do this if you wanted to add something to all of your admin classes. Use cases:If you wanted to require login by overriding is_accessible for all of your ModelViews. If you wanted to add an export method to all of your ModelViews. 01 Apr 2014 Edited: This was recently added to Flask-Admin as a feature.
You can add “can_export = True” to your ModelView to enable it.
More info here: http://flask-admin.readthedocs.org/en/latest/api/mod_model/#flask_admin.model.BaseModelView.can_export
01 Apr 2014 You need to add the following to your jinja2 template:{{ request.path ~ '?' ~ request.query_string }} You can also print only the Get Variables / URL Parameters / Argument String with the following:print request.query_string The example is available here: http://stackoverflow.com/a/11781872/1364191 28 Mar 2014 Common Filter Operators: http://manuelmax.tumblr.com/post/289720781/common-filter-operators-sqlalchemy Common relationships: http://docs.sqlalchemy.org/en/latest/orm/relationships.html#basic-relational-patterns If you're using Flask-SQLalchemy, their documentation serves as an awesome quick summary of how to use SQLalchemy: http://pythonhosted.org/Flask-SQLAlchemy/ 27 Mar 2014 This link helped me use a temporary file for an excel export in flask (using pandas): https://coderwall.com/p/nwbuhq 27 Mar 2014 For a more complete example of using selectHandler, see this page: https://developers.google.com/chart/interactive/docs/basic_interactivity My example below get the labels from the row and the columns. I used this to send the user to another link and drill-down. // this is an example of a bar chart's selectHandler function function selectHandler() { var selection = chart.getSelection(); var item = selection[0]; if (item.row != null && item.column != null) { var rowLabel = parseInt(data.getValue(item.row, 0)); var columnLabel = data.getColumnLabel(item.column); } } google.visualization.events.addListener(chart, 'select', selectHandler);23 Mar 2014 Here's an example of how to send ordered data with python's Requests library, for when the order of your post request data matters: import requests from collections import OrderedDictpayload = OrderedDict([("username", "admin"), ("pwd", "password")]) # the order matters! r = requests.post('http://1.1.1.1/example', data=payload) print r.text