learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
82 stars 57 forks source link

Get rid of default_images and default_styles #880

Open pricem opened 10 years ago

pricem commented 10 years ago

Now that we are getting rid of file-sharing, we may be able to go back to using the images and styles directories from the repository. There may be some issues to think about here (beyond just renaming the dirs), particularly when it comes to chapter specific customizations. We would also need a procedure for converting an existing site over (how do you reconcile any differences between default_images and images)?

lenaqr commented 10 years ago

I would be wary of putting customizations directly in the repository, since git will complain/overwrite them.

From a technical standpoint it seems we ideally want to say "use the custom image if it exists, otherwise use the original from the repository". The same could work for styles, though since stylesheets cascade it would be even better to say "include the custom stylesheet if it exists, in addition to the original from the repository". I don't know if there's any sane way to do this, much less a way that'll play well with the filebrowser thingy (which I haven't used).

One idea that's been raised was git submodules, but then chapter admins might not know how to work them.

lenaqr commented 10 years ago

Oh, another thought (might also resolve #881) -- what if we keep default_images/ as we always have, add custom_images/ which contains only changed files, and add a manage command and/or button on the theme editor frontend that goes through both directories, merges them, and dumps them in images/ which is what is served. Keep the invariant that images/ can always be regenerated from the former two.

Actually, Django already has ./manage.py collectstatic which does a similar thing; I wonder if we can't use that in some way.

milescalabresi commented 1 year ago

I think there are two and a half tasks remaining on this issue:

For the spirit of the challenge of admins uploading custom images and styles, I think we're addressing that elsewhere. Theme-related images (headers/logos/landing pages) have been solved reasonably well, and I think we are (correctly) moving away from custom stylesheets in favor of theme customizations. Other images can/should be in the uploaded folder, which git ignores.