add_product mostly handles updating or creating a basket line. Having
that line available is both useful when overriding the method, or when
calling the method from elsewhere.
Another lovely suggestion by @metamatik.
Adjust how the "action" param is submitted in order list page
Before this change, the "download as CSV" button wasn't working as there
were two hidden "action" inputs and only the value of the "change order
status" button was being picked up.
This change uses button name attributes to determine which button was
submitted.
The puppet provisioning of the Vagrant box has been broken for ages due
to floating dependencies. I don't want to support it anymore since
Docker images are almost ready - hence why it goes.
Revert "Use string notation for factory boy factories"
This reverts commit f243314e55.
I mistakenly assumed that the string notation would delay the loading of
the model class as it does e.g. when used for ForeignKeys or in the
AUTH_USER_MODEL. But in fact it achieves the opposite, it not just loads
the model, but it requires the entire model registry to be present!
This has been reported in
https://github.com/rbarrois/factory_boy/issues/160
Until then, we need to stick to the old syntax.
Use get_registered_model to load User model in Django 1.7
In Django 1.7, get_user_model fails if the app cache isn't ready. As we
have to use it in many places in Oscar, this commit essentially loads
the User model like we load any other model in Oscar. This circumvents
the check for the model registry being ready.
Otherwise, there's major problems trying to avoid imports that trigger
the call to get_user_model (e.g. in forms and test factories) before the
first model is loaded (which then triggers Django's app load sequence).
Turns out this has been broken for ages. It was still assuming a
one-to-one relationship between products and stockrecords AND it had
broken translation strings in the flash message.
This commits fixes all the bad.
Previous change has caused Travis to complain 'Please override the
script: key in your .travis.yml to run tests'.
https://travis-ci.org/tangentlabs/django-oscar/jobs/35319191
I am though so I'm confused. I did tinker with the whitespace last time
so here I adjust it in the hope that it fixes things. (I have no idea
what I'm doing).
We also drop the "allow_failures" section for Pythons 3.x on Travis.
They should pass consistently now.
I've also adjusted the 'travis' make target to not install Oscar so this
can be called separately as part of the Travis build. Hence, build
errors are reported differently from tests failing.
As 2.0.12 introduces a new feature which is used by an Oscar test.
We should really pin all these dependencies as using ranges is just
asking for trouble. I'll do that soon.
Relax dependency restrictions for South and django-compressor
Oscar 0.7 works ok with later versions of these two packages and so we
open up the restrictions in setup.py to avoid forced downgrades for
Oscar projects.
Fixes #1477
This image importer is quite old and probably shouldn't be in the oscar
package (but in the sandbox itself) as it's only used by the sandbox.
This change ensure its logs messages are quieter when running "make
sandbox".