View Reference

The views.security Module

Security view callables.

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.

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.

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.

view()[source]

Show user settings.

create()[source]

Create a user.

edit()[source]

Edit user settings.

The views.selection Module

Selection view callables.

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

User selection management.

update()[source]

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

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.
xhtml()[source]

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

add(paths)[source]

Add files to the selection.

Parameters:paths – (list) List of files to add.
class publiforge.views.selection.SelectionView(request)[source]

Class to manage user selection views.

remove()[source]

Remove files from the user selection.

overview()[source]

Toggle overview of files for the indicated storage.

add()[source]

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

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.

view()[source]

Show group settings.

create()[source]

Create a group.

edit()[source]

Edit 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.

index()[source]

List authorized storages.

view()[source]

Show storage settings with its users and groups.

create()[source]

Create a storage.

edit()[source]

Edit storage settings.

browse()[source]

Browse a storage.

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.

view()[source]

Show indexer settings.

create()[source]

Create an indexer.

edit()[source]

Edit indexer settings.

The views.file Module

File view callables.

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

Class to manage files in a storage.

search()[source]

Search files in storages.

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

display()[source]

Display content or rendering.

modify()[source]

Modify file and save it.

auto_check()[source]

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

media()[source]

Return the URL of the searched media.

resources_dirs()[source]

Return the list of resource directories.

resources_files()[source]

Return the list of media files of a resource directory.

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.

info()[source]

Show file information and VCS log.

download()[source]

Download a file.

revision()[source]

Retrieve a revision of a file.

diff()[source]

Differences between a version and current version.

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.

index()[source]

List authorized projects.

view()[source]

Show project settings with its users.

create()[source]

Create a project.

edit()[source]

Edit project settings.

dashboard()[source]

Display a project dashboard.

The views.processing Module

Processing view callables.

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

Class to manage processings.

view()[source]

Display processing settings.

create()[source]

Create a processing.

edit()[source]

Edit a processing.

The views.role Module

Role view callables.

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

Class to manage roles.

view()[source]

Display role settings.

create()[source]

Create a role.

edit()[source]

Edit a role.

The views.task Module

Task view callables.

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

Class to manage tasks.

index()[source]

List tasks to do.

view()[source]

Display task settings.

create()[source]

Create a task.

edit()[source]

Edit a task.

The views.pack Module

Pack view callables.

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

Class to manage packs.

index()[source]

List all packs of a project.

view()[source]

Display a pack.

create()[source]

Create a pack.

edit()[source]

Edit 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.

launch()[source]

Launch one or more builds.

view()[source]

Display a build, possibly, with its result.

progress()[source]

Display the build progress.

complete()[source]

Complete a build.

info()[source]

Return information about a build (AJAX)

log()[source]

Download current log.

results()[source]

List all builds in progress or with result.

The views.maestro Module

These XML-RPC functions are called by Maestro client.

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)

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.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.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.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.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.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.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.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)