app/soc/models/linkable.py
changeset 568 6713617751b4
parent 549 00a9ce3dc082
child 970 8b5611d5b053
equal deleted inserted replaced
567:53906b0456b7 568:6713617751b4
    21 ]
    21 ]
    22 
    22 
    23 
    23 
    24 import re
    24 import re
    25 
    25 
    26 import polymodel
       
    27 
       
    28 from google.appengine.ext import db
    26 from google.appengine.ext import db
    29 
    27 
    30 from django.utils.translation import ugettext_lazy
    28 from django.utils.translation import ugettext_lazy
       
    29 
       
    30 from soc.models import base
    31 
    31 
    32 
    32 
    33 # start with ASCII digit or lowercase
    33 # start with ASCII digit or lowercase
    34 #   (additional ASCII digit or lowercase
    34 #   (additional ASCII digit or lowercase
    35 #     -OR-
    35 #     -OR-
    64        'link_id': LINK_ID_PATTERN_CORE})
    64        'link_id': LINK_ID_PATTERN_CORE})
    65 PATH_LINK_ID_PATTERN = r'^%s$' % PATH_LINK_ID_ARGS_PATTERN
    65 PATH_LINK_ID_PATTERN = r'^%s$' % PATH_LINK_ID_ARGS_PATTERN
    66 PATH_LINK_ID_REGEX = re.compile(PATH_LINK_ID_PATTERN)
    66 PATH_LINK_ID_REGEX = re.compile(PATH_LINK_ID_PATTERN)
    67 
    67 
    68 
    68 
    69 class Linkable(polymodel.PolyModel):
    69 class Linkable(base.ModelWithFieldAttributes):
    70   """A base class for Model classes that are "linkable".
    70   """A base class for Model classes that are "linkable".
    71   
    71   
    72   Many entities in Melange are identified by a "link path" that is formed
    72   Many entities in Melange are identified by a "link path" that is formed
    73   by two components:  a "link scope" and a "link ID".
    73   by two components:  a "link scope" and a "link ID".
    74   
    74