The demo site was not kept up to date with the recent changes in Oscar
due to time contraints. It should be moved to a separate demo repository
in the future.
This also removes the --process-dependency-links argument to pip install
since this was only required for the unreleased version of the
django-tables package.
To support Django 1.8, we are needing a fix in tables2. It is pending a
merge in https://github.com/bradleyayers/django-tables2/pull/245
Let's hope that we'll get a release soon.
Unfortunately, this change requires that we re-enable the deprecated
--process-dependency-links to pip install. I welcome any ideas for a
better approach.
This removes all the bits and bobs where we referenced South, or added
some code supporting it. Documentation will be updated in a later
commit, together with other Django changes.
It's useful to fail on too many lint errors, but right now I have a
scenario where I'm happy to ignore lint errors, but Travis doesn't
report whether the tests passed because it stopped at the linting phase.
By first running the test suite, this behaviour is remedied.
Use pip instead of easy_install for "make install"
This should have multiple advantages:
- We're not mixing eggs with the flat installs from pip
- Given a reasonably current pip, we can take advantage of wheels
- Using pip for both allows for easier reasoning about dependencies
Resurrect requirements_vagrant.txt as requirements_migrations.txt
The file was removed in af3c381d to remove Vagrant, but it served a
dual purpose as requirements to test our suite of migrations. It's
resurrection will hopefully let Travis pass again.
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.
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.
Motivated by 51bf7280, this change adds a new make target to find parts
of the codebase that need changing after some event has happened. It
also adds an example TODO.
Add migration creation helper and enforce South 1.0
This crude and destructive script helps create migrations for both South
and Django's native migrations framework. I'm happy to leave plenty of
room for improvement so that the King of Bash (aka @codeinthehole) can
do his thing.
This commit also enforces South 1.0. It's a backwards compatible release
which explicitly is meant to help the migration; it makes both our and
our users life's easier. Notably, it first looks for a south_migrations
directory before falling back to the migrations directory in an app.
That nicely avoids any conflicts between migration files between the two
migration frameworks.
Where I previously thought that renaming HTML/CSS is more hassle than
it's worth, @mbertheau convinced me that to update a codebase, a general
search-and-replace is the best approach already and will catch any
HTML/CSS changes.
I also missed to deprecate the min_variant_price properties.
Replace countries.json fixture by management command
I started looking at this because on the mailing list, having the UK as
only shipping country led to confusion. This is mostly due to the
shipping address form hiding the country field if there's only one
country enabled, but all the validation then requiring UK postcodes and
phone numbers.
It's bothered me for a while that we're using a fixture to populate the
countries, which is at risk of becoming stale.
pycountry offers an excellent data source for a list of countries, so I
polished an existing management command to use it to populate the
country database.
This commit has two immediate effects:
* New setups will use a more current country database
* By default, all countries will be marked as shipping countries
pycountry also ships with localised names of the countries, which should
allow us to populate the database with localised country names.
This simple site illustrates how to use Oscar for a US-specific site.
It's intended to help developers build Oscar sites for the US.
It can be built using:
$ make us_site
This will build the database and load some sample products.
The key changes from core Oscar are:
- Setting the default currency to USD in settings.
- Overriding Oscar's partner app so we can specify out own Selector
class which returns the US strategy. This ensures all prices are shown
without tax.
- Overriding the checkout session mixin so we can apply taxes to the
submission and also pass a template variable that specifies taxes
should be broken out separately. We use a dummy tax module that
applies very simple taxes to the submission.
- Overriding the checkout shipping address form so we can force the
state field to use the US state dropdown.
This ensures that we catch errors in the build process of the demo site,
and led to me spotting #1294.
I must've accidentally committed my demo database settings; switched to
a more generic defaults in demo/settings.py. Also added ATOMIC_REQUESTS
as that is recommended by Oscar.
django-extensions' reset_db fails with PostGIS without a template
database, hence it is skipped on Travis.
https://github.com/django-extensions/django-extensions/issues/489
It's easy to forget to update the demo CSS. And I can't think of a good
reason to not do it together -- it's super quick and one can always
unstage unwanted updates.
Once again! Merely moving all JSON imports before the product imports
as done in 9f02dc doesn't work: ranges.json depends on categories only
created by the product import.
Thanks to Diego Barrera <diego.barrera80@gmail.com> for reporting on the
mailing list.