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

Static media url formatting #2

Open
randlet opened this issue Feb 13, 2014 · 3 comments
Open

Static media url formatting #2

randlet opened this issue Feb 13, 2014 · 3 comments

Comments

@randlet
Copy link

randlet commented Feb 13, 2014

Currently the static media urls for ColorPickerWidget are formatted like:

"%s/%s" % (settings.STATIC_URL, "paintstore/css/colorpicker.css")

However, according to the Django docs (https://docs.djangoproject.com/en/dev/ref/settings/#static-url) STATIC_URL must end in a slash which means you end up with urls like /static//paintstore/css/colorpicker.css which 404's.

Changing the format string from "%s/%s" to "%s%s" solved the problem for me.

hcharley added a commit to hcharley/django-paintstore that referenced this issue Mar 18, 2015
@mhipo1364
Copy link

@randlet Thanks about this issue, so how can we get this package ? regular install has this problem

@randlet
Copy link
Author

randlet commented Sep 16, 2015

You will either need to fork the repo and make the change yourself, or it looks like you could install the version here: hcharley@c63de97:

pip install git+git://github.com/Charlex/django-paintstore.git@c63de976c95949b57f42804174df7ef2717d17c7

should do it.

@sidneijp
Copy link

sidneijp commented Jun 20, 2017

I actually think it's better to resolve the URL using the Django's helpers since its encapsulate the behavior instead of directly use the STATIC_URL. I'll make a pull request of the code ASAP.

sidneijp added a commit to sidneijp/django-paintstore that referenced this issue Jun 20, 2017
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