Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webassets enhancement #483

Closed
dmdm opened this issue Aug 25, 2012 · 4 comments
Closed

webassets enhancement #483

dmdm opened this issue Aug 25, 2012 · 4 comments

Comments

@dmdm
Copy link

dmdm commented Aug 25, 2012

As of now, the generated ASSET_URL is always absolute. This is bad for local development, and my current (ugly) workaround is to keep config SITEURL empty.

The situation could be improved by the following change to generators.py -> StaticGenerator -> generate_context()

# Define the assets environment that will be passed to the
# generators. The StaticGenerator must then be run first to have
# the assets in the output_path before generating the templates.
if self.settings.get('RELATIVE_URLS'):
    assets_url = './theme/'
else:
    assets_url = self.settings['SITEURL'] + '/theme/'
assets_src = os.path.join(self.output_path, 'theme')
self.assets_env = AssetsEnvironment(assets_src, assets_url)
@saimn
Copy link
Contributor

saimn commented Aug 25, 2012

this seems good to me, you should probably submit a PR with this change.

@dmdm
Copy link
Author

dmdm commented Aug 26, 2012

Ok. Please allow me some time to do it.

@saimn
Copy link
Contributor

saimn commented Oct 24, 2012

This one was fixed by PR #488

@bbinet
Copy link
Contributor

bbinet commented Oct 24, 2012

Ok, so close this one.

@bbinet bbinet closed this as completed Oct 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants