Skip to content

Commit eda8f67

Browse files
committed
clarify required setup (see #16)
1 parent 1b7774f commit eda8f67

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ urlpatterns = [
7878

7979
> Note: If you are upgrading from 1.0, you will need to update your URLs to add the `datawizard/` prefix as shown above.
8080
81-
Finally, register one or more target models with the wizard. Like the Django admin and `admin.py`, Data Wizard will look for a `wizard.py` file in your app directory:
81+
### Model Registration
82+
83+
In order to use the wizard, you must register one or more target models and/or serializers. Like the Django admin and `admin.py`, Data Wizard will look for a `wizard.py` file in your app directory:
8284

8385
```python
8486
# myapp/wizard.py
@@ -88,7 +90,7 @@ from .models import MyModel
8890
data_wizard.register(MyModel)
8991
```
9092

91-
If needed, you can use a [custom serializer class](#custom-serializers) to configure how the target model is validated and populated.
93+
The wizard will automatically create a serializer class corresponding to the target model. If needed, you can also use a [custom serializer class](#custom-serializers) to configure how the target model is validated and populated.
9294

9395
Once everything is configured, create a data source in the Django admin, select "Import via data wizard" from the admin actions menu, and navigate through the screens described below.
9496

data_wizard/templates/data_wizard/run_serializers.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ <h2>Data Format</h2>
99
</li>
1010
</ul>
1111
{% include "data_wizard/continue.html" %}
12+
{% elif not serializer_choices %}
13+
<ul class="messagelist">
14+
<li class="error">No serializers registered.</li>
15+
</ul>
16+
<p>See <a href="https://github.com/wq/django-data-wizard#model-registration">https://github.com/wq/django-data-wizard#model-registration</a> for more information.
1217
{% else %}
1318
<ul class="messagelist">
1419
<li class="warning">Select a format (serializer) to continue.</li>

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def readme():
4141
]
4242
},
4343
install_requires=[
44+
'djangorestframework',
4445
'wq.io',
4546
'natural-keys',
4647
'html-json-forms',

0 commit comments

Comments
 (0)