Package madrona :: Package layers :: Module models :: Class UserUploadedKml
[hide private]

Class UserUploadedKml

source code

django.contrib.gis.db.models.Model --+    
                                     |    
               features.models.Feature --+
                                         |
                                        UserUploadedKml

Abstract Model for storing uploaded restricted-access kml files

Owned by a single user, can be shared with any group(s) that the owner is a member of (assuming group has can_share_features permissions)

These are features and will show up in the MyShapes/SharedShapes panels

Nested Classes [hide private]
  Meta
Instance Methods [hide private]
 
basename(self)
Name of the file itself without the path
source code
 
kml(self) source code
 
kml_style(self) source code
 
kml_style_id(self) source code
 
kml_full(self) source code

Inherited from features.models.Feature: __repr__, __unicode__, add_to_collection, copy, get_absolute_url, hash, is_viewable, kml_safe, options, remove_from_collection, save, share_with, uid

Class Methods [hide private]
 
css(klass)
Specifies the CSS for representing features in kmltree, specifically the icon Works one of two ways: 1.
source code

Inherited from features.models.Feature: get_options, model_uid

Class Variables [hide private]
  kml_file = models.FileField(upload_to= 'upload/private-kml-lay...
  description = models.TextField(default= "", null= True, blank=...

Inherited from features.models.Feature: collection, content_type, date_created, date_modified, name, object_id, objects, sharing_groups, user

Method Details [hide private]

basename(self)

source code 

Name of the file itself without the path

Decorators:
  • @property

kml(self)

source code 
Decorators:
  • @property

css(klass)
Class Method

source code 

Specifies the CSS for representing features in kmltree, specifically the icon
Works one of two ways:
1. Use the icon_url Option and this default css() classmethod 
2. Override the css() classmethod for more complex cases

Overrides: features.models.Feature.css
(inherited documentation)

kml_style(self)

source code 
Decorators:
  • @property

kml_style_id(self)

source code 
Decorators:
  • @property

kml_full(self)

source code 
Decorators:
  • @property

Class Variable Details [hide private]

kml_file

Value:
models.FileField(upload_to= 'upload/private-kml-layers/%Y/%m/%d', help\
_text= """
        KML or KMZ file. Can use NetworkLinks pointing to remote kml d\
atasets or WMS servers.
    """, blank= False, max_length= 510)

description

Value:
models.TextField(default= "", null= True, blank= True)