I seriously hope someone can help me here, as I'm at my wits end.
I'm trying to move to Satchmo version 0.5. Unfortunately, the django
url resolution mechanism is not working when attempting to do a
'reverse lookup'.
For example, in the satcho.product.models module, the product class
defines the following
def get_absolute_url(self):
return urlresolvers.reverse('satchmo_product',
kwargs={'product_slug': self.slug})
Now, in my template I have the following:
<td><h3 style="font-size: 13pt;"><a
href="{{ product.get_absolute_url }}">{{ product.name }}</a></h3></td>
Unfortunately, when get_absolute_url is called, it seems to be
silently failing and returning an empty string.
This was working fine before the attempted upgrade.
In my attempts to track it down, I've reverted everything, ensured the
application was working, and gone through the merge process again -
only to discover the exact same problem.
This has caused great frustration, as I need to move to release 0.5
for a number of the bug fixes in that version.
Has anyone else come up against the same problem?
btw I'm running against django 5947.
Cheers,
G
Thanks for the hint - I did exactly what you suggested and managed to
track it down. Using the shell, I managed to work out where the
exception was being thrown.
Interestingly, the bug was in a completely different area of the code
(i.e. it wasn't remotely template-related); invocation of the template
was causing a module to be loaded, which was in turn loading *another*
module that was throwing an exception when Satchmo tried to initialize
it (a new payments module I've written to allow Satchmo to deal with a
NZ credit-card payment gateway provider). This last module had some
initialization methods with signatures that had changed on the move to
version 0.5.
Its certainly been one of the more difficult bugs I've had to track
down recently.
Cheers!
G