mirror of
https://github.com/Superredstone/patrickcanal.it.git
synced 2026-09-20 17:51:12 +02:00
fix: move uploads away from static files & fix company logo
This commit is contained in:
+10
-2
@@ -1,7 +1,7 @@
|
||||
from django.conf import settings
|
||||
from django.http.response import HttpResponseBadRequest
|
||||
from django.http.response import FileResponse, HttpResponseBadRequest
|
||||
from django.utils.translation import gettext as _
|
||||
from django.views.generic import ListView, TemplateView
|
||||
from django.views.generic import DetailView, ListView, TemplateView
|
||||
from post_office import mail
|
||||
|
||||
from portfolio import forms, models
|
||||
@@ -41,3 +41,11 @@ class ContactSend(TemplateView):
|
||||
)
|
||||
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
|
||||
class CompanyLogo(DetailView):
|
||||
model = models.Company
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
company = self.get_object()
|
||||
return FileResponse(company.logo)
|
||||
|
||||
Reference in New Issue
Block a user