-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Define `use_scope` return type as a `dict` to prevent clashes between `django`, `django-stubs`, and `django-idom` - Bump django-idom version - Prevent `db_cleanup` from causing startup failure on any `DatabaseError`, rather than just `OperationalError(DatabaseError)` - `IDOM_DATABASE` setting - `IDOM_CACHE` setting (instead of implicitly relying on `CACHE["idom"] to exist - Rename `ComponentParams` to `ComponentSession` (we're likely to reuse it for other stuff in the future) - Bump IDOM to latest pre-release - Use new `VdomAttributes` and `key` syntax in `idom.html.*`.
- Loading branch information
1 parent
25b2c12
commit 0e37352
Showing
19 changed files
with
202 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
channels >=4.0.0 | ||
idom >=1.0.0a3, <1.1.0 | ||
idom >=1.0.0a5, <1.1.0 | ||
aiofile >=3.0 | ||
dill >=0.3.5 | ||
typing_extensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/django_idom/migrations/0003_componentsession_delete_componentparams.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Generated by Django 4.1.6 on 2023-02-21 10:59 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("django_idom", "0002_rename_created_at_componentparams_last_accessed"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="ComponentSession", | ||
fields=[ | ||
( | ||
"uuid", | ||
models.UUIDField( | ||
editable=False, primary_key=True, serialize=False, unique=True | ||
), | ||
), | ||
("params", models.BinaryField()), | ||
("last_accessed", models.DateTimeField(auto_now_add=True)), | ||
], | ||
), | ||
migrations.DeleteModel( | ||
name="ComponentParams", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
from django.db import models | ||
|
||
|
||
class ComponentParams(models.Model): | ||
class ComponentSession(models.Model): | ||
"""A model for storing component parameters. | ||
All queries must be routed through `django_idom.config.IDOM_DATABASE`. | ||
""" | ||
|
||
uuid = models.UUIDField(primary_key=True, editable=False, unique=True) # type: ignore | ||
data = models.BinaryField(editable=False) # type: ignore | ||
params = models.BinaryField(editable=False) # type: ignore | ||
last_accessed = models.DateTimeField(auto_now_add=True) # type: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.