Planning

The planning model defines the monthly recipe plan. Each day of the month has two recipe placeholder spots. Initially this was left more general, but the complexity felt through the roof for what I was trying to accomplish. I’ve now got it down to this relatively small list of fields. I understand the field list is still pretty lengthy, and that adding more fields to do another recipe each day is a major burden at this point, but I have at least reduced the code required to reference each recipe field down using some getattr and setattr magic.

class recipes.models.planning.Calendar(*args, **kwargs)

Bases: django.db.models.base.Model

This class describes a full month of data, including the calendar year/month as well as two recipes per day each day Each recipe field is a ForeignKey to a Recipe and the creator field is a ForeignKey to a User Contains fields, a __str__ method, and two worker methods for getting full monthly data and recipes for one day

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

YEAR_NUMBER_CHOICES = ((u'2018', u'2018'), (u'2019', u'2019'), (u'2020', u'2020'), (u'2021', u'2021'), (u'2022', u'2022'), (u'2023', u'2023'), (u'2024', u'2024'), (u'2025', u'2025'))

This tuple of tuples is a map between Year strings to meaningful display options

creator

The creator field is a ForeignKey to a User model instance to keep track of who created this recipe

creator_id

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

day01recipe0

The dayXYrecipeA fields are optional pointers to recipe instances, two per day for 31 days

day01recipe0_id

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

day01recipe1

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.

day01recipe1_id

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

day02recipe0

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.

day02recipe0_id

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

day02recipe1

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.

day02recipe1_id

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

day03recipe0

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.

day03recipe0_id

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

day03recipe1

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.

day03recipe1_id

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

day04recipe0

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.

day04recipe0_id

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

day04recipe1

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.

day04recipe1_id

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

day05recipe0

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.

day05recipe0_id

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

day05recipe1

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.

day05recipe1_id

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

day06recipe0

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.

day06recipe0_id

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

day06recipe1

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.

day06recipe1_id

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

day07recipe0

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.

day07recipe0_id

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

day07recipe1

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.

day07recipe1_id

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

day08recipe0

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.

day08recipe0_id

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

day08recipe1

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.

day08recipe1_id

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

day09recipe0

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.

day09recipe0_id

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

day09recipe1

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.

day09recipe1_id

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

day10recipe0

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.

day10recipe0_id

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

day10recipe1

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.

day10recipe1_id

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

day11recipe0

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.

day11recipe0_id

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

day11recipe1

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.

day11recipe1_id

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

day12recipe0

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.

day12recipe0_id

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

day12recipe1

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.

day12recipe1_id

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

day13recipe0

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.

day13recipe0_id

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

day13recipe1

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.

day13recipe1_id

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

day14recipe0

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.

day14recipe0_id

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

day14recipe1

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.

day14recipe1_id

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

day15recipe0

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.

day15recipe0_id

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

day15recipe1

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.

day15recipe1_id

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

day16recipe0

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.

day16recipe0_id

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

day16recipe1

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.

day16recipe1_id

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

day17recipe0

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.

day17recipe0_id

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

day17recipe1

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.

day17recipe1_id

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

day18recipe0

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.

day18recipe0_id

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

day18recipe1

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.

day18recipe1_id

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

day19recipe0

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.

day19recipe0_id

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

day19recipe1

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.

day19recipe1_id

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

day20recipe0

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.

day20recipe0_id

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

day20recipe1

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.

day20recipe1_id

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

day21recipe0

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.

day21recipe0_id

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

day21recipe1

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.

day21recipe1_id

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

day22recipe0

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.

day22recipe0_id

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

day22recipe1

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.

day22recipe1_id

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

day23recipe0

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.

day23recipe0_id

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

day23recipe1

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.

day23recipe1_id

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

day24recipe0

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.

day24recipe0_id

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

day24recipe1

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.

day24recipe1_id

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

day25recipe0

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.

day25recipe0_id

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

day25recipe1

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.

day25recipe1_id

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

day26recipe0

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.

day26recipe0_id

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

day26recipe1

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.

day26recipe1_id

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

day27recipe0

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.

day27recipe0_id

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

day27recipe1

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.

day27recipe1_id

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

day28recipe0

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.

day28recipe0_id

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

day28recipe1

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.

day28recipe1_id

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

day29recipe0

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.

day29recipe0_id

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

day29recipe1

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.

day29recipe1_id

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

day30recipe0

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.

day30recipe0_id

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

day30recipe1

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.

day30recipe1_id

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

day31recipe0

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.

day31recipe0_id

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

day31recipe1

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.

day31recipe1_id

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

get_month_display(**morekwargs)
get_monthly_data()

Returns monthly data, including date numbers and recipe ids for each day, if applicable

Returns:An array of 4, 5, or 6 weeks, each week is an array of 7 days, each day is a dictionary that has a date_number key that is the actual date or 0, and recipe0 and recipe1 ids, which point to the recipe objects in the database (recipe ids may be None if no recipes are selected)
get_recipes_for_day_of_month(date_num)

Returns the recipe ids for the given date num on this calendar instance, if applicable

Parameters:date_num – The date of the month, 1-31
Returns:List of two ids: [recipe01_id, recipe02_id]; these may be None if no recipes are selected or if date_num is out of range
get_year_display(**morekwargs)
id

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

month

The month field stores an integer month, and the list of options is conveniently generated from a library

nickname

The nickname field is a personalized string representation of this month

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

The year field stores a string reference that is matched to a descriptive year for display

class recipes.models.planning.YearNumber

Bases: object

This class is an enum list of years which was created to conveniently create the drop-down for the user when creating a new monthly plan. Using a choice list based on these strings allows for easier validation.

A = u'2018'
B = u'2019'
C = u'2020'
D = u'2021'
E = u'2022'
F = u'2023'
G = u'2024'
H = u'2025'