Merge branch 'master' into diego

This commit is contained in:
Diego Calvo
2021-03-16 15:03:46 +01:00
6 changed files with 1096 additions and 10 deletions

View File

@@ -307,7 +307,7 @@ def purchase_email(request):
email.send()
logging.info(f"Email sent to {company}")
# send confirmation email to user
user_message = render_to_string('purchase_contact_confirmation.html', {
user_message = render_to_string('purchase_contact_confirmation_v2.html', {
'company': company,
'product': product,
'company_message': company_message,
@@ -333,3 +333,13 @@ def purchase_email(request):
# response
return Response()
@api_view(['GET'])
@permission_classes([AllowAny,])
def all_categories(request):
all_categories = []
for instance in CategoryTag.objects.all():
all_categories.append(instance.label)
return Response(data=all_categories)