diff --git a/activities/migrations/0001_initial.py b/activities/migrations/0001_initial.py
index 19f3026..82a9085 100644
--- a/activities/migrations/0001_initial.py
+++ b/activities/migrations/0001_initial.py
@@ -83,7 +83,7 @@ class Migration(migrations.Migration):
(
"author",
models.ForeignKey(
- on_delete=django.db.models.deletion.PROTECT,
+ on_delete=django.db.models.deletion.CASCADE,
related_name="posts",
to="users.identity",
),
@@ -257,6 +257,8 @@ class Migration(migrations.Migration):
models.CharField(
choices=[
("post", "Post"),
+ ("post_edited", "Post Edited"),
+ ("post_deleted", "Post Deleted"),
("interaction", "Interaction"),
("undo_interaction", "Undo Interaction"),
],
diff --git a/core/views.py b/core/views.py
index fdc6642..889fa27 100644
--- a/core/views.py
+++ b/core/views.py
@@ -19,7 +19,10 @@ class LoggedOutHomepage(TemplateView):
def get_context_data(self):
return {
- "identities": Identity.objects.filter(local=True).order_by("-created")[:20],
+ "identities": Identity.objects.filter(
+ local=True,
+ discoverable=True,
+ ).order_by("-created")[:20],
}
diff --git a/templates/identity/create.html b/templates/identity/create.html
index fbdd66c..8afd1d9 100644
--- a/templates/identity/create.html
+++ b/templates/identity/create.html
@@ -13,6 +13,7 @@
{% include "forms/_field.html" with field=form.username %}
{% include "forms/_field.html" with field=form.domain %}
{% include "forms/_field.html" with field=form.name %}
+ {% include "forms/_field.html" with field=form.discoverable %}
diff --git a/templates/settings/profile.html b/templates/settings/profile.html
index 12ea206..806a930 100644
--- a/templates/settings/profile.html
+++ b/templates/settings/profile.html
@@ -9,6 +9,7 @@
{% include "forms/_field.html" with field=form.name %}
{% include "forms/_field.html" with field=form.summary %}
+ {% include "forms/_field.html" with field=form.discoverable %}