Tweak slides
This commit is contained in:
parent
ad153a1edf
commit
9fb2bfbeb9
2 changed files with 84 additions and 30 deletions
BIN
public/red-button.png
Normal file
BIN
public/red-button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 312 KiB |
114
slides.md
114
slides.md
|
@ -38,34 +38,30 @@ layout: cover
|
|||
# Site history report
|
||||
|
||||
---
|
||||
layout: cover
|
||||
layout: section
|
||||
---
|
||||
|
||||
# Restoring from backups
|
||||
|
||||
---
|
||||
layout: cover
|
||||
layout: section
|
||||
---
|
||||
|
||||
# _Partial_ restores from backups
|
||||
|
||||
---
|
||||
layout: center
|
||||
layout: section
|
||||
---
|
||||
|
||||
# 1. Spin up a database backup
|
||||
## 1.
|
||||
# Spin up a database backup
|
||||
|
||||
---
|
||||
layout: center
|
||||
layout: section
|
||||
---
|
||||
|
||||
<style>
|
||||
pre.shiki {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
# 2. Locate the page models
|
||||
## 2.
|
||||
# Locate the page models
|
||||
|
||||
<div class="pt-5">
|
||||
|
||||
|
@ -79,17 +75,19 @@ child_pages = sysadmin_page.get_descendants()
|
|||
|
||||
</div>
|
||||
|
||||
---
|
||||
layout: center
|
||||
---
|
||||
|
||||
<style>
|
||||
pre.shiki {
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.4rem !important;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
# 3. Locate what was deleted
|
||||
---
|
||||
layout: section
|
||||
---
|
||||
|
||||
## 3.
|
||||
# Locate what was deleted
|
||||
|
||||
<div class="pt-5">
|
||||
|
||||
|
@ -102,16 +100,18 @@ collector.collect(list(child_pages) + [sysadmin_page])
|
|||
|
||||
</div>
|
||||
|
||||
---
|
||||
layout: center
|
||||
---
|
||||
|
||||
<style>
|
||||
pre.shiki {
|
||||
font-size: 1.4rem;
|
||||
font-size: 1.4rem !important;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
---
|
||||
layout: section
|
||||
---
|
||||
|
||||
# 4. Serialize
|
||||
|
||||
<div class="pt-5">
|
||||
|
@ -136,26 +136,80 @@ with open("deleted-models.json", "w") as f:
|
|||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
pre.shiki {
|
||||
font-size: 1rem !important;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
---
|
||||
layout: center
|
||||
layout: section
|
||||
---
|
||||
|
||||
# 4a. Deserialize
|
||||
## 4a.
|
||||
# Deserialize
|
||||
|
||||
---
|
||||
layout: center
|
||||
---
|
||||
|
||||
# 5. Test test test
|
||||
# `restore-deleted-pages.py`
|
||||
|
||||
```python {all}{lines:true}
|
||||
from django.contrib.admin.utils import NestedObjects
|
||||
from django.core import serializers
|
||||
|
||||
from wagtail.models import Page
|
||||
|
||||
class NoM2MSerializer(Serializer):
|
||||
def handle_m2m_field(self, obj, field):
|
||||
pass
|
||||
|
||||
sysadmin_page = Page.objects.get(id=91)
|
||||
|
||||
child_pages = sysadmin_page.get_descendants()
|
||||
|
||||
collector = NestedObjects()
|
||||
collector.collect(list(child_pages) + [sysadmin_page])
|
||||
|
||||
def get_model_instances():
|
||||
for qs in collector.data.values():
|
||||
yield from qs
|
||||
|
||||
with open("deleted-models.json", "w") as f:
|
||||
NoM2MSerializer().serialize(
|
||||
get_model_instances(),
|
||||
stream=f
|
||||
)
|
||||
```
|
||||
|
||||
---
|
||||
layout: center
|
||||
layout: section
|
||||
---
|
||||
|
||||
# 6. Showtime!
|
||||
#### 5.
|
||||
### Test
|
||||
## Test
|
||||
# **Test!**
|
||||
|
||||
---
|
||||
layout: image-right
|
||||
image: /red-button.png
|
||||
class: flex justify-center flex-col items-center
|
||||
---
|
||||
|
||||
### 6.
|
||||
# Showtime!
|
||||
|
||||
---
|
||||
layout: cover
|
||||
background: https://cdn.jsdelivr.net/gh/wagtail/wagtail@main/.github/wagtail-screenshot-with-browser.png
|
||||
---
|
||||
|
||||
# Conclusion
|
||||
|
||||
---
|
||||
layout: end
|
||||
---
|
||||
|
||||
# Conclusion
|
||||
|
|
Loading…
Reference in a new issue