1. addons package

1.1. Subpackages

1.2. Submodules

1.3. addons.addon_filters module

addons.addon_filters.get_subregion(value, delimiter=':')[source]

1.4. addons.admin module

class addons.admin.VintagesAdmin(model, admin_site)[source]

Bases: ModelAdmin

list_filter = ('country', 'region', 'subregion')
property media

1.5. addons.apps module

class addons.apps.AddonsConfig(app_name, app_module)[source]

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField'
name = 'addons'

1.6. addons.functions module

addons.functions.get_vintage(year, country, region, subregion='1')[source]
addons.functions.is_valid_year(year_str)[source]

Check if the input string is a valid year.

Args:

year_str (str): The year as a string.

Returns:

bool: True if the year is valid, False otherwise.

addons.functions.update_addon_details(wine_id, addon_id, vintage_id)[source]
addons.functions.vintage_exists(country, year)[source]

1.7. addons.models module

class addons.models.Addons(id, wine, drink, ready, stars, quality, region, subregion, status, version, load_status)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

drink

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.

load_status

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

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

ready

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

region

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.

region_id
stars

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

status

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.

status_id
subregion

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.

subregion_id
version

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

wine

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

wine_id
class addons.models.Vintages(id, year, country, region, subregion, type, notes, quality, life, version, status)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

country

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.

country_id
id

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

life

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

notes

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

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

region

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.

region_id
status

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.

status_id
subregion

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.

subregion_id
type

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

version

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

year

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

1.8. addons.tests module

1.9. addons.urls module

1.10. addons.views module

addons.views.add_subregion(request)[source]
addons.views.addon_subregions(request)[source]
addons.views.get_region(request, int)[source]
addons.views.getdata(request)[source]
addons.views.regions(request)[source]
addons.views.report_addons(request)[source]
addons.views.select_addon(request)[source]
addons.views.subregions(request)[source]
addons.views.vintage_details(request)[source]
addons.views.years(request)[source]

1.11. Module contents

Addons module for Cellar.