Mike Dewhirst
unread,May 16, 2017, 3:43:03 AM5/16/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I have a user who is keen to revert to the "old" 1.8 look and feel for
his company now that we have upgraded to 1.10.
First question is it even possible?
I have tested this using blunt force and at first glance it *seems*
possible in both directions. However I have a suspicion there might be
tie-ins I have not discovered. Also. I haven't yet tried 1.11.
If it is feasible ...
Second question is how to do it.
I have stared long and hard at settings. I have this ...
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static/').replace('\\', '/'),
os.path.join(BASE_DIR, 'company/static/').replace('\\', '/'),
os.path.join(BASE_DIR, 'substance/static/').replace('\\', '/'),
os.path.join(BASE_DIR, 'workplace/static/').replace('\\', '/'),
]
and
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
and I can get the user (company) from the request and I can create a
company subdir under 'company/static/<company>/' if that's where I
should be putting the admin files from 1.8. But then how do I tweak the
settings so the Admin uses the preferred company static files for just
that user?
Maybe instead, there is a company specific preference I can establish to
provide '/static/admin_1.8' for that user?
Maybe I need to have company-specific Admin templates which override the
block which reads the static files based on a company preference?
Any hints?
Thanks
Mike