Skip to main content

mezzanine-recipes

This plugin gives you a “Recipe” blog post type for your Mezzanine sites.

Features

  • Embed an image of the meal

  • Provide an ingredient list

  • Let your visitors add a comment and rating to recipes

  • The usual stuff - ingredients, times, categories

  • REST-API for external applications

Installation

  • Run pip install mezzanine-recipes (or, if you want to hack on mezzanine-recipes, clone it and run pip install -e path/to/repo)

  • Create a Mezzanine CMS project

  • Add "mezzanine_recipes" followed by "tastypie" on top of your INSTALLED_APPS

  • Migrate your database with python manage.py migrate mezzanine_recipes

  • Install fixtures with python manage.py loaddata mezzanine_required.json

  • To enable Recipe-Blog and REST API put following code to your urls.py:

    from mezzanine.conf import settings
    from tastypie.api import Api
    from mezzanine_recipes.api import *
    
    v1_api = Api(api_name='v1')
    v1_api.register(CategoryResource())
    v1_api.register(KeywordResource())
    v1_api.register(AssignedKeywordResource())
    v1_api.register(PostResource())
    v1_api.register(RecipeResource())
    v1_api.register(BlogPostResource())
    v1_api.register(IngredientResource())
    v1_api.register(WorkingHoursResource())
    v1_api.register(CookingTimeResource())
    v1_api.register(RestPeriodResource())
    v1_api.register(CommentResource())
    v1_api.register(RatingResource())
    
    urlpatterns = patterns("",
        ("^api/", include(v1_api.urls)),
        ("^%s/" % settings.BLOG_SLUG, include("mezzanine_recipes.urls")),
        ...
  • Look at http://www.robertstevens.org/mezzanine-recipes.html if you need a much more detailed installation instruction

Usage

mezzanine-recipe provides the blog post type “Recipe”. The Recipe blog post type represents a single recipe.

Create a Recipe blog post in the Mezzanine admin (naming it something like “Recipe”).

Creating Templates

The template for the Recipe List can be found at templates/recipe/recipe_list.html and for a Recipe Blog Post at templates/recipe/recipe_detail.html.

The Recipe object is available at mezzanine_recipes.models.recipe. It has the following properties:

  • Periods and times: WorkingHours, CookingTime, RestPeriod

  • Cooking info: ingredients, portions, difficulty, categories

  • Text data: title, summary, content, comments, ratings

To Do

  • Implement some tests

  • Add single cooking steps to Recipe

Metadata

Release files for mezzanine-recipes 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mezzanine-recipes 1.0.0
File Size Uploaded
mezzanine-recipes-1.0.0.tar.gz 25.0 kB Details

Release files / mezzanine-recipes-1.0.0.tar.gz

Download URL mezzanine-recipes-1.0.0.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9f1570ddc6f4539949e5aa8a598c2ef74bc4358be3d26094c8cd48a2cc8cf6b4
BLAKE2b-256 checksum
How to use checksums
e0753f041edbead6ff3981c6e58643c5113088cbb9e7c4de8e26b29911a34c4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page