Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Documentation Guidelines

Seamus Smith edited this page May 25, 2022 · 24 revisions

After making a page

Make sure to add the page to the sidebar manually

To link a page, put the name of the page in square brackets. i.e: [[Name of page]]

What needs to be documented

  • Classes
  • Modules
  • Inclusion Tags (aka Components)
  • Management Commands
  • Layout Templates
  • URL Endpoints
  • Unit Tests

Naming each page

Each page should be named after the module, for example:

  • ratatoskr.app.views
  • ratatoskr.app.models
  • ratatoskr.app.management.commands

Each class should be in it's own page, name like:

  • ratatoskr.app.models.Schedule

Template paths use backslash, as we can't use forward slash for our page names:

  • app\layouts\base.html

Management commands should be named like:

  • Command commandname

Example of function documentation:


add(a: int, b: int) -> int

Returns the sum of a and b

Example of class documentation


class Animal

Describes an animal

Properties

  • name: string
  • age: float
  • sound: string

Methods

Animal.make_sound() -> None

Makes the animal make a sound

Example of Layout Template documentation


app/layouts/base.html

block head

Additional content in head

block body

Body content

Example of Command documentation


Command helloworld

Usage

python manage.py helloworld

Description

Prints "Hello World" into the console. If the world ended, behavior is undefined.