Commit 91f8d687 authored by Migs Atienza's avatar Migs Atienza

Added forumpost-edit.html

parent fdbb6f84
No preview for this file type
...@@ -16,5 +16,5 @@ ...@@ -16,5 +16,5 @@
</h3> </h3>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
<a href="/forum/forumposts{{ reply.forum_post.pk }}/edit"><input type="submit" value="Edit Post"></a> <a href="/forum/forumposts/{{ reply.forum_post.pk }}/edit"><input type="submit" value="Edit Post"></a>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% block title %}Edit Post{% endblock %}
{% block content %}
<h1>Edit Post:</h1>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save Changes to Post">
</form>
{% endblock %}
{% block scripts %}
{% endblock %}
\ No newline at end of file
...@@ -7,6 +7,7 @@ urlpatterns = [ ...@@ -7,6 +7,7 @@ urlpatterns = [
path('', index, name='index'), path('', index, name='index'),
path('forumposts/<int:pk>/details', ForumPostDetailView.as_view(), name='forumpost-details'), path('forumposts/<int:pk>/details', ForumPostDetailView.as_view(), name='forumpost-details'),
path('forumposts/add', ForumPostCreateView.as_view(), name='forumpost-add'), path('forumposts/add', ForumPostCreateView.as_view(), name='forumpost-add'),
path('forumposts/<int:pk>/edit', ForumPostUpdateView.as_view(), name='forumpost-edit'),
] ]
app_name = "forum" app_name = "forum"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment