jmrivas86 / django-json-widget

An alternative widget that makes it easy to edit the new Django's field JSONField (PostgreSQL specific model fields)
MIT License
440 stars 88 forks source link

use django's static templatetag to generate static urls #30

Closed pedromcaraujo closed 4 years ago

pedromcaraujo commented 4 years ago

Hi,

I'm using the django-storages package to serve my static files on Digital Ocean and these static urls don't work for me.

I proposed a solution that uses django's internal mehod of fetching static urls.

Let me know if you need anything else from me.

Fixes https://github.com/jmrivas86/django-json-widget/issues/7

guywillett commented 4 years ago

I confirm that this is necessary when using django-storages else the static_url is duplicated in the final result.

So instead of /static/foo/bar we get /static/static/foo/bar/.