#6 Verifikacija emaila zavrsena.
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
<div class="col">
|
||||
<h1 class="pt-4 mt-5 mb-4">Thank you.</h1>
|
||||
We will send the document to {{ email }} when it is ready.
|
||||
<a href="{{ document_link }}">View Your Document</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,10 +13,6 @@ def extract_risk_factors(organization):
|
||||
risk_data[field.name] = value
|
||||
return risk_data
|
||||
|
||||
from openai import OpenAI
|
||||
from django.conf import settings
|
||||
from .models import Risk
|
||||
|
||||
def get_top_risk(organization):
|
||||
client = OpenAI(api_key=settings.OPENAI_API_KEY)
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ from .forms import OrganizationForm
|
||||
from .models import Organization,Document,Risk
|
||||
from backend.core.utils import get_top_risk
|
||||
from django.urls import reverse
|
||||
from backend.accounts.utils import send_confirmation_email
|
||||
|
||||
# @login_required
|
||||
# def index(request):
|
||||
# return HttpResponse('<h1>Django</h1><p>Página simples.</p>')
|
||||
@@ -44,6 +46,8 @@ def signup(request):
|
||||
|
||||
document.add_segment('body',f"Identified Risks: \n\n{risk_content}")
|
||||
|
||||
send_confirmation_email(form.data['email'])
|
||||
|
||||
return render(request, 'thankyou.html', {
|
||||
'email': form.data['email'],
|
||||
'document_link': reverse('core:document', args=[str(document.id)])
|
||||
|
||||
Reference in New Issue
Block a user