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

Fix example app to find static file

parent 669b689a
No related branches found
No related tags found
No related merge requests found
from django.forms import Form from django.forms import CharField, Form
from dj_cleavejs import CleaveWidget from dj_cleavejs import CleaveWidget
class TestForm(Form): class TestForm(Form):
windows_xp_serial = CleaveWidget(blocks=[5, 5, 5, 5, 5], delimiter="-") windows_xp_serial = CharField(widget=CleaveWidget(blocks=[5, 5, 5, 5, 5], delimiter="-"))
windows_3_serial = CleaveWidget(blocks=[3,7], delimiter="-") windows_3_serial = CharField(widget=CleaveWidget(blocks=[3,7], delimiter="-"))
...@@ -11,6 +11,7 @@ ALLOWED_HOSTS = [] ...@@ -11,6 +11,7 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [ INSTALLED_APPS = [
"django.contrib.staticfiles", "django.contrib.staticfiles",
"django_yarnpkg", "django_yarnpkg",
"dj_cleavejs.apps.DjCleaveJSConfig",
"dj_cleavejs_example.apps.DjCleaveJSExampleConfig", "dj_cleavejs_example.apps.DjCleaveJSExampleConfig",
] ]
...@@ -44,6 +45,8 @@ WSGI_APPLICATION = "dj_cleavejs_example.wsgi.application" ...@@ -44,6 +45,8 @@ WSGI_APPLICATION = "dj_cleavejs_example.wsgi.application"
STATIC_URL = "/static/" STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static") STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATICFILES_FINDERS = [ STATICFILES_FINDERS = [
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
"django_yarnpkg.finders.NodeModulesFinder", "django_yarnpkg.finders.NodeModulesFinder",
] ]
......
...@@ -7,6 +7,6 @@ ...@@ -7,6 +7,6 @@
<form> <form>
{{ form }} {{ form }}
</form> </form>
{{ form.media.js }} {{ form.media }}
</body> </body>
</head> </head>
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