merchandise package

Submodules

merchandise.admin module

Registers admin interfaces for the models defined in this module.

class merchandise.admin.MerchandiseItemAdmin(model, admin_site)[source]

Bases: utils.translation.TranslatedModelAdmin

This manages the admin interface for the model items

exclude = None
fields = ('name_en', 'name_nl', 'price', 'description_en', 'description_nl', 'image')

Included fields in the admin interface

property media
search_fields = ()

merchandise.apps module

Contains the appconfig for the merchandise module.

class merchandise.apps.MerchandiseConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

Configuration for the merchandise module

name = 'merchandise'
verbose_name = 'Merchandise'

merchandise.models module

Models for the merchandise database tables

class merchandise.models.MerchandiseItem(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Merchandise items

This model describes merchandise items.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

property description

Description of the merchandise item

description_en

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

description_nl

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

id

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

image

Image of the merchandise item

property name

Name of the merchandise item. Automatically provides _nl and _en variants

name_en

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

name_nl

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>
price

Price of the merchandise item

merchandise.sitemaps module

Gives sitemaps for the merchandise package

class merchandise.sitemaps.StaticViewSitemap[source]

Bases: django.contrib.sitemaps.Sitemap

Generates the sitemap of the index page

changefreq = 'monthly'
items()[source]

The items listed in the sitemap

location(item)[source]

Gives the location for the specified item

Parameters

item – the item to generate the link to

Returns

the URL to the item

merchandise.sitemaps.sitemap = {'merchandise-static': <class 'merchandise.sitemaps.StaticViewSitemap'>}

The site maps defined by this module

merchandise.urls module

Defines the routes provided in this package

merchandise.urls.app_name = 'merchandise'

the name of the application

merchandise.urls.urlpatterns = [<URLResolver <URLPattern list> (None:None) 'association/merchandise/'>]

the urls provided by this package

merchandise.views module

The views for the merchandise package

merchandise.views.index(request)[source]

Renders the index view

Parameters

request – the request object

Returns

the response