Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to make an invitation link in Django? A link so the user kan register at my page? I want a link created wth a

how to make an invitation link in Django? A link so the user kan register at my page?

I want a link created wth a token

Here is my code so far

from django.shortcuts import render from coombboom.settings import EMAIL_HOST_USER from . import forms from django.core.mail import send_mail def invitation(request): sub = forms.Invitation() if request.method == 'POST': sub = forms.Invitation(request.POST) subject = 'Welcome' message = 'Here is your link to register: http://127.0.0.1:8000/account/register' recepient = str(sub['Email'].value()) send_mail(subject, message, EMAIL_HOST_USER, [recepient], fail_silently = False) return render(request, 'invitation/success.html', {'recepient': recepient}) return render(request, 'invitation/index.html', {'form':sub}) 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

=+associated with political parties and if so, which ones? Are

Answered: 1 week ago