================= API Documentation ================= ---------------- Element creation ---------------- In order to instruct the render engine how to render various components, we create elements and tie various resources to these elements via includes. The central component to this process is the :any:`Element` class. .. autoclass:: render_engine.elemtools.Element :members: ------------------- Including resources ------------------- Each :any:`Element` has an ``includes`` list which is used to instruct the render engine how to fetch additional resources needed for rendering (e.g. CSS files and JavaScript files that aren't part of the global site resources). .. autofunction:: render_engine.elemtools.js(name, footer=False) .. autofunction:: render_engine.elemtools.css(name, footer=False, media='all') ------------------- Registry components ------------------- These are classes that are instantiated by the render engine (once each). You can find these instantiated at :any:`render_engine.elemtools.element_registry` and :any:`render_engine.elemtools.include_registry`. .. autoclass:: render_engine.elemtools.Registry :members: .. autoclass:: render_engine.elemtools.ElementRegistry :members: .. data:: render_engine.elemtools.element_registry An instance of :any:`ElementRegistry`. This is where you should register all of your element definitions. .. data:: render_engine.elemtools.include_registry An instance of :any:`Registry`. This is where you should register all of your include resources. ---------------------------- Bringing everything together ---------------------------- All of the necessary components for a layout are brought together into one place via :any:`Layout`. Generally, these objects are instantiated for you via the :any:`models.Menu.layout` property. .. autoclass:: render_engine.elemtools.Layout :members: --------- Utilities --------- There are a number of utility functions, decorators, etc. that I have created to help with this whole thing. They're listed below. :) .. autofunction:: util.authenticate .. autoclass:: util.creds :members: .. autofunction:: render_engine.elemtools.augment_query ----------------------- Template engine filters ----------------------- I've created a number of (I think) useful template filters so that we can reduce some of the more obnoxious templating tasks, such as resolving links to menu records, HTML element id and class auto population stuff, etc. .. autofunction:: render_engine.filters.get_selectors .. autofunction:: render_engine.filters.resolve_link .. autofunction:: render_engine.filters.classify .. autofunction:: render_engine.filters.get_link .. autofunction:: render_engine.filters.menu_link ---------- ORM Models ---------- Some of the models have some additional, non-standard behavior. My attempt is to document that behavior here. All of the normal stuff (e.g. column definitions) will be ommitted. Furthermore, ORM classes that don't have any oddities will be also be ommitted. .. autoclass:: models.Menu :members: