Skip to content
Snippets Groups Projects
Commit 29de1797 authored by Odin Johan Vatne's avatar Odin Johan Vatne
Browse files

fixed project details links and edit redirect

parent 7acf69bb
Branches
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
{% block title %} Editing {{project.title}} {% endblock %}
{% block content %}
<form action="/project/{{project.id}}/edit/" method="post">
{% csrf_token %} {{ form }}
{% csrf_token %} {{ form.as_p }}
<input type="submit" value="Update Project" />
</form>
{% endblock %}
......@@ -15,7 +15,7 @@
<a href="/project/{{project.id}}/apply/">Apply to this project</a>
{% endif %}
{% if project.professor.id == user.id %}
<p>(i) {{numApplicants}} students have applied so far. <a href="/project/{{project.id}}/edit/">View Applications.</a></p>
<p>(i) {{numApplicants}} students have applied so far. <a href="/project/{{project.id}}/applications/">View Applications.</a></p>
{% else %}
<p>(i) {{numApplicants}} students have applied so far.</p>
{% endif %}
......
......@@ -163,7 +163,7 @@ def edit_project(request, project_id):
project.description = description
project.status = status
project.save()
redirect("index")
return redirect(f'/project/{project_id}/')
else:
form = NewProjectForm(initial={
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment