我们从Python开源项目中,提取了以下22个代码示例,用于说明如何使用google.appengine.ext.db.LinkProperty()。
def convert_LinkProperty(model, prop, kwargs): """Returns a form field for a ``db.LinkProperty``.""" kwargs['validators'].append(validators.url()) return get_TextField(kwargs)
def get_form_field(self, **kwargs): """Return a Django form field appropriate for a URL property. This defaults to a URLField instance. """ defaults = {'form_class': forms.URLField} defaults.update(kwargs) return super(LinkProperty, self).get_form_field(**defaults)