Skip to content

Commit 9069952

Browse files
authored
View to Component (#81)
1 parent da0c2cb commit 9069952

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1077
-292
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ Using the following categories, list your changes in this order:
2424

2525
### Added
2626

27-
- `auth_required` decorator to prevent your components from rendered to unauthenticated users.
27+
- `auth_required` decorator to prevent your components from rendering to unauthenticated users.
2828
- `use_query` hook for fetching database values.
2929
- `use_mutation` hook for modifying database values.
30+
- `view_to_component` utility to convert legacy Django views to IDOM components.
31+
32+
### Changed
33+
34+
- Bumped the minimum IDOM version to 0.40.2
3035

3136
### Fixed
3237

docs/changelog/index.md

-11
This file was deleted.

docs/contribute/running-tests.md

-11
This file was deleted.

docs/features/components.md

-121
This file was deleted.

docs/getting-started/learn-more.md

-11
This file was deleted.

docs/includes/examples.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--hello-world-view-start-->
2+
3+
```python
4+
from django.http import HttpResponse
5+
6+
def hello_world_view(request, *args, **kwargs):
7+
return HttpResponse("Hello World!")
8+
```
9+
10+
<!--hello-world-view-end-->
11+
12+
<!--hello-world-cbv-start-->
13+
14+
```python
15+
from django.http import HttpResponse
16+
from django.views import View
17+
18+
class HelloWorldView(View):
19+
def get(self, request, *args, **kwargs):
20+
return HttpResponse("Hello World!")
21+
```
22+
23+
<!--hello-world-cbv-end-->

docs/index.md

-17
This file was deleted.

docs/src/changelog/index.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
hide:
3+
- navigation
4+
- toc
5+
---
6+
7+
!!! note "Attribution"
8+
9+
{% include-markdown "../../../CHANGELOG.md" start="<!--attr-start-->" end="<!--attr-end-->" %}
10+
11+
{% include-markdown "../../../CHANGELOG.md" start="<!--changelog-start-->" %}
File renamed without changes.
File renamed without changes.

docs/src/contribute/running-tests.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
This repo uses [Nox](https://nox.thea.codes/en/stable/) to run scripts which can be found in `noxfile.py`. For a full test of available scripts run `nox -l`. To run the full test suite simple execute:
2+
3+
```
4+
nox -s test
5+
```
6+
7+
If you do not want to run the tests in the background:
8+
9+
```
10+
nox -s test -- --headed
11+
```
12+
13+
!!! warning "Most tests will not run on Windows"
14+
15+
Due to [bugs within Django Channels](https://github.com/django/channels/issues/1207), functional tests are not run on Windows. In order for Windows users to test Django-IDOM functionality, you will need to run tests via [Windows Subsystem for Linux](https://code.visualstudio.com/docs/remote/wsl).

0 commit comments

Comments
 (0)