David Winterbottom
aa7f899c51
Move catalogue tests to integration folder...
...as they are all integration tests (they save stuff).
13 лет назад
David Winterbottom
aab093deea
Convert non-ASCII char to ASCII for category slugs
This uses the unidecode package to convert non-ASCII words to ASCII
equivalents. We use a new slugify function to wrap this logic as we
will want to use it elsewhere.
See this StackOverflow thread for context:
http://stackoverflow.com/questions/702337/how-to-make-django-slugify-work-properly-with-unicode-strings/
Unidecode becomes a new dependency for Oscar.
https://pypi.python.org/pypi/Unidecode
Hat-tip to @avsazonov for suggesting this fix.
13 лет назад
David Winterbottom
fc9999e70b
Rework subtree updating after move
New impl is considerably simpler and lets the save method update each
node's slug and full name.
13 лет назад
David Winterbottom
5ba13b2330
Add test scaffolding around Category class
13 лет назад
David Winterbottom
8e4d5edd95
Move category tests to integration folder
They use the DB so they are not really unit tests.
13 лет назад
David Winterbottom
1573989b53
Add a status field to offers
This makes it more efficient to load offers now that we can't simply use
the date filters to exlucde unavailable offers.
The is_active field has been reworked to depend on the
get_max_applications method.
The save method of ConditionalOffer now auto-sets status.
Fixes #403
13 лет назад
David Winterbottom
e5d78436e2
Split offer tests into unit/integration folders
This might be futile.
13 лет назад
David Winterbottom
ae13037e48
Turns out there are empty strings being passed to the currency filter
So we add handling to the filter where we check the value can be
converted to a valid decimal. If not, return an empty string.
Fixes #316
13 лет назад
David Winterbottom
0badc8849b
Add integration test for currency templatetag
Plus fix a bug when handling None.
13 лет назад