Namespace Index

To use these tag, add the namespace http://moyaproject.com to the root element.

Tags

The default namespace used for most of Moya's tags.

Tag Synopsis
<add-feed-item> add an item to an RSS feed
<admin-only> return a forbidden response if the user is not admin
<append> append a value to a list
<arg> add a positional argument to a command
<argument> define an argument to a macro
<ask> ask a yes / no question
<attempt> repeat a block until it is successful
<attribute> define an attribute in a custom tag
<auth-check> perform basic auth check
<bbcode> add bbcode to content
<bool> create a boolean
<break> end a loop prematurely
<breakpoint> drop in to the debugger
<cache-return> cache returned values
<call> invoke a macro
<call-element> invoke a macro element
<case> define a case in a switch
<catch> catch exceptions from the previous block
<check-modified> conditionally return a not modified response
<choice>
<choices> define choices
<choose> choose a random value from a collection
<command> define a command
<content> define content
<continue> skip remaining code in a loop
<copy> copy a value
<css> add a CSS to content
<data-tag> define a data tag
<datetime> create a date/time object
<debug> execute debug code
<dec> decrement a value
<dedent> remove common whitespace from a string
<default-case> default case in a switch
<default-markup> use default markup for missing values
<defer> jump to another element
<delete-cookie> delete a cookie
<denied> reject basic authorization
<dict> create a dict object
<do> repeat a block until a condition becomes true
<doc> document a tag
<done> return from a macro or callable without any data
<echo> write text to the console
<elif> an <else> with a condition
<else> execute a block if the previous <if> statement is false
<enum> map numbers on to identifiers
<exit> exit the current command
<extend> add values from one sequence to another
<false> create a False boolean
<feed> create an RSS feed
<filter> define a filter
<filter-seq> filter values from a sequence
<find-element> retrieve information regarding an element
<find-elements> retrieve information regarding elements of a given type
<fire> fire a signal
<float> create a floating point value
<for> iterate over a sequence
<for-children> iterate over the children of an element
<forbidden> respond with a forbidden response
<get-children> get an elements children
<get-data> get data from custom data tags
<get-data-item> get data from a single custom tag
<get-element> get information about an element
<get-enum> get an enumeration
<get-fq-url> get a fully qualified URL
<get-locale> get locale information
<get-markup-choices> get supported markups
<get-markup-types> get supported markups
<get-parent-element>
<get-tag-text> get text from the parent tag
<get-timezone-groups> get timezone choices
<get-timezones> get common timezones
<get-url> get a named URL
<group> group a sequence by common keys
<handle> respond to a signal
<highlight> syntax highlight code
<html> create raw html
<if> execute block if a condition is true
<if-get> exectute a block if this is a GET request
<if-post> execute a block if this is a POST request
<import> import a library
<inc> increment a value
<include-css> include CSS with content
<include-js> include a JS file in content
<input> ask the user for information in a command
<inspect> inspect elements in the project
<install> create an application from a library
<int> create an integer
<js> insert Javascript content
<json> create data from JSON
<let> create variables from expressions
<let-parallel> set values in parallel.
<let-str> create string variables
<lines> create a list from lines
<link> link variables
<list> create a list
<log> write information to the log
<log-debug> write information to the log
<log-error> write information to the log
<log-fatal> write information to the log
<log-info> write information to the log
<log-warn> write information to the log
<macro> define a re-usable block of code
<make-token> make an opaque token
<map> map an expression on to sequence
<map-dict> generate a list of dictionaries
<markdown> add markdown to content
<markup> insert markup in to content
<markup-insert> insert code from markup
<max> get the maximum value in a sequence
<media-url> get a URL to media
<middleware> add middleware to a mountpoint
<min> get the minimum value in a sequence
<mount> mount a library on a given URL
<mountpoint> define a collection of url routes
<moya> begin a Moya file
<node> creates a template node in content
<none> Create a value of None
<not-found> serve a '404 not found' response
<now> get the current date/time
<odict> create a dict object
<option> Add an option to a command
<page> get a page of results
<pop> remove a value from a dictionary
<preflight> check initial settings
<process-markup> markup text
<profile-python> profile python code
<progress> render an ascii progress bar
<progress-msg> set a progress message
<qualify-elementref> create an element reference with an app/lib name
<read-data> read and process data
<redirect> redirect to a named URL
<redirect-to> redirect to a new location
<remove> remove a value from a collection
<render> render an object in content
<render-all> render a sequence of renderable objects
<render-content> render content
<render-template> render a template and store the result
<render-template-fs> render a template in a filesystem
<repeat> repeat a block
<request> make an http request
<request-get> make a get requests
<request-post> make a post request
<resolve-template> resolve a relative template path
<respond> serve a response
<response> create a response object
<return> return data from a macro or other callable
<return-dict> shortcut to return a dictionary
<return-false> shortcut to return false
<return-scope> return values from the current scope
<return-str> shortcut to return a string
<return-true> shortcut to return true
<rewrite> serve response from a different named URL
<rewrite-to> serve response from a different location
<scope> create a temporary scope
<scope-node> creates a template node using the current scope
<section> create a content section
<section-body> add a 'body' content section
<section-content> add a 'content' content section
<section-css> add a 'css' content section
<section-footer> add a 'footer' content section
<section-head> add a 'head' content section
<section-includecss> add a 'includecss' content section
<section-includejs> add a 'includejs' content section
<section-js> add a 'js' content section
<section-jsfoot> add a 'jsfoot' content section
<serve> serve a response object
<serve-content> render and serve content
<serve-file> serve a file
<serve-json> serve an object as JSON
<serve-json-object> serve an dict as JSON
<serve-template> render and serve a template
<serve-template-fs> render and serve a template in a filesystem
<serve-xml> serve xml
<server> define a server
<set> create a set object
<set-cookie> set a cookie
<set-header> add additional headers
<set-item> set an indexed value on a collection
<set-language> set the current language
<set-locale> switch the current locale
<signature> define the attributes / arguments to a tag / macro
<sleep> wait for while
<slice> get a 'slice' of a collection
<sort> sort a sequence
<str> create a string
<sum> sums a sequence of values
<switch> jump to matching case
<system-call> run a system command
<tag> define a custom tag
<thread> run a thread
<throw> throw an exception
<time-span> create a timespan object
<timer> time a block of code
<title> set content title
<trace> extract routing information from mounted URL paths
<true> create a True boolean
<try> detect exceptions within a block
<update> add new values to a dictionary
<url> add a url to a mountpoint
<value> a value in an enumeration
<var> create a value
<view> define a view to handle a URL
<wait-on-threads> wait threads to complete
<while> repeat a block while a condition is true
<widget> create a re-uasable widget
<widget-yield> yield to code block in a widget
<with> create a new data scope
<wrap-tag> wrap a string in a HTML tag
<yield> yield to code block