summaryrefslogtreecommitdiffstats
path: root/takahe
diff options
context:
space:
mode:
authorMichael Manfre2022-11-27 13:09:46 -0500
committerGitHub2022-11-27 11:09:46 -0700
commit6c7ddedd342553b53dd98c8de9cbe9e8e2e8cd7c (patch)
treee34059bca5e13a8a614687face1153d63e7f5654 /takahe
parent263af996d8ed05e37ef5a62c6ed240216a6eb67b (diff)
downloadtakahe-6c7ddedd342553b53dd98c8de9cbe9e8e2e8cd7c.tar.gz
takahe-6c7ddedd342553b53dd98c8de9cbe9e8e2e8cd7c.tar.bz2
takahe-6c7ddedd342553b53dd98c8de9cbe9e8e2e8cd7c.zip
Post editing
Diffstat (limited to 'takahe')
-rw-r--r--takahe/settings.py5
-rw-r--r--takahe/urls.py1
2 files changed, 6 insertions, 0 deletions
diff --git a/takahe/settings.py b/takahe/settings.py
index cec4f2d..0c6c2c5 100644
--- a/takahe/settings.py
+++ b/takahe/settings.py
@@ -30,6 +30,11 @@ TAKAHE_ENV_FILE = os.environ.get(
)
+TAKAHE_ENV_FILE = os.environ.get(
+ "TAKAHE_ENV_FILE", "test.env" if "pytest" in sys.modules else ".env"
+)
+
+
class Settings(BaseSettings):
"""
Pydantic-powered settings, to provide consistent error messages, strong
diff --git a/takahe/urls.py b/takahe/urls.py
index 98e1050..6f5ac79 100644
--- a/takahe/urls.py
+++ b/takahe/urls.py
@@ -106,6 +106,7 @@ urlpatterns = [
path("@<handle>/posts/<int:post_id>/boost/", posts.Boost.as_view()),
path("@<handle>/posts/<int:post_id>/unboost/", posts.Boost.as_view(undo=True)),
path("@<handle>/posts/<int:post_id>/delete/", posts.Delete.as_view()),
+ path("@<handle>/posts/<int:post_id>/edit/", posts.Compose.as_view()),
# Authentication
path("auth/login/", auth.Login.as_view(), name="login"),
path("auth/logout/", auth.Logout.as_view(), name="logout"),