Hi Ram, plz show error code.
On Sun, Feb 9, 2020, 01:03 Ram <ram.mullap...@gmail.com> wrote: > Hi, > > I just noticed that the migrations table in Postgres is not updated though > we reset all the previous migrations. Do I need to run any step in the > database side whenever integrate new code drop? Unfortunately, we are not > using the GIT method yet to bring over the new code. > > Best regards, > ~Ram > > On Sat, Feb 8, 2020 at 10:22 AM Ram <ram.mullap...@gmail.com> wrote: > >> Hello DC, >> >> Thank you for your email. We have added code for user's registration >> where users use >> >> 1. sign up form and submit the form >> 2. upon submission users get a message about the next steps for >> activating their registration >> >> Issue # 1 The issue here is users are not getting any activation email >> Issue # 2 confirmation message is also incorrect. " *Your Registration >> is successful! Please contact Admin for Emails validation Link* " I >> searched for this message in all files and did not find it. >> >> Here are the code snippets >> >> # signup page >>> # >>> def signup_view(request): >>> if request.method == 'POST': >>> form = CustomerForm(request.POST) >>> if form.is_valid(): >>> cust_item = form.cleaned_data >>> print(cust_item) >>> saveform = rim_customer(email=cust_item['email'], >>> reemail=cust_item['reemail'], >>> password=cust_item['password'], >>> repassword=cust_item['repassword'], >>> firstname=cust_item['firstname'], >>> state=cust_item['state'], >>> Zip=cust_item['Zip'], >>> cust_status='0', >>> mailing=cust_item['mailing'], >>> referred_by=cust_item['referred_by']) >>> saveform.save() >>> >>> # Added the code for sending mail when a customer registered >>> here EmailMessage is used from Django >>> activate = "<a href=" + url + "/Activate/" + str(saveform.id) >>> + "> Click Here</a>" >>> sendMailStaus = EmailMessage('Registration Confirmation', >>> "<html>Thank you for >>> registering with us!. You Activation is pending. Please " + activate + >>> "</html>", >>> settings.EMAIL_HOST_USER, >>> [cust_item['email']]) >>> sendMailStaus.content_subtype="html" >>> sendMailStaus.send() >>> >>> form = CustomerForm() >>> return render(request, 'signup.html',{'form':form, 'success': >>> 'mail succesfully send'}) >>> else: >>> messages.error(request, form) >>> # return render(request,"form.html", {'error':error}) >>> else: >>> form = CustomerForm() >>> return render(request, "signup.html", {'form': form}) >>> >> >> >> # SiginUp_With_Transaction >>> def Popup_signup_view(request): >>> if request.method == 'POST': >>> form = CustomerForm(request.POST) >>> if form.is_valid(): >>> cust_item = form.cleaned_data >>> saveform = rim_customer(email=cust_item['email'], >>> reemail=cust_item['reemail'], >>> password=cust_item['password'], >>> repassword=cust_item['repassword'], >>> >>> firstname=cust_item['firstname'], state=cust_item['state'], >>> Zip=cust_item['Zip'], >>> mailing=cust_item['mailing'], cust_status='0', >>> >>> referred_by=cust_item['referred_by']) >>> saveform.save() >>> email = cust_item['email'] >>> # noinspection PyUnresolvedReferences >>> sentMailStatus = sendEmail(email, request, saveform.id) >>> form = CustomerForm() >>> productid = request.POST['id'] >>> result = transation_Cast(productid, email) >>> >>> if sentMailStatus == True: >>> return HttpResponseRedirect(result) >>> else: >>> return HttpResponseRedirect(result) >>> else: >>> messages.error(request, form) >>> # return render(request,"form.html",{'error':error}) >>> else: >>> form = CustomerForm() >>> return render(request, "signup.html", {'form': form}) >>> >> >> Mail server settings in settings.py >> >> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # added by >>> me >>> EMAIL_HOST = 'smtp.gmail.com' >>> #EMAIL_PORT = 465 >>> EMAIL_USE_TLS = True >>> #EMAIL_USE_SSL = True >>> EMAIL_PORT = 587 >>> EMAIL_HOST_USER = 'ad...@domain.com' >>> EMAIL_HOST_PASSWORD = 'domain@123456' >>> >> >> Best regards, >> ~Ram >> >> >> On Fri, Feb 7, 2020 at 10:28 PM DC <ko0...@gmail.com> wrote: >> >>> Hi ram, >>> >>> What’s is not working ? Like static files? >>> Could you share what error you are facing? >>> >>> Regards, d >>> >>> On Sat, 8 Feb 2020 at 1:25 PM, Ram <ram.mullap...@gmail.com> wrote: >>> >>>> Hi, >>>> >>>> When we have new code drop from development, we copy the files manually >>>> to the hosting server running in Digital Ocean droplet. Then we run these >>>> two commands >>>> >>>> 1. makemigrations >>>> 2. migrate >>>> >>>> in the python virtual environment. >>>> >>>> Both the commands completed find but, we are not able to use the new >>>> integration in our web site. We did not touch the database (postgres) side >>>> hoping that models.py would take care of migration on the database side. >>>> >>>> Please advise what would be missing from my side? >>>> >>>> Thanks, >>>> ~Ram >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to django-users+unsubscr...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/CA%2BOi5F31iuhtCDO63rPyt6nOXMY798fQgqorrY%3DwJxEcL36dNg%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F31iuhtCDO63rPyt6nOXMY798fQgqorrY%3DwJxEcL36dNg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CACnTmkFeLgODmXog%2BJMbs_StRRt24Ux8JsLkx07qOpn_rt-JhA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CACnTmkFeLgODmXog%2BJMbs_StRRt24Ux8JsLkx07qOpn_rt-JhA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CA%2BOi5F3apZBJaCgfsgq4xzjcDomNE%2BPVW-Vstvg1WJfxcw1PQA%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CA%2BOi5F3apZBJaCgfsgq4xzjcDomNE%2BPVW-Vstvg1WJfxcw1PQA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP5HUWqqccbfiAuCYu01uqgkYxpFw3oeD%3DM%3DMQjATRO4Cf1ZPw%40mail.gmail.com.