-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial development #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I think this looks great, really amazing work here. I've added a few specific comments (many of which feel free to ignore!), but I have two larger questions as well:
- 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?
- 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?
wagtail_airtable/management/commands/reset_local_airtable_records.py
Outdated
Show resolved
Hide resolved
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 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". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I've left a couple of tiny comments, but am approving since I think they're very small improvements. Thanks for all the work on this, it's looking like an awesome app!
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