File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
mycollections/templates/mycollections Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Example MyCollections app
2
- ### Using Django inline formsets with Class-based Views and crispy-forms
2
+ Using Django inline formsets with Class-based Views and crispy-forms
3
3
4
+ ## Installation
5
+
6
+ ``` bash
7
+ pip install -r requirements.txt
8
+ python manage.py collectstatic
9
+ python manage.py runserver
10
+ ```
Original file line number Diff line number Diff line change
1
+ example / settings .py
1
2
"""
2
3
Django settings for example project.
3
4
15
16
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16
17
BASE_DIR = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
17
18
19
+ STATIC_ROOT = os .path .join (BASE_DIR , 'static' )
20
+
18
21
19
22
# Quick-start development settings - unsuitable for production
20
23
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
39
42
'django.contrib.messages' ,
40
43
'django.contrib.staticfiles' ,
41
44
'crispy_forms' ,
45
+ 'dynamic_formsets' ,
42
46
]
43
47
44
48
CRISPY_TEMPLATE_PACK = "bootstrap3"
Original file line number Diff line number Diff line change 23
23
</ table >
24
24
< br >
25
25
< script src ="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js "> </ script >
26
- < script src =" {% static 'mycollections/libraries/django-dynamic-formset/ jquery.formset.js' %} " > </ script >
26
+ < script src =' {% static "dynamic_formsets/ jquery.formset.js" %} ' > </ script >
27
27
< script type ="text/javascript ">
28
28
$ ( '.formset_row-{{ formset.prefix }}' ) . formset ( {
29
29
addText : 'add another' ,
30
30
deleteText : 'remove' ,
31
31
prefix : '{{ formset.prefix }}' ,
32
32
} ) ;
33
- </ script >
33
+ </ script >
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ Django==2.1.7
3
3
django-crispy-forms == 1.7.2
4
4
pytz == 2018.9
5
5
wincertstore == 0.2
6
+ django-dynamic-formsets == 0.0.8
You can’t perform that action at this time.
0 commit comments