OSCAR_SLUG_FUNCTION: Support string notation to set slugifier
Importing things in settings is discouraged. But until now,
OSCAR_SLUG_FUNCTION could only be set as a callable, which requires
importing. It's now been updated to use the import_string function.
The getting started guide now explicitly mentions copying the "missing
image" image when working with a remote file storage. Was raised in
issue #1314.
Oscar is slowly adding better support for switching languages on the
fly. That also means that locales need to be switched.
The issue this commit tries to fix is that when switching languages, the
locale for rendering prices doesn't change, and hence prices are
formatted incorrectly.
Oscar used to require hardcoding the locale for prices via
OSCAR_CURRENCY_LOCALE. I'm not sure what the reasoning behind this was,
because as far as I'm aware, the locale can be auto-detected from the
current language. This not only reduces complexity, but nicely works
when switching languages.
This allows importing a class or attribute by the reasonably common
string notation, which is useful for e.g. settings. When using settings,
we should prefer absolute imports over using get_class, because that
limits us to modules in INSTALLED_APPS.
Make access check function for dashboard easier to customise
* It can now be specified in OSCAR_DASHBOARD_DEFAULT_ACCESS_FUNCTION
* nav.py and menu.py were split up so that Node can be dynamically
loaded and hence overridden
I recently needed to alter the access function and realised it's not as
easy as I thought.
OSCAR_REQUIRED_ADDRESS_FIELDS allows setting which fields are required.
The use case is that post codes are expected to be required, but many
countries don't actually use them.
To set a base for upcoming docs changes, the docs directory structure
has been streamlined to follow a simplified version of Django's docs.
The old _draft folder has been removed. Both files from there and the
current docs that don't fit nicely into the new structure are in _old/
for the moment.
Clean up documentation typos (e.g., use 'e.g.' instead of 'eg'; misspellings; GitHub vs Github; consistent use of Oscar vs oscar or django-oscar when referring to the product)