Ticket #147 (new defect)

Opened 9 months ago

THEME_STATIC_URL cause conflicting theme lookup for templatetag

Reported by: edrik Owned by:
Priority: major Milestone:
Component: styling Version:
Keywords: themes static Cc:

Description

This problem is introduced in e92edb071fbe and c77e2bcea832.

The fist change cause THEME_STATIC_URL to always be set to /{STATIC_URL}/default/ and not changed by just overriding THEME in settings_local.py.

Unfortunately overriding THEME_STATIC_URL in settings_local.py to the correct URL still cause problems with the second change. The logic used in in /apps/lib/templatetags/theme.py produces multiple theme values in the URL. Regardless of the path that actually matched THEME_STATIC_URL is used to create the URL, causing it to always return an additional theme value in the URL.

There could just be a flag when to use STATIC_URL and not THEME_STATIC_URL but this would make the whole "for candidate in candidates:" looping a bit obsolete with two candidates an a if else for each. Any thoughts on how best to fix this and how it should work?

(#144 and #145 can be considered duplicates of this. One side effect is a extra /default/ in URLs, causing 404, for the initial setup.)

Note: See TracTickets for help on using tickets.