cookbook.git
12 years agoDjango uses Model.clean for custom Model validation.
W. Trevor King [Fri, 5 Aug 2011 13:59:49 +0000 (09:59 -0400)]
Django uses Model.clean for custom Model validation.

12 years agoConsolidate unit handling and use proxy classes.
W. Trevor King [Fri, 5 Aug 2011 13:43:13 +0000 (09:43 -0400)]
Consolidate unit handling and use proxy classes.

12 years agoAdd dynamic-class trickery to get ListView titles.
W. Trevor King [Fri, 5 Aug 2011 01:25:39 +0000 (21:25 -0400)]
Add dynamic-class trickery to get ListView titles.

12 years agoDocument python-markdown dependency (Gentoo dev-python/markdown).
W. Trevor King [Thu, 4 Aug 2011 19:59:20 +0000 (15:59 -0400)]
Document python-markdown dependency (Gentoo dev-python/markdown).

12 years agoRewrite to Django from scratch. Now it's much more user-friendly. v0.2
W. Trevor King [Thu, 4 Aug 2011 19:39:18 +0000 (15:39 -0400)]
Rewrite to Django from scratch.  Now it's much more user-friendly.

Bump to version 0.2 (retroactively tagging the previous version as 0.1).

The flask icon is from DesignKode

From their website [1]:

DesignKode is releasing this set of 40 free high quality icons for
your web site and application GUI designs. All icons in this set are
32 x 32 pixel PNG image files. You may freely use these icons in your
commercial or personal projects without attribution.

[1] http://www.designkode.com/blog/free-developer-icons

13 years agoReunite UTF-8 hack comment with sys.setdefaultencoding call it labels. v0.1
W. Trevor King [Tue, 24 Aug 2010 11:44:17 +0000 (07:44 -0400)]
Reunite UTF-8 hack comment with sys.setdefaultencoding call it labels.

13 years agoSort cookbook after adding a new recipe.
W. Trevor King [Wed, 18 Aug 2010 00:41:10 +0000 (20:41 -0400)]
Sort cookbook after adding a new recipe.

13 years agoHandle 'None' in YAML Directions.
W. Trevor King [Wed, 18 Aug 2010 00:38:48 +0000 (20:38 -0400)]
Handle 'None' in YAML Directions.

13 years agoAdjust tag hyperlinking to handle .tags == None
W. Trevor King [Fri, 23 Jul 2010 23:14:28 +0000 (19:14 -0400)]
Adjust tag hyperlinking to handle .tags == None

13 years agoHyperlink recipe tag list
W. Trevor King [Fri, 23 Jul 2010 19:35:57 +0000 (15:35 -0400)]
Hyperlink recipe tag list

13 years agoSort recipe files when loading Cookbook
W. Trevor King [Fri, 23 Jul 2010 19:11:48 +0000 (15:11 -0400)]
Sort recipe files when loading Cookbook

13 years agoCreate the static directory if it is missing
W. Trevor King [Fri, 23 Jul 2010 11:45:48 +0000 (07:45 -0400)]
Create the static directory if it is missing

Since we don't have any files in it at the moment, and Git doesn't
track empty directories.

13 years agoPython 2.5 doesn't allow fn(*args, imap=value)
W. Trevor King [Fri, 23 Jul 2010 01:25:29 +0000 (21:25 -0400)]
Python 2.5 doesn't allow fn(*args, imap=value)

13 years agoAdded digest authentication for cookbook editing
W. Trevor King [Thu, 22 Jul 2010 16:42:58 +0000 (12:42 -0400)]
Added digest authentication for cookbook editing

The example .htaccess file sets up the user
  user: guest
  pass: guest
or, if you're running CherryPy < 3.2
  user: guest
  pass: 8eb3d4841608f011af3dd4bdc4c8b340

13 years agoAdded recipe removal link and replaced ' />' -> '/>'
W. Trevor King [Thu, 22 Jul 2010 16:10:57 +0000 (12:10 -0400)]
Added recipe removal link and replaced ' />' -> '/>'

13 years agoAdded recipe editing pages.
W. Trevor King [Thu, 22 Jul 2010 11:58:16 +0000 (07:58 -0400)]
Added recipe editing pages.

Specifically:
* Added "add new recipe" link to recipes.html template.
* Added "edit recipe" link to recipe.html template.
* Added new template: edit-recipe.html
* Added new Server.edit() and sub-functions.
* Moved Cookbook's save dir definition to Cookbook.save_dir.
* Moved Recipe.path name generation to Cookbook._free_path().
* Cookbook.make_index() now adds paths to Recipes with .path == None.
* In-memory updates for everything.
* Add/remove ingredient blocks with index mapping.

Along the way, I fixed up some random bugs:
* recipe.html was failing if there were no ingredient_blocks or directions.
* Amount.__unicode__ was failing if some attributes were None.
* Ingredient.__unicode__ was failing if .amount was None.
* Allow printing of recipes when .directions == None.

I also made a few style fixes:
* Server.tag_regexp -> ._tag_regexp, since it's internal data.

13 years agoCleanup base.html template comments
W. Trevor King [Thu, 22 Jul 2010 11:53:50 +0000 (07:53 -0400)]
Cleanup base.html template comments

13 years agoUse CherryPy decoding tool to decode GET/POST arguments
W. Trevor King [Thu, 22 Jul 2010 11:52:33 +0000 (07:52 -0400)]
Use CherryPy decoding tool to decode GET/POST arguments

13 years agoEncode URLs into ASCII.
W. Trevor King [Wed, 21 Jul 2010 19:12:19 +0000 (15:12 -0400)]
Encode URLs into ASCII.

URL encoding is undefined.  See
  http://www.cherrypy.org/ticket/825
  http://www.w3schools.com/TAGS/ref_urlencode.asp
  http://www.rfc-editor.org/rfc/rfc2396.txt
Therefore, safe URLs should be in a subset of ASCII.  We convert our
URLs to UTF-8, and then use urllib.quote_plus() to escape the UTF-8
into ASCII.

13 years agoUse dropdowns (with textbox option for new tags) for tag manipulation.
W. Trevor King [Wed, 21 Jul 2010 18:58:51 +0000 (14:58 -0400)]
Use dropdowns (with textbox option for new tags) for tag manipulation.

13 years agoRedirect for invalid tags too (just don't manipulate the data)
W. Trevor King [Wed, 21 Jul 2010 18:38:02 +0000 (14:38 -0400)]
Redirect for invalid tags too (just don't manipulate the data)

13 years agoFix bugs typos in _clean_tag()
W. Trevor King [Wed, 21 Jul 2010 18:35:31 +0000 (14:35 -0400)]
Fix bugs typos in _clean_tag()

13 years agoMerge branch 'master' of ssh://einstein/~/public_html/code/git/cookbook
W. Trevor King [Wed, 21 Jul 2010 18:29:12 +0000 (14:29 -0400)]
Merge branch 'master' of ssh://einstein/~/public_html/code/git/cookbook

13 years agoMerge branch 'master' of ssh://einstein/~/public_html/code/git/cookbook
W. Trevor King [Wed, 21 Jul 2010 18:29:47 +0000 (14:29 -0400)]
Merge branch 'master' of ssh://einstein/~/public_html/code/git/cookbook

13 years agoSanitize input tags
W. Trevor King [Wed, 21 Jul 2010 18:28:54 +0000 (14:28 -0400)]
Sanitize input tags

13 years agoUse POST for data-changing forms, GET otherwise
W. Trevor King [Wed, 21 Jul 2010 18:20:16 +0000 (14:20 -0400)]
Use POST for data-changing forms, GET otherwise

Also float the recipe list tag-selection form to the right.

13 years agoImport with statement so recent server.py changes work with Python 2.5
W. Trevor King [Wed, 21 Jul 2010 16:25:00 +0000 (12:25 -0400)]
Import with statement so recent server.py changes work with Python 2.5

13 years agoAdd ability to filter recipe lists by tag
W. Trevor King [Wed, 21 Jul 2010 16:19:50 +0000 (12:19 -0400)]
Add ability to filter recipe lists by tag

13 years agoAdded tag display to the recipe page with tag-editing forms
W. Trevor King [Wed, 21 Jul 2010 15:56:32 +0000 (11:56 -0400)]
Added tag display to the recipe page with tag-editing forms

13 years agoAdd defaults to `bin/cook.py --help` output, where appropriate.
W. Trevor King [Wed, 21 Jul 2010 15:30:31 +0000 (11:30 -0400)]
Add defaults to `bin/cook.py --help` output, where appropriate.

13 years agoFix missing <td> typo in recipe.html template
W. Trevor King [Mon, 21 Jun 2010 19:53:56 +0000 (15:53 -0400)]
Fix missing <td> typo in recipe.html template

13 years agoAdded link to cookbook.git and trailing slashes to footer
W. Trevor King [Mon, 21 Jun 2010 19:53:29 +0000 (15:53 -0400)]
Added link to cookbook.git and trailing slashes to footer

13 years agoAdd backlinks recipe->index
W. Trevor King [Mon, 21 Jun 2010 19:48:26 +0000 (15:48 -0400)]
Add backlinks recipe->index

13 years agoUse relative index->recipe links
W. Trevor King [Mon, 21 Jun 2010 19:48:02 +0000 (15:48 -0400)]
Use relative index->recipe links

13 years agoAssorted fixes to work with Python 2.5 and CherryPy 2.3
W. Trevor King [Mon, 21 Jun 2010 19:20:35 +0000 (15:20 -0400)]
Assorted fixes to work with Python 2.5 and CherryPy 2.3

The earlier version worked in Python 2.6 and CherryPy 3.x.

13 years agoRan update_copyright.py
W. Trevor King [Mon, 21 Jun 2010 18:02:11 +0000 (14:02 -0400)]
Ran update_copyright.py

13 years agoBegan versioning
W. Trevor King [Mon, 21 Jun 2010 18:01:10 +0000 (14:01 -0400)]
Began versioning