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.
Issue #1191 highlighted some confusion around the structure of static
files in Oscar. It's been marginally improved to hopefully clarify the
intentions.
The customisation section required some changes as it's not often
necessary to override the root application instance to change URLs or
views of subapps.
This involves some quite involved changes to the internals of how offers
and organised. A new boolean field has been added to the offer model to
indicate whether to apply to prices exclusive of tax. This is used
within the offer methods to determine whether a basket meets a
condition, and how to apply the benefit if it does.
Fixes #925
Fixes #924
- make sure all pages are linked from somewhere
- prohibit double indexing of source code modules
- remove old unused offers (we use GIT, no need to keep old files)
- use local version of Oscar logo
Fixes #921
Update the docs regarding migrations for custom user model
The docs on pitfalls with migrations and a custom user model are
not accurate anymore since migrations in Oscar have been fixed. Hence
this update them.
Dependencies installed via setup.py stay in their eggs and their
templates won't be found by Django. This caused a
TemplateNotFoundError when users were trying to use
Django's admin to set categories.
Using the admin is unsupported, but this still prevents a similar error
from happening when we use other dependencies that ship templates. It
also shouldn't slow down production use.
Fixes #761
- Added stubs for both apps
- Switched to using :automodule: for abstract models instead of
individual :autoclass:
- Added instructions on creating a Partner and ProductClass instance
when setting up a new Oscar instance
- Made instructions on using a custom template more expliciy. Should be
better for new users.
- Fixes a few typos and mistakes in the code examples.
This commit is squash of pull request #640.
Attempt at making it clearer what needs to be done for what kind of
customisation. Created a new topic that lines out the prepatory
steps that need to be taken, and moved duplicate information from the
how-tos into the new topic.
The old howto included out-dated info on how to translate Oscar. That
has been replaced by a link to the Transifex project.
It was the only howto left under the Contributing headline, which really
shouldn't be there (as there's an entirely different section in the docs
for contributing). As it is more of a topic anyway, and will hopefully
soon include documentation on translation style etc., it was turned into
a topic.