ebook img

Flask-AppBuilder Documentation PDF

129 Pages·2015·1.07 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Flask-AppBuilder Documentation

Flask-AppBuilder Documentation Release 1.5.0 Daniel Vaz Gaspar November04,2015 Contents 1 Fixes,bugsandcontributions 3 2 Contents: 5 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 CommandLineManager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 BaseConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 BaseViews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6 ModelViews(QuickHowto) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.7 ModelViewsonMongoDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.8 ChartViews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.9 ModelViewswithFilesandImages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 2.10 QuickMinimalApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.11 ModelRelations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 2.12 Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 2.13 AdvancedConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.14 Customizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.15 Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.16 GenericDataSources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 2.17 MultipleDatabases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.18 i18nTranslations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 2.19 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.20 UserRegistration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 2.21 APIReference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 2.22 VersionMigration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 2.23 Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 3 Indicesandtables 117 PythonModuleIndex 119 i ii Flask-AppBuilderDocumentation,Release1.5.0 Simple and rapid application development framework, built on top of Flask. Includes detailed security, auto CRUD generationforyourmodels,googlechartsandmuchmore. LotsofexamplesandaliveDemo(loginhasguest/welcome). Contents 1 Flask-AppBuilderDocumentation,Release1.5.0 2 Contents 1 CHAPTER Fixes, bugs and contributions You’rewelcometoreportbugs,proposenewfeatures,orevenbettercontributetothisproject. Issues,bugsandnewfeatures Contribute 3 Flask-AppBuilderDocumentation,Release1.5.0 4 Chapter1. Fixes,bugsandcontributions 2 CHAPTER Contents: 2.1 Introduction Themaingoalforthisprojectistoprovideasimpledevelopmentframeworkthathandlesthemainproblemsanyweb applicationorsiteencounters. ItwillhelpyouadheretotheDRY(Don’trepeatyourself)principle. KeepinmindthatititpossibletodevelopdirectlyonFlask/Jinja2forcustompagesorflows,thatpainlesslyintegrate withtheframework. Thisframeworkgoesfurtherthananadminscaffoldingpackage. Ithasbuiltinpresentationandbehaviouralternatives, andyoucaneasilybuildyourown. It’shighlyconfigurable,andshipswithextragoodies. It’sintendedtolowererrors,bugsandproject’stimetodeliver. ThispackagehassomeCSSandJSbatteriesincluded: • GooglechartsCSSandJS • BootStrapCSSandJS • BootsWatchThemes • Font-AwesomeCSSandFonts 2.1.1 Includes: • Database – SQLAlchemy,multipledatabasesupport: sqlite,MySQL,ORACLE,MSSQL,DB2etc. – MongoDB,usingmongoEngine,stillpartialsupport(onlynormalized). – Multipledatabaseconnectionssupport(Verticalpartitioning). – Easymixinaudittomodels(created/changedbyuser,andtimestamps). • Security – Automaticpermissionslookup,basedonexposedmethods. ItwillgrantallpermissionstotheAdmin Role. – InsertsontheDatabaseallthedetailedpermissionspossibleonyourapplication. – Public(noauthenticationneeded)andPrivatepermissions. – Rolebasedpermissions. 5 Flask-AppBuilderDocumentation,Release1.5.0 – AuthenticationsupportforOAuth,OpenID,Database,LDAPandREMOTE_USERenvironvar. – Supportforselfuserregistration. • ViewsandWidgets – Automaticmenugeneration. – AutomaticCRUDgeneration. – Multipleactionsondbrecords. – Bigvarietyoffiltersforyourlists. – Variousviewwidgets: lists,master-detail,listofthumbnailsetc – Select2,Datepicker,DateTimePicker – Googlechartswithautomaticgroupbyordirectvaluesandfilters. • Forms – Automatic,Add,EditandShowfromDatabaseModels – Labelsanddescriptionsforeachfield. – Automaticbasevalidatorsfrommodel’sdefinition. – Customvalidators,extrafields,customfiltersforrelateddropdownlists. – ImageandFilesupportforuploadanddatabasefieldassociation. Itwillhandleeverythingforyou. – FieldsetsforForm’s(Djangostyle). • i18n – Supportformulti-languageviaBabel • Bootstrap3.3.1CSSandjs,withSelect2andDatePicker • Font-Awesomeicons,formenuiconsandactions. 2.2 Installation Installationisstraightforward,usingthenormalpythonpackageinstall. Idoadviseyoutoadditionallyinstallthebase skeletonapplicationsothatyoucanimmediatelyhavearunningapplication(withoutanymodelsyet)andaneasyto growboilerplate. CheckoutinstallationvideoonYouTube 2.2.1 Using pip • SimpleInstall Youcaninstalltheframeworksimplyby: $ pip install flask-appbuilder • AdvisedVirtualEnvironmentInstall Virtualenvishighlyadvisablebecausethemoreprojectsyouhave,themorelikelyitisthatyouwill beworkingwithdifferentversionsofPythonitself,oratleastdifferentversionsofPythonlibraries. Let’s face it: quite often libraries break backwards compatibility, and it’s unlikely that any serious 6 Chapter2. Contents:

Description:
Lots of examples and a live Demo (login has guest/welcome). Contents. 1 . The skeleton application is not actually needed for you to run AppBuilder, but it's a good way to start. Babel's features, so on config you must only setup english: .. In the future F.A.B. will probably use AngularJS to disp
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.