{ "info": { "author": "Anton A Nesterov", "author_email": "nesforge@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable" ], "description": "## ****Laconic MVC****\r\n### A distributive for fast deployment on Google App Engine.\r\n-----\r\n\r\n### **Benefits:**\r\n[Laconic MVC](http://laconic-mvc.appspot.com/) - the handy environment for developing GAE applications.\r\n\r\n * This boilerplate contains best python libraries for web development.\r\n * GaeDataManager - upload manager for datastore.\r\n * BottleGaeWrapper - wrapper around beaker, appengine users sevice, mako templates.\r\n\r\n\r\nGaeDataManager can serve as great starting pattern for BackboneJS (CoffeeScript) ifaces.\r\n##### [Example](http://laconic-mvc.appspot.com/files/)\r\n##### [file-manager.coffee](https://bitbucket.org/nesforge/laconic/raw/ebb4ef0ae81cad8d6e07bbf52f9303fad6043b1f/app/view/assets/file-manager.coffee)\r\n----\r\n###***How to:***\r\n##### ***Create controller:***\r\n###### ./app/index.py\r\n```python\r\n\r\n from config import app\r\n from model.index import Model\r\n\r\n @app.get('/')\r\n def index(wrap): #wrap is wrapper for gae\r\n\r\n\r\n data_query = Model.all()\r\n\r\n wrap.page_number = request.query.get('page')\r\n wrap.page_size = request.query.get('size')\r\n\r\n wrap.paginate(data_query)\r\n\r\n return wrap.render('index.haml', key = value, name = 'world', **{})\r\n\r\n```\r\n-----\r\n\r\n##### ***Create view***:\r\n\r\n###### ./app/view/index.haml:\r\n```HAML\r\n %%inherrit(file=\"layout.haml\")\r\n\r\n %div.panel.row\r\n\r\n -if name:\r\n\r\n Hello ${name}!!\r\n\r\n -for i in name:\r\n ${i}\r\n\r\n %%include(file=\"file.haml\")\r\n\r\n```\r\n\r\n----\r\n\r\n##### ***Write in session***:\r\n\r\n```python\r\n wrap.set(counter=0)\r\n wrap.get('counter')\r\n wrap.clean() #clean session data\r\n```\r\n\r\n----\r\n\r\n##### ***Get user info***:\r\n\r\n```python\r\n wrap.user()\r\n wrap.nickname()\r\n wrap.email()\r\n wrap.user_id()\r\n```\r\n\r\n----\r\n\r\n##### ***Call Login / Logout actions***:\r\n\r\nSimply, a http query string must contain 'login' or 'logout' in order to call login/logout actions.\r\n\r\n```python\r\n wrap.login()#.logout()\r\n```\r\n\r\n----\r\n\r\n##### ***Check permissions:***\r\n\r\nWrite your own permission control methods in ./dist/handlers.py. (engine class)\r\nThere are two methods by default.\r\n\r\n```python\r\n wrap.admin()\r\n wrap.permission('admin')\r\n```\r\n\r\n----\r\n\r\n##### ***Run unit tests:***\r\n\r\nThere are who runners - the first one for datastore models, another for controllers.\r\n\r\n###### ***Test datastore models:***\r\n To test your model create test file in model directory (example: ./app/model/test_example.py),\r\nand run 'db_tests.py' with path to google app engine as first argument:\r\n```sh\r\n python db_tests.py /path/to/google_app_engine\r\n```\r\n\r\n###### ***Test controllers***\r\n To test your controllers write your callbacks and requests in test_app.py ,\r\nand run with path to google app engine as first argument:\r\n\r\n```sh\r\n python test_app.py /path/to/google_app_engine\r\n```\r\n\r\n##### ***Develop frontend***\r\n\r\n All frontent libraries live in './app/view/static/' ,\r\nCoffeeScript and SCSS files placed in './app/view/assets/' .\r\nIn order to compile assets directory - run ./app/view/build.sh.\r\n
\r\n```sh\r\n sh ./app/view/build.sh\r\n```\r\n\r\nYou can bind this command to your lovely editor or IDE.\r\n\r\n\r\n----\r\n#### ***This distributive includes:***\r\n * GaeDataManager - Upload manager for Google datastore.\r\n * BottleGaeWrapper - GAE utils for bottle.\r\n * PyHaml - HAML syntax for Mako.\r\n * CoffeeScript - Best syntax sugar for javascript.\r\n * Foundation5 - Responsive CSS framework.\r\n * BackboneJS / Jquery.\r\n * Bottle.py - WSGI microframework.\r\n * Mako - Python template engine.\r\n * Markdown - Markdown for python.\r\n * WTForms - Web form renderer.\r\n * Beaker - Session midleware\r\n * GAE mini profiler - app engine profiler\r\n * Beautiful Soup 4 - Python html parser.\r\n * WebTest - WSGI test runner\r\n-----\r\n\r\n(c) Anton A Nesterov 2014\r\nLICENSE: Apache2.0", "description_content_type": null, "docs_url": null, "download_url": "https://bitbucket.org/nesforge/laconic/downloads", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "GAE, google, bottle, webtest, mvc", "license": "Copyright 2014 Anton A Nesterov\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.", "maintainer": "", "maintainer_email": "", "name": "Laconic-MVC", "package_url": "https://pypi.org/project/Laconic-MVC/", "platform": "Google App Engine", "project_url": "https://pypi.org/project/Laconic-MVC/", "project_urls": { "Download": "https://bitbucket.org/nesforge/laconic/downloads" }, "release_url": "https://pypi.org/project/Laconic-MVC/1.0/", "requires_dist": null, "requires_python": null, "summary": "The handy environment for developing GAE applications.", "version": "1.0" }, "last_serial": 1157040, "releases": { "1.0": [] }, "urls": [] }