Package madrona :: Package features :: Class FeatureOptions
[hide private]

Class FeatureOptions

source code

Represents properties of Feature Classes derived from both defaults and developer-specified options within the Options inner-class. These properties drive the features of the spatial content managment system, such as CRUD operations, copy, sharing, etc.

Instance Methods [hide private]
 
__init__(self, model) source code
 
get_show_template(self)
Returns the template used to render this Feature Class' attributes
source code
 
get_link(self, linkname)
Returns the FeatureLink with the specified name
source code
 
get_valid_children(self) source code
 
get_potential_parents(self)
It's not sufficient to look if this model is a valid_child of another FeatureCollection; that collection could contain other collections that contain this model.
source code
 
get_form_class(self)
Returns the form class for this Feature Class.
source code
 
dict(self, user, is_owner)
Returns a json representation of this feature class configuration that can be used to specify client behavior
source code
 
json(self) source code
 
get_create_form(self)
Returns the path to a form for creating new instances of this model
source code
 
get_update_form(self, pk)
Given a primary key, returns the path to a form for updating a Feature Class
source code
 
get_share_form(self, pk)
Given a primary key, returns path to a form for sharing a Feature inst
source code
 
get_resource(self, pk)
Returns the primary url for a feature.
source code
Instance Variables [hide private]
  form
Path to FeatureForm used to edit this class.
  slug
Name used in the url path to this feature as well as part of the Feature's uid
  verbose_name
Name specified or derived from the feature class name used in the user interface for representing this feature class.
  form_template
Location of the template that should be used to render forms when editing or creating new instances of this feature class.
  form_context
Context to merge with default context items when rendering templates to create or modify features of this class.
  show_context
Context to merge with default context items when rendering templates to view information about instances of this feature class.
  icon_url
Optional; URL to 16x16 icon to use in kmltree Use full URL or relative to MEDIA_URL
  links
Links associated with this class.
  enable_copy
Enable copying features.
  valid_children
valid child classes for the feature container
  manipulators
Required manipulators applied to user input geometries
  optional_manipulators
Optional manipulators that may be applied to user input geometries
  enable_kml
Enable kml visualization of features.
Method Details [hide private]

get_potential_parents(self)

source code 

It's not sufficient to look if this model is a valid_child of another
FeatureCollection; that collection could contain other collections 
that contain this model. 

Ex: Folder (only valid child is Array)
    Array (only valid child is MPA)
    Therefore, Folder is also a potential_parent of MPA

get_resource(self, pk)

source code 

Returns the primary url for a feature. This url supports GET, POST, and DELETE operations.


Instance Variable Details [hide private]

enable_copy

Enable copying features. Uses the feature class' copy() method. Defaults to True.

enable_kml

Enable kml visualization of features. Defaults to True.