Browse Source

post

master
jfinn 2 months ago
parent
commit
5b07e81e0a
2 changed files with 4 additions and 1 deletions
  1. 2
    1
      wsps/templates/post.html
  2. 2
    0
      wsps/views.py

+ 2
- 1
wsps/templates/post.html View File

1
 <!-- templates/post.html -->
1
 <!-- templates/post.html -->
2
 <h1>Create Post Page</h1>
2
 <h1>Create Post Page</h1>
3
-<form method="post" enctype="multipart/form-data" action="/jstp_dev5">
3
+<!-- <form method="post" enctype="multipart/form-data" action="/jstp_dev5"> -->
4
+<form method="post" enctype="multipart/form-data" action="/djc_srv_v2/jstp_dev5">
4
   {% csrf_token %}
5
   {% csrf_token %}
5
   {{ form.as_p }}
6
   {{ form.as_p }}
6
   <button type="submit">Submit New Post</button>
7
   <button type="submit">Submit New Post</button>

+ 2
- 0
wsps/views.py View File

11
 from django.views.generic import ListView, CreateView  # new
11
 from django.views.generic import ListView, CreateView  # new
12
 from .models import Post,PostForm
12
 from .models import Post,PostForm
13
 
13
 
14
+from django.core.files.base import ContentFile
15
+
14
 
16
 
15
 import wsps.gmod as gmod
17
 import wsps.gmod as gmod
16
 
18
 

Loading…
Cancel
Save