summaryrefslogtreecommitdiffstats
path: root/takahe
diff options
context:
space:
mode:
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"),