Models

bigbuild.models.Page A custom page published via static.latimes.com
bigbuild.models.ArchivedPage An archived custom page.
bigbuild.models.PageList A list of all the Page and ArchivedPage objects in the application.
class bigbuild.models.Page(*args, **kwargs)

Bases: bigbuild.models.base.BasePage

A custom page published via static.latimes.com

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

create_directory(force=False, index_template_name=u'bigbuild/pages/default_index.html', index_template_context={})

Creates a new directory for the page.

Returns the path to the directory that has been created, which is the same as the self.page_directory_path property.

Throws an error if the directory already exists. You can force it to overwrite a pre-existing directory by submitting the force keyword argument as true.

delete()

Delete the page directory.

frontmatter_path

Returns the metadata.md path where this page will be configured.

get_template(name)

Returns a Django template of the provided name ready to render.

write_checklist()

Creates checklist.md in the page directory.

write_frontmatter(path=None)

Creates metadata.yaml in the page directory, or a supplied target directory.

write_index(template_name, template_context={})

Creates index.html in the page directory.

write_static()

Creates a ./static/ subdirectory within the page directory.

class bigbuild.models.ArchivedPage(*args, **kwargs)

Bases: bigbuild.models.base.BasePage

An archived custom page.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

delete()

Delete the page directory.

frontmatter_path

Returns the metadata.md path where this page will be configured.

class bigbuild.models.PageList

Bases: _abcoll.Sequence

A list of all the Page and ArchivedPage objects in the application.

get_archived_pages()

Returns a list of ArchivedPage objects ready to be built in this environment.

get_directory_list(path)

Returns the list of slugged page modules in the provided directory.

get_dynamic_pages()

Returns a list of Page objects ready to be built in this environment.

static get_page(slug, pagetype)

Returns a list of Page objects from the provided slug directory.