partners package

Submodules

partners.admin module

class partners.admin.PartnerAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

Class to show partners in the admin.

fieldsets = ((None, {'fields': ('name', 'slug', 'link', 'company_profile', 'logo', 'site_header', 'is_active', 'is_main_partner', 'is_local_partner')}), ('Address', {'fields': ('address', 'zip_code', 'city')}))
inlines = (<class 'partners.admin.PartnerImageInline'>,)
list_display = ('name', 'is_active', 'is_main_partner', 'is_local_partner')
list_filter = ('is_active',)
property media
prepopulated_fields = {'slug': ('name',)}
search_fields = ('name', 'city')
class partners.admin.PartnerEventAdmin(model, admin_site)[source]

Bases: utils.translation.TranslatedModelAdmin

Class to show partner events in the admin.

exclude = None
fields = ('partner', 'other_partner', 'title_en', 'title_nl', 'description_en', 'description_nl', 'location_en', 'location_nl', 'start', 'end', 'url', 'published')
list_display = ('title', 'start', 'end', 'partner', 'published')
list_filter = ('start', 'published')
property media
search_fields = ('title_en', 'title_nl', 'partner__name')
class partners.admin.PartnerImageInline(parent_model, admin_site)[source]

Bases: django.contrib.admin.options.StackedInline

Class to show partner images inline in the admin.

property media
model

alias of partners.models.PartnerImage

class partners.admin.VacancyAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

Class to show vacancies in the admin.

fieldsets = ((None, {'fields': ('title', 'description', 'link')}), ('Existing partner', {'fields': ('partner',)}), ('Other partner', {'fields': ('company_name', 'company_logo')}), ('Categories', {'fields': ('categories',)}))
list_display = ('title', 'partner', 'company_name')
property media
search_fields = ('title', 'partner__name', 'company_name')
class partners.admin.VacancyCategoryAdmin(model, admin_site)[source]

Bases: utils.translation.TranslatedModelAdmin

Class to show vacancy categories in the admin.

exclude = None
fields = ('name_en', 'name_nl', 'slug')
property media
prepopulated_fields = {'slug': ('name_en',)}
search_fields = ()

partners.apps module

class partners.apps.PartnersConfig(app_name, app_module)[source]

Bases: django.apps.config.AppConfig

Appconfig for partners app.

name = 'partners'
verbose_name = 'Partners'

partners.models module

class partners.models.Partner(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Model describing partner.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

address

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

city

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

company_profile

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

events

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_absolute_url()[source]

Return the url of the partner page.

id

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

images

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

is_active

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

is_local_partner

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

is_main_partner

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

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

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

name

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>
save(*args, **kwargs)[source]

Save a partner and set main/local partners.

site_header

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

slug

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

vacancy_set

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

zip_code

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

class partners.models.PartnerEvent(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Model describing partner event.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

clean()[source]

Validate the partner event.

property description

Accessor that fetches the localized variant of description

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.

end

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

get_next_by_end(*, field=<django.db.models.fields.DateTimeField: end>, is_next=True, **kwargs)
get_next_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=True, **kwargs)
get_previous_by_end(*, field=<django.db.models.fields.DateTimeField: end>, is_next=False, **kwargs)
get_previous_by_start(*, field=<django.db.models.fields.DateTimeField: start>, is_next=False, **kwargs)
id

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

property location

Accessor that fetches the localized variant of location

location_en

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

location_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>
other_partner

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

partner

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

partner_id
published

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

start

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

property title

Accessor that fetches the localized variant of title

title_en

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

title_nl

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

url

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

class partners.models.PartnerImage(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Model to save partner image.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

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

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

objects = <django.db.models.manager.Manager object>
partner

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

partner_id
class partners.models.Vacancy(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Model describing vacancies.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

categories

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

clean()[source]

Validate the vacancy.

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

company_name

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

description

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

get_absolute_url()[source]

Return partner or vacancy url.

Return company or partner logo.

get_company_name()[source]

Return company or partner name.

id

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

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

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

partner_id
title

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

class partners.models.VacancyCategory(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Model describing vacancy categories.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

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

property name

Accessor that fetches the localized variant of name

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

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

vacancy_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

partners.sitemaps module

class partners.sitemaps.PartnerSitemap[source]

Bases: django.contrib.sitemaps.Sitemap

Sitemap generator for partners.

items()[source]

Return all active partners.

location(item)[source]

Return the partner url.

class partners.sitemaps.StaticViewSitemap[source]

Bases: django.contrib.sitemaps.Sitemap

Sitemap generator for static partner views.

changefreq = 'daily'
items()[source]

Return static partner view names.

location(item)[source]

Return view url.

class partners.sitemaps.VacancySitemap[source]

Bases: django.contrib.sitemaps.Sitemap

Sitemap generator for vacancies.

items()[source]

Return all vacancies.

location(item)[source]

Return the vacancy url.

partners.urls module

partners.views module

partners.views.index(request)[source]

View to show overview page of partners.

partners.views.partner(request, slug)[source]

View to show partner page.

partners.views.random() → x in the interval [0, 1).
partners.views.vacancies(request)[source]

View to show vacancies.