django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.
We should not be applying lint amnesty for such a violation.
all dirs must now go into COMPREHENSIVE_THEME_DIRS.
Move comprehensive theming setup section out of startup.py and into
settings files using new 'derived' functionality.
Add 'derive_settings' at the end of all top-level Django settings files.
Move validation of comprehensive theming settings into new apps.py
theming file.
Split theming code into code safe to run before settings are initialized
-and- after settings are initialized.
PSA was monolothic, now split, with new features, like
a DB-backed partial pipeline. FB OAuth2 version also upped.
Partial pipelines don't get cleared except when necessary.
They persist for special cases like change of browser while
still mid-pipeline (i.e. email validation step).
Refactor, cleanup, and update of a lot of small things as well.
PLEASE NOTE the new `social_auth_partial` table.
This makes it possible to refer to multiple book from a single app.
This also means that Open edX branches will be able to pass bok-choy
tests (at least if the books have already been built.)
2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS
3. Update paver commands to support multi theme dirs
4. Updating template loaders
5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings
6. Update tests
7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
Comprehensive theming did not work with django templates (used by course wiki).
The reason it didn't work was that in order for the theme to work, theme template folder
has to be added to django template dirs setting *before* django startup.
After django startup, modifying `settings.DEFAULT_TEMPLATE_ENGINE['DIRS']` has no effect,
because at that point the template engine is already initialized with a copy of the
template dirs list.
Instead of running the theme startup code as an autostartup hook, we manually run it
*before* `django.setup()`. This is fine because theme startup code doesn't have to do
anything else besides modifying some settings and doesn't actually need django to be
initialized.
Adding the declaration of the settings object to openedx.conf to be able to import it from a nicer location
Resolving quality violations
Merging dicts with the settings definition when they exist in the microsite configuration
Using a cache to improve the perfomance of quering any dictionary in the microsite definition
Ignoring the invalid-name pylint warning since the names must be kept thsi way to stay the same as the ones in django.
Removing the default dict argument as per https://docs.python.org/2/tutorial/controlflow.html#default-argument-values
Extracting the implementation of the microsite to a selectable backend.
Leaving the function startup.enable_microsites for backwards compatibilityy
Adding a database backend
Using a cache to improve the perfomance of quering any dictionary in the microsite definition.
Changed the database backend so that it extends the settings file backend and removed all the unnecessary methods.
Using the backend provider for the get_dict function
some tweeks and some initial unit tests
Using getattr as a function insteal of calling the underlying __getattr__ directly
Adding an ModelAdmin object for the microsite model in the django-admin panel
refactor enable_microsites()
consolidate/refactor some shared code
add config to aws.py and add migration files
fix tests
Changes to get the backends to run after the refactor
add archiving capabilities to microsites. Also make a few notes about performance improvements to make
fix tests
Making the query to find if microsites exist in the database faster
add ORG to microsite mapping tables and some performance improvements
allow for Mako templates to be pulled from the database
fix tests
For the database template backend the uri of the template does not use the filesystem relative path
Fixing pylint violations
Added caching of the templates stored in the database
Fixing pylint errors
fix pylint
Clearing the cache on model save
Fixing pylint errors
rebased and added test coverage
rebased cdodge/microsite-improvements branch with master and added test
coverage
added missing migration
fix quality violations
add more test coverage
mattdrayer: Add microsite_configuration to cms.INSTALLED_APPS
added microsite settings to cms/envs/test.py
run session cookie tests only in LMS
fixed broken tests
putting middleware changes back
Preventing the template_backend to be called on requests which have no microsite
changes to address feedback from mjfrey
changed BaseMicrositeBackend to AbstractBaseMicrositeBackend
changes after feedback from mattdrayer
fixed broken tests and quality violations
Allowing the backend to handle the enable_pre_startup routine
Typos and docstrings
Adressing feedback
Fixing python tests
add comment to explain why we need enable_microsites_pre_startup()
Stripping the leading / for the django_templates finder
Enabling the microsite configurations before running django.setup()
Adding only the templates directory before startup
Adding the missing overrides file at the django templates main
Using the comp_theming way of overriding css
Adding test for the microsite_template_path filter
* The LMS now also monkey-patches
xmodule.x_module.descriptor_global_handler_url and
xmodule.x_module.descriptor_global_local_resource_url so that we can
get LMS XBlock URLs from the DescriptorSystem. That functionality is
needed in the block transforms collect() phase for certain XModules
like Video. For instance, say we want to generate the transcripts
URLs. The collect phase is run asynchronously, without a user context.
* The URL handler monkey-patching is now done in the startup.py files
for LMS and Studio. Studio used to do this in the import of
cms/djangoapps/contentstore/views/item.py. This was mostly just
because it seemed like a sane and consistent place to put it.
* LmsHandlerUrls was removed, its handler_url and local_resource_url
methods were moved to be top level functions. The only reason that
class existed seems to be to give a place to store course_id state,
and that can now be derived from the block location.
* To avoid the Module -> Descriptor ProxyAttribute magic that we do
(which explodes with an UndefinedContext error because there is no
user involved), when examining the block's handler method in
handler_url, I made a few changes:
** Check the .__class__ to see if the handler was defined, instead of the
block itself.
** The above required me to relax the check for _is_xblock_handler on the
function, since that will no longer be defined.
90% of this goes away when we kill XModules and do the refactoring we've
wanted to do for a while.