harvard-lil/shlvme — pull request #4 by imakewebthings (2012-03-28 14:29:14+00:00)
Title: Shelf (part deux)

Changes this round:

- Not very visible, but the Shelf API is *probably* good to go. At least I've written all the cases I can think of.
- Shelf page renders the shelf now. Clicking items to render them on the right is the next step.
- Shelf deletion now hooked up.
- There's an empty and currently useless Edit Shelf form on the user page. This will be hooked up later with JS.

Also in this update, I wrote a really simple middleware that's just a rip-off of a Node.js Connect middleware called MethodOverride. Look at the settings sample file at the last middleware call in that list and copy it to your real settings file. What it does is simple: If a POST request contains a parameter named `_method`, its value overrides the `request.method`. It gives us fake support for the more verbose HTTP verbs. So for example, the user update form looks like this:

```html

{% csrf_token %}
...etc

```

And in our views we can say `if request.method == 'PATCH'`.

For API views I'm still overloading POST to do the same jobs as some of these other views if POST isn't already used appropriately for something else.

One more note not related to my changes. If you're keeping track of the packages a new dev would need to install to get the project running, your change from yesterday added a dependency on `lxml`.

I think that's it. Cheers.