add hostingpackages api doc

- add to docs/code.rst toctree
- add new docs/code/hostingpackages.rst containing the autodoc directives
- document undocumented code in hostingpackages app
- update translation templates
This commit is contained in:
Jan Dittberner 2015-01-18 13:37:21 +01:00
parent 12455e2d99
commit 4f2ebbae63
6 changed files with 87 additions and 18 deletions

View file

@ -20,6 +20,10 @@ from .models import (
class CustomerHostingPackageCreateForm(forms.ModelForm):
"""
This is the form class for creating new customer hosting packages.
"""
class Meta:
model = CustomerHostingPackage
fields = ['customer', 'template', 'name']
@ -45,21 +49,41 @@ class CustomerHostingPackageCreateForm(forms.ModelForm):
class CustomerDiskSpaceOptionInline(admin.TabularInline):
"""
This class implements the inline editor for customer hosting package disk
space options.
"""
model = CustomerDiskSpaceOption
extra = 0
class CustomerMailboxOptionInline(admin.TabularInline):
"""
This class implements the inline editor for customer hosting package
mailbox options.
"""
model = CustomerMailboxOption
extra = 0
class CustomerUserDatabaseOptionInline(admin.TabularInline):
"""
This class implements the inline editor for customer hosting package user
database options.
"""
model = CustomerUserDatabaseOption
extra = 0
class CustomerHostingPackageAdmin(admin.ModelAdmin):
"""
This class implements the admin interface for
:py:class:`CustomerHostingPackage`.
"""
add_form = CustomerHostingPackageCreateForm
add_fieldsets = (
(None, {