View Reference

The views.security Module

Security view callables.

class publiforge.views.security.ErrorView(request)[source]

Class to manage error page.

error()[source]

This view outputs an error message or redirects to login page.

publiforge.views.security.login(request)[source]

This view renders a login form and processes the post checking credentials.

publiforge.views.security.logout(request)[source]

This view will clear the credentials of the logged in user and redirect back to the login page.

The views.maintenance Module

Maintenance view callables.

publiforge.views.maintenance.mainatenance_view(request)[source]

Maintenance view.

Parameters:request (pyramid.request.Request) – Current request.

The views.home Module

Home view callables.

class publiforge.views.home.HomeView(request)[source]

Class to manage Home pages.

index()[source]

Index page.

publiforge.views.home.favicon(request)[source]

Output the favicon.ico file.

publiforge.views.home.robots(request)[source]

Output the robots.txt file.

The views.user Module

User view callables.

class publiforge.views.user.UserView(request)[source]

Class to manage users.

admin()[source]

List users for administration purpose.

create()[source]

Create a user.

edit()[source]

Edit user settings.

view()[source]

Show user settings.

The views.selection Module

Selection view callables.

class publiforge.views.selection.Selection(request)[source]

User selection management.

add(paths)[source]

Add files to the selection.

Parameters:paths – (list) List of files to add.
invalidate()[source]

Invalidate the current selection if exists.

toggle_overview(storage_id)[source]

Toggle overview for storage storage_id.

Parameters:storage_id – (string) Storage ID.
update()[source]

Update the list of files of the user selection sorted by storage.

xhtml()[source]

Return an <ul> structure or a <span> structure if empty.

class publiforge.views.selection.SelectionView(request)[source]

Class to manage user selection views.

add()[source]

Add one file to the user selection with an AJAX request.

overview()[source]

Toggle overview of files for the indicated storage.

remove()[source]

Remove files from the user selection.

The views.group Module

Group view callables.

class publiforge.views.group.GroupView(request)[source]

Class to manage groups.

admin()[source]

List groups for administration purpose.

create()[source]

Create a group.

edit()[source]

Edit group settings.

view()[source]

Show group settings.

The views.storage Module

Storage view callables.

class publiforge.views.storage.StorageView(request)[source]

Class to manage storages.

admin()[source]

List storages for administration purpose.

browse()[source]

Browse a storage.

create()[source]

Create a storage.

edit()[source]

Edit storage settings.

index()[source]

List authorized storages.

view()[source]

Show storage settings with its users and groups.

The views.indexer Module

Indexer view callables.

class publiforge.views.indexer.IndexerView(request)[source]

Class to manage indexers.

admin()[source]

List indexers for administration purpose.

create()[source]

Create an indexer.

edit()[source]

Edit indexer settings.

view()[source]

Show indexer settings.

The views.file Module

File view callables.

class publiforge.views.file.FileView(request)[source]

Class to manage files in a storage.

auto_check()[source]

Validate the current file, possibly save it, and continue.

diff()[source]

Differences between a version and current version.

display()[source]

Display content or rendering.

download()[source]

Download a file.

info()[source]

Show file information and VCS log.

media()[source]

Return the URL of the searched media.

modify()[source]

Modify file and save it.

navigate()[source]

Display the next or previous file of the same type in the same directory.

Display the next or previous file in the search results.

resources_dirs()[source]

Return the list of resource directories.

resources_files()[source]

Return the list of media files of a resource directory.

revision()[source]

Retrieve a revision of a file.

search()[source]

Search files in storages.

session['search'] is a dictionary with the following keys: scope, inputs, columns and result.

The views.project Module

Project view callables.

class publiforge.views.project.ProjectView(request)[source]

Class to manage projects.

admin()[source]

List projects for administration purpose.

create()[source]

Create a project.

dashboard()[source]

Display a project dashboard.

edit()[source]

Edit project settings.

index()[source]

List authorized projects.

view()[source]

Show project settings with its users.

The views.processing Module

Processing view callables.

class publiforge.views.processing.ProcessingView(request)[source]

Class to manage processings.

create()[source]

Create a processing.

edit()[source]

Edit a processing.

view()[source]

Display processing settings.

The views.role Module

Role view callables.

class publiforge.views.role.RoleView(request)[source]

Class to manage roles.

create()[source]

Create a role.

edit()[source]

Edit a role.

view()[source]

Display role settings.

The views.task Module

Task view callables.

class publiforge.views.task.TaskView(request)[source]

Class to manage tasks.

create()[source]

Create a task.

edit()[source]

Edit a task.

index()[source]

List tasks to do.

view()[source]

Display task settings.

The views.pack Module

Pack view callables.

class publiforge.views.pack.PackView(request)[source]

Class to manage packs.

create()[source]

Create a pack.

edit()[source]

Edit a pack.

index()[source]

List all packs of a project.

view()[source]

Display a pack.

The views.site Module

Site view callables.

class publiforge.views.site.SiteView(request)[source]

Class to manage global website.

admin()[source]

List users, groups, storages, processors and projects and allow import/export operations.

The views.build Module

Build view callables.

class publiforge.views.build.BuildView(request)[source]

Class to manage builds.

complete()[source]

Complete a build.

info()[source]

Return information about a build (AJAX)

launch()[source]

Launch one or more builds.

log()[source]

Download current log.

progress()[source]

Display the build progress.

results()[source]

List all builds in progress or with result.

view()[source]

Display a build, possibly, with its result.

The views.maestro Module

These XML-RPC functions are called by Maestro client.

publiforge.views.maestro.build(request, context, project_label, pack_label, processing_label)[source]

Upload a pack inot the project project.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • project_label – (string) Label of the project to use.
  • pack_label – (string) Label of the pack to use.
  • processing_label – (string) Label of the processing to use.
Returns:

(tuple) (error, result)

publiforge.views.maestro.build_log(request, context, build_id)[source]

Send log of build build_id.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • build_id – (string) ID of build to retrieve.
Returns:

(tuple) (error, result)

publiforge.views.maestro.file_download(request, context, filename)[source]

Download file filename.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • filename – (string) Relative path of file to search.
Returns:

(tuple) (error, result)

publiforge.views.maestro.file_info(request, context, filename)[source]

Return date and size of file filename.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • filename – (string) Relative path of file to search.
Returns:

(tuple) (error, result) where result is a tuple like (file_mtime, file_size).

publiforge.views.maestro.indexes(request, context)[source]

Return a list of available indexes.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
Returns:

(tuple) (error, result)

publiforge.views.maestro.pack_info(request, context, content, project_label)[source]

Return date and size of all files of a pack.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • content – (xmlrpclib.Binary instance) Content of pack settings.
  • project_label – (string) Label of the project to use.
Returns:

(tuple) (error, result) where result is a tuple like (pack_exists, info_list). info_list is a list such as [(file_path, file_mtime, file_size),...].

publiforge.views.maestro.pack_upload(request, context, content, project_label, message)[source]

Upload a pack inot the project project.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • content – (xmlrpclib.Binary instance) Content of the pack.
  • project_label – (string) Label of the project to use.
  • message – (string) Message for commit operation.
Returns:

(tuple) (error, result)

publiforge.views.maestro.result_download(request, context, build_id)[source]

Download result of build build_id.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • build_id – (string) ID of build to retrieve.
Returns:

(tuple) (error, result)

publiforge.views.maestro.results(request, context, project_label)[source]

Upload a pack inot the project project.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • project_label – (string) Label of the project to use.
Returns:

(tuple) (error, (working, results))

publiforge.views.maestro.search(request, context, scope, query, limit)[source]

Return the result of a search limited to limit lines.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
Returns:

(tuple) (error, result)

publiforge.views.maestro.storages(request, context, with_index=True)[source]

Return a list of available storages.

Parameters:
  • request – (pyramid.request.Request instance) Current request.
  • context – (dictionary) A context for authentication.
  • with_index – (boolean, default=True) If True select only storages with indexed files.
Returns:

(tuple) (error, result)