Email verification

۱۳۴ بازدید
رفتن به اولین پیام خوانده‌نشده

Rushikesh Chavan

خوانده‌نشده،
۴ اسفند ۱۴۰۰، ۱۰:۳۵:۵۹۱۴۰۰/۱۲/۴
به django...@googlegroups.com
I am new to django, i am working on one project which requires a feature of email verification  , how do I do it? Like , I want to send the email to the user who registered on my site and give one link in this mail which will verify the user

Antonis Christofides

خوانده‌نشده،
۴ اسفند ۱۴۰۰، ۱۰:۴۰:۵۴۱۴۰۰/۱۲/۴
به django...@googlegroups.com

You can try django-registration-redux.

Regards,

Antonis


On 23/02/2022 17.10, Rushikesh Chavan wrote:
I am new to django, i am working on one project which requires a feature of email verification  , how do I do it? Like , I want to send the email to the user who registered on my site and give one link in this mail which will verify the user
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKFN6W5HZR_bShSfBrTsb492bpv0dmOamtXMbxQQtfyF7BKw4Q%40mail.gmail.com.

Abubakar Siddique

خوانده‌نشده،
۴ اسفند ۱۴۰۰، ۱۱:۲۲:۳۸۱۴۰۰/۱۲/۴
به django...@googlegroups.com
You can use djoser



On Wed, Feb 23, 2022, 8:35 PM Rushikesh Chavan <rushi...@gmail.com> wrote:
I am new to django, i am working on one project which requires a feature of email verification  , how do I do it? Like , I want to send the email to the user who registered on my site and give one link in this mail which will verify the user

--

Sangeeth Joseph

خوانده‌نشده،
۴ اسفند ۱۴۰۰، ۱۵:۳۲:۲۸۱۴۰۰/۱۲/۴
به django...@googlegroups.com

Sebastian Jung

خوانده‌نشده،
۴ اسفند ۱۴۰۰، ۱۵:۴۸:۰۵۱۴۰۰/۱۲/۴
به django...@googlegroups.com

Am Mi., 23. Feb. 2022 um 16:34 Uhr schrieb Rushikesh Chavan <rushi...@gmail.com>:
I am new to django, i am working on one project which requires a feature of email verification  , how do I do it? Like , I want to send the email to the user who registered on my site and give one link in this mail which will verify the user

--

Rushikesh Chavan

خوانده‌نشده،
۶ اسفند ۱۴۰۰، ۷:۲۴:۱۶۱۴۰۰/۱۲/۶
به django...@googlegroups.com
thank you antonis , abubakar , sangeeth ,sebastian for helping


Sunday Ajayi

خوانده‌نشده،
۲۷ اسفند ۱۴۰۰، ۲۱:۴۲:۲۲۱۴۰۰/۱۲/۲۷
به Django users
Hi Team,

Please, I have an issue.

I deployed a ML function  via django api . when the API is called , it does not execute completely and does not throw any error message. 
But if I run the function via the django shell, it runs completely fine.


I am using Gunicorn  and Nginx to deploy in AWS with 30GB RAM and 15GB GPU .

Please, what could be wrong ?



Kasper Laudrup

خوانده‌نشده،
۲۸ اسفند ۱۴۰۰، ۵:۱۸:۳۳۱۴۰۰/۱۲/۲۸
به django...@googlegroups.com
On 19/03/2022 02.41, Sunday Ajayi wrote:
>
> I deployed a ML function  via django api . when the API is called , it
> does not execute completely and does not throw any error message.
> But if I run the function via the django shell, it runs completely fine.
>
>
> I am using Gunicorn  and Nginx to deploy in AWS with 30GB RAM and 15GB GPU .
>
> Please, what could be wrong ?
>

That's impossible for anyone to tell since no one here has any idea what
your function looks like or even what it's supposed to do.

Try to ask a question that someone can actually answer if you want help.

Kind regards,

Kasper Laudrup
OpenPGP_0xE5D9CAC64AAA55EB.asc
OpenPGP_signature

Sunday Ajayi

خوانده‌نشده،
۱۲ فروردین ۱۴۰۱، ۱۷:۴۳:۰۵۱۴۰۱/۱/۱۲
به Django users
Hi Guys,

Thanks for the support, I finally fixed it and it was an error due to Mutlipooling importing.
--
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...@googlegroups.com.

Sunday Ajayi

خوانده‌نشده،
۱۲ فروردین ۱۴۰۱، ۱۷:۴۴:۲۹۱۴۰۱/۱/۱۲
به Django users
Hi Team,


Please I am having the error below from django - postgresql:

django.db.utils.OperationalError: index row requires 45344 bytes, maximum size is 8191


Please how can I fix it?

Regards,

Antonis Christofides

خوانده‌نشده،
۱۳ فروردین ۱۴۰۱، ۱:۴۹:۵۳۱۴۰۱/۱/۱۳
به django...@googlegroups.com

Hi,

could you show the definition of your model?

Antonis Christofides
+30-6979924665 (mobile)
--
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...@googlegroups.com.

Sunday Ajayi

خوانده‌نشده،
۱۳ فروردین ۱۴۰۱، ۸:۰۱:۵۲۱۴۰۱/۱/۱۳
به Django users
Hi Antonis below is my model definition:



from django.db import models
from authentication.models import User,Business
import cloudinary
from cloudinary.models import CloudinaryField

from django.core.paginator import Paginator,EmptyPage,PageNotAnInteger,InvalidPage
from rest_framework.pagination import PageNumberPagination

from django.contrib.postgres.fields import ArrayField
# Create your models here.

DATA_PER_PAGE =10

class Category(models.Model):
TYPE = (
('custom','custom'),
('non-custom','non-custom')
)
STATE = (
('untrained','Untrained'),
('in-progress','Training in Progress'),
('more-training','More Training Needed'),
('trained','Trained')

)
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=255, blank=True,null=True)
slug = models.CharField(max_length=20,null=True,blank=True)
category_type = models.CharField(max_length=20,choices=TYPE,default='non-custom',null=True,blank=True)
description = models.TextField(blank=True,null=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True)
image = models.ImageField(upload_to='category',null=True,blank=True,default='/media/category/unnamed-5.png')
extracted_data = models.JSONField(blank=True,null=True)
state = models.CharField(max_length=20,choices=STATE,default='untrained',null=True,blank=True)
training_status = models.BooleanField(default=False,null=True,blank=True)
f1_score = models.FloatField(null=True,blank=True)
accuracy = models.FloatField(null=True,blank=True)
progessive_training_file = models.TextField(null=True, blank=True)
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='user_cat')

def __str__(self) -> str:
return self.name
class Batch(models.Model):
id = models.AutoField(primary_key=True)
description = models.TextField(blank=True,null=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
counts = models.BigIntegerField(null=True, blank=True)
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True,blank=True,related_name='user_batch')
def __str__(self) -> str:
return str(self.id)


class Custom_model_extract(models.Model):
id = models.AutoField(primary_key=True)
title = models.CharField(max_length=255, null=True,blank=True)
batch = models.BigIntegerField(null=True,blank=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
image_extract = models.FileField(upload_to='custom_data',blank=True,null=True)
transcribed_data = models.JSONField(null=True,blank=True)
label_data = models.JSONField(null=True,blank=True)
extracted_json = models.JSONField(blank=True,null=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='bus_extracted')
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True,blank=True,related_name='user_extracted')
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self) -> str:
return self.name


class Training_model_data(models.Model):
id = models.AutoField(primary_key=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
# image_extract = models.FileField(upload_to='training_data',blank=True,null=True)
image_extract = models.TextField(blank=True,null=True)
transcribed_data = models.JSONField(null=True,blank=True)
label_data = models.JSONField(null=True,blank=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='training_bus_extracted')
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=True,blank=True,related_name='trainng_user_extracted')
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
def __str__(self) -> str:
return self.name
class PostManager(models.Manager):
def get_paginated_posts(self, user=None):
if user:
posts = super(PostManager, self).filter()
else:
posts = super(PostManager, self).filter()
return Paginator(posts, DATA_PER_PAGE)

class Epassport(models.Model):
id = models.AutoField(primary_key=True)
fullname = models.CharField(max_length=255, null=True,blank=True)
batch = models.BigIntegerField(null=True,blank=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
image_extract = models.FileField(upload_to='e_passport_images',blank=True,null=True)
extracted_json = models.JSONField(blank=True,null=True)
is_extracted = models.BooleanField(null=True,blank=True)
passport_number = models.CharField(max_length=20, null=True,blank=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True)
date_of_birth = models.CharField(max_length=20, null=True,blank=True)
sex = models.CharField(max_length=255, null=True,blank=True)
nationality = models.CharField(max_length=255, null=True,blank=True)
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='user_epassport')

def get_page(self):
return self._default_manager.filter(id=self.id).filter(
business__id=self.business).count() / DATA_PER_PAGE + 1
def __str__(self) -> str:
return self.fullname


class Lassera(models.Model):
id = models.AutoField(primary_key=True)
fullname = models.CharField(max_length=255, null=True,blank=True)
batch = models.BigIntegerField(null=True,blank=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
image_extract = models.FileField(upload_to='lassera_images',blank=True,null=True)
extracted_json = models.JSONField(blank=True,null=True)
is_extracted = models.BooleanField(null=True,blank=True)
id_number = models.CharField(max_length=20, null=True,blank=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True)
date_of_birth = models.CharField(max_length=20, null=True,blank=True)
sex = models.CharField(max_length=255, null=True,blank=True)
lga = models.CharField(max_length=255, null=True,blank=True)
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='user_lassera')

def get_page(self):
return self._default_manager.filter(id=self.id).filter(
business__id=self.business).count() / DATA_PER_PAGE + 1
def __str__(self) -> str:
return self.fullname

class Nin(models.Model):
id = models.AutoField(primary_key=True)
fullname = models.CharField(max_length=255, null=True,blank=True)
batch = models.BigIntegerField(null=True,blank=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
image_extract = models.FileField(upload_to='nin_images',blank=True,null=True)
extracted_json = models.JSONField(blank=True,null=True)
is_extracted = models.BooleanField(null=True,blank=True)
# image_extract = cloudinary.models.CloudinaryField('image', folder='/e-passport-ocr',transformation={'width': '600', 'height': '400'}, null=True, blank=True)
id_number = models.CharField(max_length=20, null=True,blank=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True)
date_of_birth = models.CharField(max_length=20, null=True,blank=True)
sex = models.CharField(max_length=255, null=True,blank=True)
address = models.CharField(max_length=255, null=True,blank=True)
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='user_nin')

def get_page(self):
return self._default_manager.filter(id=self.id).filter(
business__id=self.business).count() / DATA_PER_PAGE + 1
def __str__(self) -> str:
return self.fullname


class Invoice(models.Model):
id = models.AutoField(primary_key=True)
batch = models.BigIntegerField(null=True,blank=True)
category = models.ForeignKey(Category,on_delete=models.DO_NOTHING, null=True,blank=True)
image_extract = models.FileField(upload_to='non_custom_invoices',blank=True,null=True)
extracted_json = models.JSONField(blank=True,null=True)
is_extracted = models.BooleanField(null=True,blank=True)
business = models.ForeignKey(Business, on_delete=models.DO_NOTHING,null=True,blank=True)
date = models.CharField(max_length=20, null=True,blank=True)
expense = models.JSONField(null=True,blank=True)
sub_total = models.CharField(max_length=20, null=True,blank=True)
sales_tax = models.CharField(max_length=255, null=True,blank=True)
total = models.CharField(max_length=255, null=True,blank=True)
created_date = models.DateField(auto_now_add=True)
created_time = models.TimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
created_by = models.ForeignKey(User, on_delete=models.DO_NOTHING,null=True,blank=True,related_name='user_invoice')

def get_page(self):
return self._default_manager.filter(id=self.id).filter(
business__id=self.business).count() / DATA_PER_PAGE + 1
def __str__(self) -> int:
return self.id


This started when I added the a class Meta with unique_together field

# class Meta:
# unique_together = ('business', 'name')

But after I removed it, and did makemigration, then migrated, then I started getting this error

Antonis Christofides

خوانده‌نشده،
۱۳ فروردین ۱۴۰۱، ۹:۴۲:۲۰۱۴۰۱/۱/۱۳
به django-users

Sorry, which model is causing the problem? Which is the model that started giving you errors when you added the Meta?

Antonis Christofides
+30-6979924665 (mobile)

Sunday Ajayi

خوانده‌نشده،
۱۳ فروردین ۱۴۰۱، ۹:۴۹:۴۰۱۴۰۱/۱/۱۳
به Django users
When I tried using a unique together for an integer and a TextField  together, I got that error 
پاسخ به همه
پاسخ به نویسنده
فرستادن
0 پیام جدید