projects

projects.admin

Django administration interface for Project and related models.

projects.constants

Default values and other various configuration for projects, including available theme names and repository types.

projects.models

class projects.models.File(*args, **kwargs)

File(id, project_id, parent_id, heading, slug, content, denormalized_path, ordering, status)

class projects.models.FileRevision(*args, **kwargs)

FileRevision(id, file_id, comment, diff, created_date, revision_number, is_reverted)

get_file_content()

Apply the series of diffs after this revision in reverse order, bringing the content back to the state it was in this revision

class projects.models.ImportedFile(*args, **kwargs)

ImportedFile(id, project_id, name, slug, path, md5)

class projects.models.Project(*args, **kwargs)

Project(id, pub_date, modified_date, user_id, name, slug, description, repo, repo_type, project_url, version, copyright, theme, suffix, default_version, default_branch, requirements_file, documentation_type, path, featured, skip, use_virtualenv, django_packages_url)

find(file, version)

A balla API to find files inside of a projects dir.

full_build_path(version='latest')

The path to the build html docs in the project.

full_doc_path(version='latest')

The path to the documentation root in the project.

full_find(file, version)

A balla API to find files inside of a projects dir.

get_default_version()

Get the default version (slug).

Returns self.default_version if the version with that slug actually exists (is built and published). Otherwise returns ‘latest’.

rtd_build_path(version='latest')

The path to the build html docs in the project.

tagged_items

This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.

projects.tasks

Tasks related to projects, including fetching repository code, cleaning conf.py files, and rebuilding documentation.

projects.tasks.build_docs(project, version, pdf, record, touch)

A helper function for the celery task to do the actual doc building.

projects.tasks.scrape_conf_file(version)

Locate the given project’s conf.py file and extract important settings, including copyright, theme, source suffix and version.

projects.tasks.update_imported_docs(project, version)

Check out or update the given project’s repository.

projects.utils

Utility functions used by projects.

projects.utils.diff(txt1, txt2)

Create a ‘diff’ from txt1 to txt2.

projects.utils.find_file(file)

Find matching filenames in the current directory and its subdirectories, and return a list of matching filenames.

projects.utils.run(*commands)

Run one or more commands, and return (status, out, err). If more than one command is given, then this is equivalent to chaining them together with &&; if all commands succeed, then (status, out, err) will represent the last successful command. If one command failed, then (status, out, err) will represent the failed command.

projects.utils.safe_write(filename, contents)

Write contents to the given filename. If the filename’s directory does not exist, it is created. Contents are written as UTF-8, ignoring any characters that cannot be encoded as UTF-8.

projects.views

projects.views.public

projects.views.public.project_detail(request, project_slug)

A detail view for a project with various dataz

projects.views.public.project_index(request, username=None, tag=None)

The list of projects, which will optionally filter by user or tag, in which case a ‘person’ or ‘tag’ will be added to the context

projects.views.public.search(request)

our ghetto site search. see roadmap.

projects.views.public.search_autocomplete(request)

return a json list of project names

projects.views.public.slug_detail(request, project_slug, filename)

A detail view for a project with various dataz

projects.views.public.subdomain_handler(request, lang_slug=None, version_slug=None, filename='')

This provides the fall-back routing for subdomain requests.

This was made primarily to redirect old subdomain’s to their version’d brothers.

projects.views.public.tag_index(request)

List of all tags by most common

projects.views.private

projects.views.private.edit_alias(request, *args, **kwargs)

The view for creating a new project where the docs will be hosted as objects and edited through the site

projects.views.private.export(request, *args, **kwargs)

Export a projects’ docs as a .zip file, including the .rst source

projects.views.private.file_add(request, *args, **kwargs)

Add a file to a project, redirecting on success to the projects mgmt page

projects.views.private.file_delete(request, *args, **kwargs)

Mark a given file as deleted on POST, otherwise ask for confirmation

projects.views.private.file_diff(request, *args, **kwargs)

Return the contents of a given revision.

projects.views.private.file_edit(request, *args, **kwargs)

Edit an existing file

projects.views.private.file_history(request, *args, **kwargs)

A view that provides diffing from current to any revision, and when posted to allows you to revert

projects.views.private.file_preview(request, *args, **kwargs)

Live preview of restructuredtext payload - currently not wired up

projects.views.private.list_alias(request, *args, **kwargs)

The view for creating a new project where the docs will be hosted as objects and edited through the site

projects.views.private.project_create(request, *args, **kwargs)

The view for creating a new project where the docs will be hosted as objects and edited through the site

projects.views.private.project_dashboard(request, *args, **kwargs)

A dashboard! If you aint know what that means you aint need to. Essentially we show you an overview of your content.

projects.views.private.project_delete(request, *args, **kwargs)

Make a project as deleted on POST, otherwise show a form asking for confirmation of delete.

projects.views.private.project_edit(request, *args, **kwargs)

Edit an existing project - depending on what type of project is being edited (created or imported) a different form will be displayed

projects.views.private.project_import(request, *args, **kwargs)

Import docs from an repo

projects.views.private.project_manage(request, *args, **kwargs)

The management view for a project, where you will have links to edit the projects’ configuration, edit the files associated with that project, etc.

projects.views.private.project_versions(request, *args, **kwargs)

Shows the available versions and lets the user choose which ones he would like to have built.

Project Versions

Table Of Contents

Previous topic

core

Next topic

watching

This Page