I'm pleased to announce the release of Moya 0.5.14. Moya is a web application platform written in Python.
This release is an accumulation of bug-fixes and modest features. Here is a highlight:
-
Cross Site Request Forgery (CSRF) protection was added to Moya Forms. CSRF is a class of exploits that involve making a request on behalf of a user, for malicious purposes. Moya protects against this using established techniques that check that the submitted form was generated by the site itself. This will be done automatically and doesn't require any changes to form code.
-
Added thread support to Moya Code. If you want code to run in a thread, wrap it in a <thread> tag. With no parameters, the code inside the thread will run in parallel until completion. If you add the
dst
parameter, and reference that value in your code, it will block until the thread has completed. -
Added <system-call> tag to invoke external applications.
-
Added
{% lorem %}
template tag to easily generate lorem ipsum text in templates. -
Added db:decimal tag for decimal fields in db models.
-
Added <db:property> tag which adds properties based on expressions to models. It is used in the auth lib, so you can do
user.full_name
which combines thefirst_name
andlast_name
fields. -
Added
forupdate
to <db:query>, which issues aFOR UPDATE
in the generated SQL. -
Added a number of parameters to the table library to dynamically hide columns / cells and set cell alignment. The Tables library can now pack a lot of punch.
-
Added
linkify
parameter to thetext
markup type, which turns URLs in to links in addition to adding line breaks. For example:{% markup content as 'text' set linkify=yes %}
. -
Added
token:
modifier to generate a random token which generates a random alphanumeric token. For example;token:16
, creates a random token of 16 characters. -
Added
hidelabel
parameter to form fields, which hides the label, but renders it in the markup for screen readers.
Moya can be installed via PIP, or by installing the code from GitHub.
Other than the tags, which are auto-generated, the documentation hasn't yet caught up with some of the new features. I will be working on the docs in the next few weeks.
For more details on recent changes, see CHANGES.txt.
For a complete working Moya project see Bean Counter or Notes.