jfinn 4 dagar sedan
förälder
incheckning
5b07e81e0a
2 ändrade filer med 4 tillägg och 1 borttagningar
  1. 2
    1
      wsps/templates/post.html
  2. 2
    0
      wsps/views.py

+ 2
- 1
wsps/templates/post.html Visa fil

@@ -1,6 +1,7 @@
1 1
 <!-- templates/post.html -->
2 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 5
   {% csrf_token %}
5 6
   {{ form.as_p }}
6 7
   <button type="submit">Submit New Post</button>

+ 2
- 0
wsps/views.py Visa fil

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

Laddar…
Avbryt
Spara