You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor docs styling, formatting, and grammar improvements (#76)
* Minor readme cleanup
* Minor grammar cleanup
* Remove "next section" from footer
* Remove "Made with mkdocs" from footer
* Refresh on changes made to readme and changelog
* Add copyright to footer
* Automatically change color scheme based on system theme
* Pin navbar color to black
* Put "Django developer" assumption into a tip box
* clean up Enable Django ASGI warning
* bold "Django Project"
* "Learning Django first is recommended!"
* change tagline to "ReactJS for Django Developers"
* add "Looking for more hooks?"
* add more details to HelloWorld readme paragraph
* update notice on Use Location hook
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,16 @@
5
5
<!--header-end-->
6
6
<!--intro-start-->
7
7
8
-
Django-IDOM connects your project to a ReactJS frontend, allowing you to create **interactive websites without needing JavaScript!**
8
+
Django-IDOM connects your Python project to a ReactJS frontend, allowing you to create **interactive websites without needing JavaScript!**
9
9
10
10
Following ReactJS styling, web elements are combined into [reusable "components"](https://idom-docs.herokuapp.com/docs/guides/creating-interfaces/your-first-components/index.html#parametrizing-components). These components can utilize [hooks](https://idom-docs.herokuapp.com/docs/reference/hooks-api.html) and [events](https://idom-docs.herokuapp.com/docs/guides/adding-interactivity/responding-to-events/index.html#async-event-handlers) to create infinitely complex web pages.
11
11
12
12
When needed, IDOM can [use components directly from NPM](https://idom-docs.herokuapp.com/docs/guides/escape-hatches/javascript-components.html#dynamically-loaded-components). For additional flexibility, components can also be [fully developed in JavaScript](https://idom-docs.herokuapp.com/docs/guides/escape-hatches/javascript-components.html#custom-javascript-components).
13
13
14
14
Any Python web framework with Websockets can support IDOM. See below for what frameworks are supported out of the box.
@@ -27,7 +27,7 @@ Any Python web framework with Websockets can support IDOM. See below for what fr
27
27
28
28
<!--py-header-start-->
29
29
30
-
You'll need a file to define your [IDOM](https://github.com/idom-team/idom) components. We recommend creating a `components.py` file within your chosen **Django app** to start out.
30
+
You'll need a file to define your [IDOM](https://github.com/idom-team/idom) components. We recommend creating a `components.py` file within your chosen **Django app** to start out. Within this file, we will create a simple `HelloWorld` component.
31
31
32
32
<!--py-header-end-->
33
33
<!--py-code-start-->
@@ -76,4 +76,5 @@ Follow the links below to find out more about this project.
76
76
-[Try it Now](https://mybinder.org/v2/gh/idom-team/idom-jupyter/main?urlpath=lab/tree/notebooks/introduction.ipynb) - Check out IDOM in a Jupyter Notebook.
77
77
-[Documentation](https://idom-team.github.io/django-idom) - Learn how to install, run, and use IDOM.
78
78
-[Community Forum](https://github.com/idom-team/idom/discussions) - Ask questions, share ideas, and show off projects.
Copy file name to clipboardExpand all lines: docs/contribute/django-idom.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
???+ tip "Looking to contribute features that are not Django specific?"
2
2
3
-
Everything within the `django-idom` repository must be specific to Django integration. Check out the [IDOM Core documentation](https://idom-docs.herokuapp.com/docs/about/contributor-guide.html) to contribute general features, such as: components, hooks, events, etc.
3
+
Everything within the `django-idom` repository must be specific to Django integration. Check out the [IDOM Core documentation](https://idom-docs.herokuapp.com/docs/about/contributor-guide.html) to contribute general features such as: components, hooks, events, and more.
4
4
5
5
If you plan to make code changes to this repository, you'll need to install the following dependencies first:
Copy file name to clipboardExpand all lines: docs/features/hooks.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Django Hooks
2
2
3
+
???+ tip "Looking for more hooks?"
4
+
5
+
Check out the [IDOM Core docs](https://idom-docs.herokuapp.com/docs/reference/hooks-api.html?highlight=hooks) on hooks!
6
+
3
7
## Use Websocket
4
8
5
9
You can fetch the Django Channels websocket at any time by using `use_websocket`.
@@ -36,7 +40,7 @@ def MyComponent():
36
40
37
41
??? info "This hook's behavior will be changed in a future update"
38
42
39
-
This hook will eventually be updated to return the client's current webpage URL. This will come in alongside our built-in [Single Page Application (SPA) support](https://github.com/idom-team/idom/issues/569).
43
+
This hook will be updated to return the browser's current URL. This will come in alongside our built-in [Single Page Application (SPA) support](https://github.com/idom-team/idom/issues/569).
40
44
41
45
This is a shortcut that returns the Websocket's `path`.
Copy file name to clipboardExpand all lines: docs/getting-started/render-view.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,8 @@ Now, navigate to `http://127.0.0.1:8000/example/`. If you copy-pasted the compon
32
32
33
33
??? question "Which urls.py do I add my views to?"
34
34
35
-
For simple Django projects, you can easily add all of your views directly into the **Django project**'s `urls.py`. However, as you start increase your project's complexity you might end up with way too much within one file.
35
+
For simple **Django projects**, you can easily add all of your views directly into the **Django project's** `urls.py`. However, as you start increase your project's complexity you might end up with way too much within one file.
36
36
37
37
Once you reach that point, we recommend creating an individual `urls.py` within each of your **Django apps**.
38
38
39
-
Then, within your **Django project**'s `urls.py` you will use Django's [`include` function](https://docs.djangoproject.com/en/dev/ref/urls/) to link it all together.
39
+
Then, within your **Django project's** `urls.py` you will use Django's [`include` function](https://docs.djangoproject.com/en/dev/ref/urls/) to link it all together.
Copy file name to clipboardExpand all lines: docs/installation/index.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,14 @@
1
-
<!--dj-proj-start-->
1
+
???+ tip "Learning Django first is recommended!"
2
2
3
-
These docs assumes you have created [a basic **Django project**](https://docs.djangoproject.com/en/dev/intro/tutorial01/), which also involves generating/installing at least one **Django app**. If not, check out this [9 minute YouTube tutorial](https://www.youtube.com/watch?v=ZsJRXS_vrw0) created by _IDG TECHtalk_.
4
-
5
-
<!--dj-proj-end-->
3
+
<!--dj-proj-start-->These docs assumes you have created [a basic **Django project**](https://docs.djangoproject.com/en/dev/intro/tutorial01/), which involves creating and installing at least one **Django app**. If not, check out this [9 minute YouTube tutorial](https://www.youtube.com/watch?v=ZsJRXS_vrw0) created by _IDG TECHtalk_.<!--dj-proj-end-->
6
4
7
5
## Install from PyPI
8
6
9
7
```bash
10
8
pip install django-idom
11
9
```
12
10
13
-
You'll also need to modify a few files in your Django project...
11
+
You'll also need to modify a few files in your **Django project**...
14
12
15
13
---
16
14
@@ -25,11 +23,14 @@ INSTALLED_APPS = [
25
23
]
26
24
```
27
25
28
-
??? warning "Enabling ASGI on Django (Required)"
26
+
??? warning "Enable Django ASGI (Required)"
29
27
30
28
Django-IDOM requires ASGI in order to use Websockets.
31
29
32
-
If you haven't [enabled ASGI](https://channels.readthedocs.io/en/stable/installation.html) on your Django project yet, you'll need to add `channels` to `INSTALLED_APPS` and set your `ASGI_APPLICATION` variable.
30
+
If you haven't enabled ASGI on your **Django project** yet, you'll need to add `channels` to `INSTALLED_APPS` and set your `ASGI_APPLICATION` variable.
31
+
32
+
Read the [Django Channels Docs](https://channels.readthedocs.io/en/stable/installation.html) for more info.
0 commit comments