Workout With Friends
Stay fit with a little motivation
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions | Public Attributes | List of all members
wowf.lib.validators.Unique Class Reference

Makes sure that a field does not already exist in the database. More...

Inheritance diagram for wowf.lib.validators.Unique:
Inheritance graph
Collaboration diagram for wowf.lib.validators.Unique:
Collaboration graph

Public Member Functions

def __init__
def __call__

Public Attributes

 model
 column
 message

Detailed Description

Makes sure that a field does not already exist in the database.

When editing rows, pass the id of the row as a hidden field so that validation does not fail if the field does not change.

Definition at line 21 of file validators.py.

Constructor & Destructor Documentation

def wowf.lib.validators.Unique.__init__ (   self,
  model,
  column,
  message = None 
)
Parameters
modelThe model to query
columnThe column that must be unique

Definition at line 28 of file validators.py.

Member Function Documentation

def wowf.lib.validators.Unique.__call__ (   self,
  form,
  field 
)

Reimplemented in wowf.lib.validators.Exists.

Definition at line 33 of file validators.py.

Member Data Documentation

wowf.lib.validators.Unique.column

Definition at line 30 of file validators.py.

wowf.lib.validators.Unique.message

Definition at line 31 of file validators.py.

wowf.lib.validators.Unique.model

Definition at line 29 of file validators.py.


The documentation for this class was generated from the following file: