Izidor Matušov
6f9f285843
Allow non-oscar dashboard application
Fixes #1047
12 jaren geleden
Maik Hoepfel
1b474d7361
Permission fix for dynamic dashboard navigation
The code assumed that an application instance and it's views have the
same parent module. This is not necessarily true, as one can customise
either just a view or just an app.
The fix consists of always using get_class to load the application
instance.
@mberthau pointed out the issue and provided a first fix in #993 and #1034 .
12 jaren geleden
David Winterbottom
ddd870fb35
Remove import_module
12 jaren geleden
Izidor Matušov
1432af1a74
Don't fallback to default apps when app is found
Fixes #923
12 jaren geleden
David Winterbottom
9d2a1ca24d
Rework how we tell if there is a profile class
12 jaren geleden
Maik Hoepfel
9e3d824c57
Add lightweight feature hiding functionality
Introduces the concept of a "feature" that can be hidden. A list of
features to hide can be supplied in OSCAR_HIDDEN_FEATURES.
Feature hiding is currently supported in two places.
Application instances can carry a "hidable_feature_name". If set and
found in OSCAR_HIDDEN_FEATURES, post_process_urls will return an empty
set of url patterns, hence disabling relevant views.
display_tags also has a new template block tag iffeature.
{% iffeature "feature" %}xxx{% endiffeature %} will hide everything
inside the block if the feature is hidden.
12 jaren geleden
Maik Hoepfel
7b809d3a5f
get_classes now allows top-level apps.
Fixes #614
12 jaren geleden
David Winterbottom
5316b75314
Correct flake8 errors and warnings
13 jaren geleden
Paweł Kowalski
a148c3d5b5
Fix get_classes module name processing
13 jaren geleden
David Winterbottom
f4daa0e107
First stage of offers dashboard complete
14 jaren geleden
David Winterbottom
d975f81369
Added more helpful error message for missing classname problems when loading
14 jaren geleden
David Winterbottom
69045acc5d
Added view/form for handling updates to user and profile.
It handles the situation where there is no profile model too, and
dyncamically builds a profile and user form
14 jaren geleden
David Winterbottom
b9de81f3e6
Updated the load_class method to work with app labels with more than 2
segments.
14 jaren geleden
David Winterbottom
2cc41173ff
Reworked the dynamic class loader
14 jaren geleden
David Winterbottom
9173db6092
Added test for loading from dashboard
14 jaren geleden
David Winterbottom
6851048780
Replaced import_module with a better class loading mechanism.
This ones won't causes pep8 to complain.
14 jaren geleden
David Winterbottom
e2a4c25b7f
Started reworking the class loading mechanism
14 jaren geleden
David Winterbottom
247039c16f
Reverting logging change as it clashes with std library
14 jaren geleden
David Winterbottom
92d409110b
Added logging support to dynamic loading
14 jaren geleden
David Winterbottom
5b7b990b20
MASSIVE commit as the word 'item' is phased out in favour of 'product' to make things more consistent. Also, renamed product app to catalogue
14 jaren geleden
David Winterbottom
39dd0b6508
Corrected all exceptions to use pep8 naming convention
14 jaren geleden
David Winterbottom
fc0d3e70ca
Updated shipping address views in checkout - not finished yet
14 jaren geleden
David Winterbottom
aed0d58f82
Fixed bug in new version of import_module
15 jaren geleden
Federico Marani
11a47af88f
added ability to load subpackages
15 jaren geleden
Federico Marani
de21ce8c85
added ability to load subpackages
15 jaren geleden
David Winterbottom
7443395912
Reworked import_module function to load classes into passed namespace
15 jaren geleden
David Winterbottom
887d605757
Refactored folder structure to use an 'apps' folder
15 jaren geleden
David Winterbottom
cb3b26509a
Refactored location of dynamic class loader
15 jaren geleden
David Winterbottom
737add0534
Added core and test packages
15 jaren geleden