{ "info": { "author": "Chunwei Yan", "author_email": "yanchunwei@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta" ], "description": "Swinf Web Frame\r\n================\r\n\r\nSwinf is a simple micro-framework for small web application and has no dependencies other than the Python Standard Liberaty.\r\n\r\nIt offers a built-in HTTP Server, and a simple route binding mechanism.\r\n\r\n\r\nCommands\r\n---------\r\nrun command : **swinf-admin.py startproject newproject** and swinf will create a project directory.\r\n\r\nInside current project directory, there are a **main.py** and three subdirectories:\r\n\r\ncontroller::\r\n\r\n containing controllers.\r\n\r\nview::\r\n \r\n containing view template files.\r\n\r\n subdirecties:\r\n \r\n static/: contains static files\r\n \r\n static/images: images here\r\n \r\n static/style: css files here\r\n\r\n static/script: js files here\r\n\r\n static/files: other static files here\r\n\r\nmodel::\r\n \r\n you can put your database controlling code here.\r\n\r\n\r\nYou can add some controllers in `controller` directory and run `main.py`, and it will work.\r\n\r\nTemplate\r\n---------\r\nCurrently, swinf have a simple template engine called `SimpleTemplate`.\r\n\r\nthe tpl syntax follows below\r\n\r\n.. code-block:: html\r\n\r\n \r\n\r\n {%\r\n # multiline code\r\n\r\n def bold_wrapper(txt):\r\n return \"\" + txt + \"\"\r\n endef\r\n %}\r\n\r\n %% # sigleline code\r\n %% if name:\r\n