Skip to content

Commit 729f273

Browse files
authored
chore(entities): redirect to project detail page on update and creation (#215)
1 parent b5e7e1e commit 729f273

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Entirety/projects/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def get_success_url(self):
127127
+ " has updated the project "
128128
+ self.object.name
129129
)
130-
return reverse("projects:index")
130+
return reverse("projects:detail", kwargs={"pk": self.object.pk})
131131

132132
def get_form_kwargs(self):
133133
kwargs = super(Update, self).get_form_kwargs()
@@ -155,7 +155,7 @@ def get_success_url(self):
155155
+ " has created the project "
156156
+ self.object.name
157157
)
158-
return reverse("projects:index")
158+
return reverse("projects:detail", kwargs={"pk": self.object.pk})
159159

160160
def get_form_kwargs(self):
161161
kwargs = super(Create, self).get_form_kwargs()

0 commit comments

Comments
 (0)