Closed KalobTaulien closed 4 years ago
- Currently, saving and exporting a page will add an explanatory error message if it fails. However, a bulk import does not (again, unless I'm missing something). Would it be possible to add this?
Yep, Django Messages (Wagtail notifications) have been added for Wagtail Pages. And in Wagtail 2.10 Snippets will have 3 hooks which will automatically be picked up on in this package, but models (snippets) won't have notifications until 2.10. There's no real way around that unless we modify all the places a snippet can be edited in the views/forms/templates.
- I import a model from airtable. In my model's
save()
method, for instance, I override the value of a synchronised field. This model, because this is in the middle of an import, does not push this new value back to airtable. As a result, Wagtail and Airtable are now out of sync. Is this scenario possible?
I just tested this, and as long as super() is called after the values are changed, this continues to work as expected.
def save(self, *args, **kwargs):
self.over_write_this = 'Lorem Ipsum'
return super().save(*args, **kwargs)
☝️ That successfully overwrites the saved value, and updates Airtable with "Lorem Ipsum".
Initial development. Includes tests (but not 100% test coverage as that's a bit extreme).
The docs should have enough information in it to make installation and usage simple for developers.
There are also examples in the examples/ directory.
To install and test locally:
To run the unit tests:
cd wagtail-airtable/tests/ && python runtests.py