Skip to content
Snippets Groups Projects
Verified Commit ea3c7766 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Correctly add cleave.js via yarnpkg

parent e1f97c63
No related branches found
No related tags found
No related merge requests found
static/
from django.forms import Form
from dj_cleavejs import CleaveWidget
class TestForm(Form):
windows_xp_serial = CleaveWidget(blocks=[5, 5, 5, 5, 5], delimiter="-")
windows_3_serial = CleaveWidget(blocks=[3,7], delimiter="-")
......@@ -42,7 +42,11 @@ TEMPLATES = [
WSGI_APPLICATION = "dj_cleavejs_server.wsgi.application"
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATICFILES_FINDERS = [
"django_yarnpkg.finders.NodeModulesFinder",
]
NODE_MODULES_ROOT = os.path.join(BASE_DIR, "node_modules")
CLEAVE_JS = os.path.join(NODE_MODULES_ROOT, "@iconify", "json")
CLEAVE_JS = "cleave.js/dist/cleave.min.js"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment