The pyck.lib Package

Models related utility functions

pyck.lib.models.get_columns(model, col_type=None)

Returns column objects of the current model

Parameters:col_type – (Optional) The type of columns to return. Currently supported types are ‘primary_key’ and ‘foreign_key’
pyck.lib.models.get_models(application, get_app_models=True)

Processes the passed application package and returns all SQLAlchemy models for the application.

Parameters:get_app_models – Indicates if the apps present in the application should also be searched for models (default True)
pyck.lib.pagination.get_pages(total_recs, current_page, recs_per_page=10, max_pages=10)

A utility function that returns the pages (for records pagination display purposes)

Parameters:
  • total_recs – Total number of records
  • current_page – Current page that is being displayed
  • recs_per_page – Number of records being displayed per page
  • max_pages – Maximum number of pages to return

Returns a list containing pages that should be displayed as page links.

Previous topic

The PyCK Admin Interface

Next topic

Running PyCK Applications with Apache Mod WSGI and Virtualenv

This Page