Add image upload support

Images can be uploaded, thumbnails are created, they're displayed within
the threads themselves. Just like four chans!

There is not an upload size limit set yet. Gotta get on that next.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-05-04 19:45:36 -07:00
parent 7b99830e65
commit e6c60ff93c
11 changed files with 201 additions and 61 deletions

View File

@@ -1,4 +1,6 @@
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from board.views import *
@@ -8,3 +10,5 @@ urlpatterns = [
path("<slug:url>/page/<int:page>/", BoardView.as_view(), name="board_detail"),
path("<slug:url>/post/<int:id>/", PostView.as_view(), name="post_detail"),
]
# TODO - make this conditional so we can serve images up with whatever server we want
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)