Skip to content

Commit 34452e4

Browse files
committed
minor doc improvements
1 parent 9f4412d commit 34452e4

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

README.md

+18-11
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-purple.svg">
1111
</a>
1212

13-
`django-idom` allows you to integrate [IDOM](https://github.com/idom-team/idom), a
14-
package for building highly interactive user interfaces in pure Python inspired by
15-
[ReactJS](https://reactjs.org/), into Django applications.
13+
`django-idom` allows you to integrate [IDOM](https://github.com/idom-team/idom) into
14+
Django applications. IDOM being a package for building responsive user interfaces in
15+
pure Python which is inspired by [ReactJS](https://reactjs.org/). For more information
16+
on IDOM refer to [its documentation](https://idom-docs.herokuapp.com).
1617

1718
**You can try IDOM now in a Jupyter Notebook:**
1819
<a
@@ -25,8 +26,6 @@ package for building highly interactive user interfaces in pure Python inspired
2526
src="https://mybinder.org/badge_logo.svg"/>
2627
</a>
2728

28-
For more information on IDOM refer to [its documentation](https://idom-docs.herokuapp.com).
29-
3029

3130
# Install Django IDOM
3231

@@ -129,8 +128,15 @@ INSTALLED_APPS = [
129128
## `templates/your-template.html`
130129

131130
In your templates, you may inject a view of an IDOM component into your templated HTML
132-
by using the `idom_view` Jinja tag. You can even pass parameters to your component from
133-
the template via keyword arguments:
131+
by using the `idom_view` Jinja tag. This tag which requires the name of a component to
132+
render (of the form `app_name.ComponentName`) and keyword arguments you'd like to pass
133+
it from the template.
134+
135+
```python
136+
idom_view app_name.ComponentName param_1="something" param_2="something-else"
137+
```
138+
139+
In context this will look a bit like the following...
134140

135141
```html
136142
<!-- don't forget your load statements -->
@@ -146,7 +152,8 @@ the template via keyword arguments:
146152
</html>
147153
```
148154

149-
Your view for this template can be defined just like any other
155+
Your view for this template can be defined just
156+
[like any other](https://docs.djangoproject.com/en/3.2/intro/tutorial03/#write-views-that-actually-do-something).
150157

151158
## `urls.py`
152159

@@ -156,7 +163,7 @@ To your list of URLs you'll need to include IDOM's static web modules path using
156163
```python
157164
from django.urls import path
158165
from django_idom import django_idom_web_modules_path
159-
from .views import your_template
166+
from .views import your_template # define this view like any other HTML template
160167

161168

162169
urlpatterns = [
@@ -173,6 +180,6 @@ You may configure additional options in your `settings.py` file
173180
# the base URL for all IDOM-releated resources
174181
IDOM_BASE_URL: str = "_idom/"
175182

176-
# ignore these apps during component collection
177-
IDOM_IGNORED_DJANGO_APPS: set[str] = {"some_app", "some_other_app"}
183+
# ignore these INSTALLED_APPS during component collection
184+
IDOM_IGNORE_INSTALLED_APPS: set[str] = {"some_app", "some_other_app"}
178185
```

0 commit comments

Comments
 (0)