Model and form fields to store values of multiple fields in dictionary
Project description
# Form field with variable list of rows
Requires Django framework and jQuery javascript library.
## Installation
```
pip install dynamicinputs
```
## Usage
Add "dynamicinputs" to installed apps in django settings file:
```python
INSTALLED_APPS = (
...
'dynamicinputs',
...
)
```
Then it can be used in model:
```python
from dynamicinputs import DynamicInputField
parent_names = DynamicInputField(
fields.CharField(
label="Names and addresses of parent companies",
widget=widgets.Textarea(),
help_text="If your publishing company has no parent companies then enter 'none'"),
max_count=10,
button='Add company')
)
```
Include required css and js files into your template:
```
{% load static %}
<link href="{% static 'dynamicinputs/dynamicinputs.css' %}" rel="stylesheet"/>
<script type="text/javascript" src="{% static 'dynamicinputs/dynamicinputs.js' %}"></script>
```
Requires Django framework and jQuery javascript library.
## Installation
```
pip install dynamicinputs
```
## Usage
Add "dynamicinputs" to installed apps in django settings file:
```python
INSTALLED_APPS = (
...
'dynamicinputs',
...
)
```
Then it can be used in model:
```python
from dynamicinputs import DynamicInputField
parent_names = DynamicInputField(
fields.CharField(
label="Names and addresses of parent companies",
widget=widgets.Textarea(),
help_text="If your publishing company has no parent companies then enter 'none'"),
max_count=10,
button='Add company')
)
```
Include required css and js files into your template:
```
{% load static %}
<link href="{% static 'dynamicinputs/dynamicinputs.css' %}" rel="stylesheet"/>
<script type="text/javascript" src="{% static 'dynamicinputs/dynamicinputs.js' %}"></script>
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-dynamicinputs-2.2.2.tar.gz
.
File metadata
- Download URL: django-dynamicinputs-2.2.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.11.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf3b324053a5858b0625970ba60adb4b9243c16da2b3c8f86292311b719354a |
|
MD5 | c906e3d95f4b334db0483f1da3baf155 |
|
BLAKE2b-256 | aea89910ccd5ec3972c1212d7a7463aabe96341430fc59974e2647dadea28bc0 |