thabloid package

Submodules

thabloid.admin module

class thabloid.admin.ThabloidAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

Admin class for Thabloid objects.

form

alias of thabloid.admin.ThabloidAdminForm

list_filter = ('year',)
property media
class thabloid.admin.ThabloidAdminForm(*args, **kwargs)[source]

Bases: django.forms.models.ModelForm

Admin form for Thabloid objects.

base_fields = {}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

thabloid.admin.association_year_choices()[source]

Return the academic years Thalia existed.

thabloid.apps module

class thabloid.apps.ThabloidConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

AppConfig for the Thabloid app.

name = 'thabloid'
verbose_name = 'Thabloid'

thabloid.models module

class thabloid.models.Thabloid(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Model representing a Thabloid.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

property cover

Return first page as cover.

extract_thabloid_pages(wait)[source]

Extract the pages of a Thabloid using Ghostscript.

file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
get_absolute_url()[source]

Get url of Thabloid.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

issue

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
page_url(page=None, second_page=None)[source]

Return path of Thabloid pages image.

property pages

Return urls of pages that should be shown together.

pagesets(count)[source]

Return list of pages to should be shown together.

post_extract()[source]

Save extracted pages to disk.

save(*args, wait=False, **kwargs)[source]

Save Thabloid to disk.

year

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

thabloid.models.pagesets(count)[source]
thabloid.models.thabloid_filename(instance, filename)[source]

Return path of thabloid.

thabloid.sitemaps module

class thabloid.sitemaps.StaticViewSitemap[source]

Bases: django.contrib.sitemaps.Sitemap

Sitemap of the static thabloid index page.

changefreq = 'monthly'
items()[source]

Return the index url name.

location(obj)[source]

Return the index url.

class thabloid.sitemaps.ThabloidSitemap[source]

Bases: django.contrib.sitemaps.Sitemap

Sitemap of the thabloid pages.

changefreq = 'never'
items()[source]

Return all Thabloids.

location(obj)[source]

Return the url of a Thabloid.

thabloid.urls module

The routes defined by the thabloid package.

thabloid.views module

thabloid.views.index(request)[source]

Render Thabloid overview index page.

thabloid.views.pages(request, year, issue)[source]

Return paths of individual Thabloid pages.