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
Close
Hashes for django-dynamicinputs-2.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf3b324053a5858b0625970ba60adb4b9243c16da2b3c8f86292311b719354a |
|
MD5 | c906e3d95f4b334db0483f1da3baf155 |
|
BLAKE2b-256 | aea89910ccd5ec3972c1212d7a7463aabe96341430fc59974e2647dadea28bc0 |