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
Copy file name to clipboardExpand all lines: docs/src/features/templatetag.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
@@ -107,7 +107,7 @@
107
107
108
108
??? question "What is a "template tag"?"
109
109
110
-
You can think of template tags as Django's way of allowing you to run Python code within your HTML. DjangoIDOM uses a `#!jinja {% component ... %}` template tag to perform it's magic.
110
+
You can think of template tags as Django's way of allowing you to run Python code within your HTML. Django-IDOM uses a `#!jinja {% component ... %}` template tag to perform it's magic.
111
111
112
112
Keep in mind, in order to use the `#!jinja {% component ... %}` tag, you will need to first call `#!jinja {% load idom %}` to gain access to it.
Copy file name to clipboardExpand all lines: docs/src/getting-started/choose-django-app.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,12 @@
4
4
5
5
---
6
6
7
-
If you have reached this point, you should have already [installed Django-IDOM](../installation/index.md) through the previous steps.
7
+
If you have reached this point, you should have already [installed Django-IDOM](../getting-started/installation.md) through the previous steps.
8
+
9
+
You will now need to pick at least one **Django app** to start using Django-IDOM on.
8
10
9
11
For the examples within this section, we will assume you have placed the files [generated by `startapp`](https://docs.djangoproject.com/en/dev/intro/tutorial01/#creating-the-polls-app) directly into your **Django project** folder. This is common for small projects.
10
12
11
13
??? question "How do I organize my Django project for IDOM?"
12
14
13
15
Django-IDOM has no project structure requirements. Organize everything as you wish, just like any **Django project**.
14
-
15
-
??? question "I have never used Django, what do I need to learn?"
Copy file name to clipboardExpand all lines: docs/src/getting-started/create-component.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
@@ -14,6 +14,6 @@
14
14
15
15
You have full freedom in naming/placement of your files and functions.
16
16
17
-
You should determine the best way to sort your Python modules and component functions to fit your needs.
17
+
We recommend creating a `components.py` for small **Django apps**. If your app has a lot of components, you should consider breaking them apart into individual modules such as `components/navbar.py`.
18
18
19
19
Ultimately, components are referenced by Python dotted path in `my-template.html` (_see next step_). So, at minimum this path needs to be valid to Python's `importlib`.
Copy file name to clipboardExpand all lines: docs/src/getting-started/installation.md
+11-15Lines changed: 11 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
-
???+ tip "Learning Django first is recommended!"
1
+
???+ summary
2
2
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-->
3
+
Django-IDOM can be installed from PyPI to an existing **Django project** with minimal configuration.
4
4
5
-
## Install from PyPI
5
+
## Step 0: Set up a Django Project
6
+
7
+
These docs assumes you have already created [a **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_.
8
+
9
+
## Step 1: Install from PyPI
6
10
7
11
```bash
8
12
pip install django-idom
9
13
```
10
14
11
-
You will also need to modify a few files in your **Django project**...
In your settings you will need to add `django_idom` to [`INSTALLED_APPS`](https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-INSTALLED_APPS).
18
18
@@ -47,11 +47,9 @@ In your settings you will need to add `django_idom` to [`INSTALLED_APPS`](https:
47
47
48
48
Below are a handful of values you can change within `settings.py` to modify the behavior of IDOM.
0 commit comments