ARLO Nester
Classes | Functions
workspace.tools.views.project Namespace Reference

Classes

class  AddUserToProjectForm
 Django Form for Sharing a Project with another user. More...
 
class  EditProjectNotesForm
 
class  RemoveUserFromProjectForm
 Django Class to remove (un-share) a user from a Project. More...
 
class  StartNewProjectForm
 Djangeo form for creating a new Project. More...
 

Functions

def getProjectTagSets (project, include_hidden=True)
 Retrieve a list of TagSets in a project, optionally filtering out the 'hidden' TagSets. More...
 
def getProjectTagClasses (project)
 Get a list of TagClasses from Project. More...
 
def getProjectMediaFiles (project)
 Get a list of media files assigned to a Project. More...
 
def getTagSetTagClasses (tagSet)
 Get a list of TagClasses present within a TagSet. More...
 
def createProject (user, name, projectType, notes=None)
 Create a new Project owned by 'user'. More...
 
def deleteProject (request, projectId)
 Web interface call to delete a user's Project. More...
 
def projects (request)
 Display all Projects owned or accessible by a user (/tools/projects). More...
 
def projectAudioFiles (request, projectId)
 Display a list of audioFiles assigned to a Project. More...
 
def startNewProject (request)
 Start a new Project. More...
 
def addAudioToProject (request)
 Add Audio Files to a Project GET request returns the form, POST processes it. More...
 
def removeAudioFromProject (request, projectID, audioFileID)
 Remove an Audio File from a Project. More...
 
def addUserToProject (request)
 Add a user with read and/or write access to a Project. More...
 
def removeUserFromProject (request)
 Remove a User from a Project. More...
 
def projectFiles (request, projectId)
 Displays the 'Project Files' Page. More...
 
def projectNotes (request, projectId)
 Edit a Project's Notes. More...
 

Function Documentation

def workspace.tools.views.project.addAudioToProject (   request)

Add Audio Files to a Project GET request returns the form, POST processes it.

Parameters
requestThe Django HTTP request object
Returns
Django HTTP response object
def workspace.tools.views.project.addUserToProject (   request)

Add a user with read and/or write access to a Project.

Expects a POST which should contain an AddUserToProjectForm. Only the Project owner may add users with this.

Parameters
requestThe Django HTTP request object
Returns
Django HTTP response object (redirect to '/tools/projects' if successful)
def workspace.tools.views.project.createProject (   user,
  name,
  projectType,
  notes = None 
)

Create a new Project owned by 'user'.

Parameters
userUser object that owns the tag
nameThe name of the new Project
projectTypeA ProjectTypes object
notesNotes to store with the object.
Returns
The new Project object if successful, None if a conflicting Project name exists.
def workspace.tools.views.project.deleteProject (   request,
  projectId 
)

Web interface call to delete a user's Project.

Only the Project's owner may delete. Note: This may fail if the Project is referenced by other records in the database. In the future, we can extend this functionality to be more thorough, but this should be a rare operation so we can do it manually.

Parameters
requestThe Django HTTP request object.
projectIdDatabase ID of the Project to delete.
Returns
Django HTTP response object, returning the 'projects' page on success, error page otherwise.
def workspace.tools.views.project.getProjectMediaFiles (   project)

Get a list of media files assigned to a Project.

Parameters
projectA Project object
Returns
A list of MediaFile objects
def workspace.tools.views.project.getProjectTagClasses (   project)

Get a list of TagClasses from Project.

Parameters
projectThe Project Object from which to get TagClasses
Returns
A list of TagClass Objects (as a Django QuerySet)
def workspace.tools.views.project.getProjectTagSets (   project,
  include_hidden = True 
)

Retrieve a list of TagSets in a project, optionally filtering out the 'hidden' TagSets.

Parameters
projectProject object from which to retrieve the TagSets.
include_hidden(Default True) Whether to include 'hidden' TagSets in the result.
Returns
Django QuerySet of TagSet objects.
def workspace.tools.views.project.getTagSetTagClasses (   tagSet)

Get a list of TagClasses present within a TagSet.

Parameters
tagSetA TagSet object
Returns
A list of TagClass objects (as a Django QuerySet)
def workspace.tools.views.project.projectAudioFiles (   request,
  projectId 
)

Display a list of audioFiles assigned to a Project.

Parameters
requestThe Django HTTP request object
projectIdThe database ID of the Project
Returns
Django HTTP response object
def workspace.tools.views.project.projectFiles (   request,
  projectId 
)

Displays the 'Project Files' Page.

Parameters
requestThe Django HTTP request object
projectIdThe database ID of the Project to display
Returns
Django HTTPResponse object
def workspace.tools.views.project.projectNotes (   request,
  projectId 
)

Edit a Project's Notes.

GET request returns the create Form, POST processes it.

Parameters
requestThe Django HTTP request object
projectIdDatabase ID of the Project to delete.
Returns
Django HTTP response object
def workspace.tools.views.project.projects (   request)

Display all Projects owned or accessible by a user (/tools/projects).

Parameters
requestThe Django HTTP request object
Returns
Django HTTP response object
def workspace.tools.views.project.removeAudioFromProject (   request,
  projectID,
  audioFileID 
)

Remove an Audio File from a Project.

Note
Does not delete the mediaFile, just removes it from the Project
Parameters
requestThe Django HTTP request object
projectIDDatabase ID of the Project
audioFileIDDatabase ID of the mediaFile to remove
Returns
Django HTTP response object
def workspace.tools.views.project.removeUserFromProject (   request)

Remove a User from a Project.

This deletes the corresponding ProjectPermissions entry.

Parameters
requestThe Django HTTP request object
Returns
Django HTTP response object (redirect to '/tools/projects' if successful)
def workspace.tools.views.project.startNewProject (   request)

Start a new Project.

GET request returns the create Form, POST processes it.

Parameters
requestThe Django HTTP request object
Returns
Django HTTP response object