-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Allow to store layer's expression filters (authenticathed users) (#623
) * Fix 'mode=delete' behaviour. * Add FilterLayerSaved model. * Add mode 'save' and 'delete_saved' in response_filtertoken. * Add FilterLayerSaved to django admin. * Add filtertoken new workflow with mode 'save' 'delete_saved' 'apply' * Testing. * Testing. * Testing. * Testing. * Refactoring and documentation. * Add 'filters' property to 'layers' of /api/config REST API. * Fix * Change unique condition fro FilterLayerSaved. * Add test fo /api/config REST API. * ✨ Client: g3w-client: g3w-suite/g3w-client@43226d3 * ✨ Client: g3w-client: g3w-suite/g3w-client@001b107 * ✨ Client: g3w-client: g3w-suite/g3w-client@84421d7 * ✨ Client: g3w-client: g3w-suite/g3w-client@ffbb2a8 * ✨ Client: g3w-client: g3w-suite/g3w-client@70c6dbb * ✨ Client: g3w-client: g3w-suite/g3w-client@358886c * ✨ Client: g3w-client: g3w-suite/g3w-client@de74189 * ✨ Client: g3w-client: g3w-suite/g3w-client@27e043f * ✨ Client: g3w-client: g3w-suite/g3w-client@9e404cb g3w-client-plugin-editing: g3w-suite/g3w-client-plugin-editing@17685ab * ✨ Client: g3w-client: g3w-suite/g3w-client@526a8ea * ✨ Client: g3w-client: g3w-suite/g3w-client@d3b90db * ✨ Client: g3w-client: g3w-suite/g3w-client@533681d --------- Co-authored-by: wlorenzetti <[email protected]> Co-authored-by: volterra79 <[email protected]>
- Loading branch information
1 parent
d44c2b7
commit 11f7c9f
Showing
15 changed files
with
500 additions
and
28 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 3.2.20 on 2023-10-13 15:07 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
import model_utils.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('qdjango', '0108_alter_layer_slug'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='FilterLayerSaved', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('qgs_expr', models.TextField()), | ||
('layer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='qdjango.layer')), | ||
('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
g3w-admin/qdjango/migrations/0110_sessiontokenfilterlayer_name.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,18 @@ | ||
# Generated by Django 3.2.20 on 2023-10-16 12:47 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('qdjango', '0109_filterlayersaved'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='sessiontokenfilterlayer', | ||
name='name', | ||
field=models.TextField(null=True), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
g3w-admin/qdjango/migrations/0111_alter_sessiontokenfilterlayer_name.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,18 @@ | ||
# Generated by Django 3.2.20 on 2023-10-16 13:06 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('qdjango', '0110_sessiontokenfilterlayer_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sessiontokenfilterlayer', | ||
name='name', | ||
field=models.TextField(null=True, unique=True), | ||
), | ||
] |
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,22 @@ | ||
# Generated by Django 3.2.20 on 2023-10-17 07:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('qdjango', '0111_alter_sessiontokenfilterlayer_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='sessiontokenfilterlayer', | ||
name='name', | ||
), | ||
migrations.AddField( | ||
model_name='filterlayersaved', | ||
name='name', | ||
field=models.TextField(null=True, unique=True), | ||
), | ||
] |
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,24 @@ | ||
# Generated by Django 3.2.20 on 2023-10-19 12:37 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('qdjango', '0112_auto_20231017_0752'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='filterlayersaved', | ||
name='name', | ||
field=models.TextField(null=True), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='filterlayersaved', | ||
unique_together={('user', 'layer', 'name')}, | ||
), | ||
] |
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
Binary file modified
BIN
+0 Bytes
(100%)
g3w-admin/qdjango/tests/data/geodata/qgis_widget_test_data.gpkg
Binary file not shown.
Oops, something went wrong.