db0_publishers.py 609 Bytes
Newer Older
1 2 3 4 5
# -*- coding: utf-8 -*-
""" publishers

"""
db.define_table("publishers",
6 7
    Field("publisher", "string", length=255, default="", label="Review"),
    Field("abbreviation", "string", length=255, notnull=True, unique=True),
8
    Field("synonyms", "text", comment=tp_synonyms),
9 10 11
    migrate="publishers.table")

db.publishers._before_delete.append(INHIBIT_CASCADE_DELETE)
12 13 14
db.publishers._before_delete.append(dbui.INHIBIT_DELETE_UNDEF)
db.publishers._before_update.append(dbui.INHIBIT_UPDATE_UNDEF)

15 16
db.publishers.publisher.filter_in = dbui.CLEAN_SPACES
db.publishers.abbreviation.filter_in = filters.CLEAN_REVIEW