Alright, I found a somewhat-workable solution, and I'll post the gist
below in case somebody else has the same problem:
1) Override the checkout view so that the request object is passed in
to your cart. I subclassed CheckoutSelectionView to do this as
follows:
class OverriddenCheckoutView(CheckoutSelectionView):
"""
Override django-shop's default checkout view so we can pass
request info to the cart.
For this to be used, you'll need to "shadow" django_shop's default
checkout view in urls.py.
For example::
(r'^store/checkout/$', OverriddenCheckoutView.as_view()),
(r'^store/', include(shop_urls)),
"""
def create_order_object_from_cart(self):
"""
Override the default django_shop implementation, by passing
self.request to the cart.
"""
request = self.request
cart = get_or_create_cart(request)
cart.update(state={'request': request})
order = Order.objects.create_from_cart(cart)
add_order_to_request(request, order)
return order
2) Change my cart modifier to accept the new request parameter:
class AddTaxes(BaseCartModifier):
"""
Add sales tax to the cart, based on the user's state.
"""
def process_cart(self, cart, state={}):
"""
If we were passed a "request" state parameter, save it to
self.request for later use.
We need access to the request object so that we can determine
the user's address for
tax calculations.
"""
if state and state.has_key('request'):
self.request = state['request']
super(AddTaxes, self).process_cart(cart, state)
3) Elsewhere in my cart modifier, use
shop.util.address.get_shipping_address_from_request to get the user's
address from self.request.
The following discussion was helpful in pointing me to patching the
checkout view:
https://groups.google.com/group/django-shop/browse_thread/thread/60fd4297fc99ca65?pli=1
Hope that helps somebody!