Django models

Collection

class snowebsvg.models.Collection(id, key)
Parameters
  • id (AutoField) – Id

  • key (CharField) – Key

build()

Build all collection group’s available in django apps template folder named : snowebsvg/collections/<collection_key>

render_styles()

Method for rendering stylesheet code

GroupSvg

class snowebsvg.models.GroupSvg(id, key, collection)
Parameters
  • id (AutoField) – Id

  • key (CharField) – Key

  • collection (ForeignKey to Collection) – Collection

build()

Build all Svg available in django apps template folder named : snowebsvg/collections/<collection_key>/<group_svg_key>

path_entry

File path of a GroupSvg

Svg

class snowebsvg.models.Svg(id, key, group)
Parameters
  • id (AutoField) – Id

  • key (CharField) – Key

  • group (ForeignKey to GroupSvg) – Group

key_composer
Return string

Unique Identifier of Svg

key_decomposer(key_composer)
Return svg

Svg instance by key composer

path_entry
Return string

Path html of Svg

render_django(theme='light', width=100, height=100, variant=None)

Method for rendering Django template code

Parameters
render_html(theme='light', width=100, height=100, variant=None, grid=False, klass=None)

Method for rendering Svg to HTML

Parameters
render_preview(theme='light', width=100, height=100, variant=None, grid=False, klass=None)

Method for rendering a preview of Svg to HTML

If _preview.html exist, then render the preview html file. If _preview.html does not exist, then fall back to the common preview.html file.

Parameters