Re: Want to get informations about bets Django hosting plateform

2020-09-21 Thread Wesley Montcho
OK

THANKS

Le lun. 21 sept. 2020 à 12:50, Andréas Kühne  a
écrit :

> I don't have any experience of them - so I really don't know. I have used
> heroku (or I am using it currently).
>
> Regards,
>
> Andréas
>
>
> Den mån 21 sep. 2020 kl 13:01 skrev Wesley Montcho <
> wesleymont...@gmail.com>:
>
>> Thanks you.
>>
>>
>>
>> What do you think about Scalingo ?
>>
>> Le lun. 21 sept. 2020 à 11:29, Andréas Kühne 
>> a écrit :
>>
>>> This isn't an easy question to answer.
>>>
>>> Unfortunately there is no real "goto" shop for django. There are however
>>> several ways to accomplish this. If you want a simple startup solution -
>>> try Heroku. It'll be sufficient for small to medium sized handling and you
>>> don't need to do any setup yourself.
>>> Another "easy" alternative would be to look into google appengine -
>>> however I am not sure if it is possible to setup for python 3 ... I know
>>> this has been a problem previously.
>>> Other than those 2 I think you would need to setup your own virtual
>>> server and handle it that way - which may be the best solution as long as
>>> you know a little about it - and do it following a good guide.
>>>
>>> Regards,
>>>
>>> Andréas
>>>
>>>
>>> Den sön 20 sep. 2020 kl 17:36 skrev wesley...@gmail.com <
>>> wesleymont...@gmail.com>:
>>>
>>>> Hi guys
>>>>
>>>> Please I want some person to help me about choosing hosting plateform
>>>> for my Django project, a plateforme that offers an extensible offer without
>>>> problem for migration through version of thé ptoject.
>>>>
>>>> Hope you will help me 
>>>>
>>>> --
>>>> 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/8c6c458d-00b8-4ed3-b49c-2a119d11c86en%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/8c6c458d-00b8-4ed3-b49c-2a119d11c86en%40googlegroups.com?utm_medium=email_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/CAK4qSCc64_v8GXOJXXu%2B5cQMGp4vFF%2ByWsVX%3DKDtAx8bygZ_fg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAK4qSCc64_v8GXOJXXu%2B5cQMGp4vFF%2ByWsVX%3DKDtAx8bygZ_fg%40mail.gmail.com?utm_medium=email_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/CAGRNXvT2ubUTruYO_672P%2BYuXhETK8ru27qpK_voCWDgP57fuw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAGRNXvT2ubUTruYO_672P%2BYuXhETK8ru27qpK_voCWDgP57fuw%40mail.gmail.com?utm_medium=email_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/CAK4qSCf8axrDLmYK5YthF3MuSfCT4FnC_ONrWPH9XzxnPBDdNQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK4qSCf8axrDLmYK5YthF3MuSfCT4FnC_ONrWPH9XzxnPBDdNQ%40mail.gmail.com?utm_medium=email_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/CAGRNXvS4A3X8XQYRymO2MVzTzzBz2gEhr01cttYna9c9f1%3DVEA%40mail.gmail.com.


Re: Want to get informations about bets Django hosting plateform

2020-09-21 Thread Wesley Montcho
Thanks you.



What do you think about Scalingo ?

Le lun. 21 sept. 2020 à 11:29, Andréas Kühne  a
écrit :

> This isn't an easy question to answer.
>
> Unfortunately there is no real "goto" shop for django. There are however
> several ways to accomplish this. If you want a simple startup solution -
> try Heroku. It'll be sufficient for small to medium sized handling and you
> don't need to do any setup yourself.
> Another "easy" alternative would be to look into google appengine -
> however I am not sure if it is possible to setup for python 3 ... I know
> this has been a problem previously.
> Other than those 2 I think you would need to setup your own virtual server
> and handle it that way - which may be the best solution as long as you know
> a little about it - and do it following a good guide.
>
> Regards,
>
> Andréas
>
>
> Den sön 20 sep. 2020 kl 17:36 skrev wesley...@gmail.com <
> wesleymont...@gmail.com>:
>
>> Hi guys
>>
>> Please I want some person to help me about choosing hosting plateform for
>> my Django project, a plateforme that offers an extensible offer without
>> problem for migration through version of thé ptoject.
>>
>> Hope you will help me 
>>
>> --
>> 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/8c6c458d-00b8-4ed3-b49c-2a119d11c86en%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAK4qSCc64_v8GXOJXXu%2B5cQMGp4vFF%2ByWsVX%3DKDtAx8bygZ_fg%40mail.gmail.com
> 
> .
>

-- 
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/CAGRNXvT2ubUTruYO_672P%2BYuXhETK8ru27qpK_voCWDgP57fuw%40mail.gmail.com.


Re: Django Validation error

2020-01-09 Thread Wesley Montcho
Hello
Thanks for helping me
I want to ask you something else, Should I create serializer.py  or it is
some file I can modify

Le jeu. 9 janv. 2020 à 13:59, Suraj Thapa FC  a
écrit :

> Use try catch and send  whatever response you want to send
>
> On Wed, 8 Jan 2020, 10:36 pm Soumen Khatua, 
> wrote:
>
>>
>> *seriazlizers.py*
>>
>>
>>
>>
>>
>>
>> *email =
>> serializers.EmailField(required=True,validators=[UniqueValidator(queryset=User.objects.all())])
>>   phone_number = serializers.CharField(required =
>> True,validators=[UniqueValidator(queryset=User.objects.all())])password
>> = serializers.CharField(write_only=True,required=True,
>>   help_text='Leave empty if no change needed',
>>   style={'input_type': 'password', 'placeholder':
>> 'Password'}*
>> *) *
>>
>> *models.py*
>>
>>
>>
>>
>>
>>
>>
>>
>> * email = models.EmailField(_('email address'), unique=True)
>> phone_number = models.CharField(max_length=10,unique = True,
>> blank=False,default = uuid.uuid4().hex[:8])
>> first_name = models.CharField(_('first name'), max_length=30)last_name
>> = models.CharField(_('last name'), max_length=30, blank=True)is_active
>> = models.BooleanField(_('active'), default=True)is_staff =
>> models.BooleanField(_('staff status'),default=False)date_joined =
>> models.DateTimeField(_('date joined'), default=timezone.now)*
>>
>>
>>   I already did that but I want to raise validation error that email
>> should be unique and password should be alphanumeric character in json
>> format?
>>
>> On Wed, Jan 8, 2020 at 9:44 PM Suraj Thapa FC 
>> wrote:
>>
>>> For email you can set email field in model as unique=True and the
>>> password should be  stored in hash..
>>>
>>> On Wed, 8 Jan 2020, 9:37 pm Soumen Khatua, 
>>> wrote:
>>>
 Hi Folk,

 What is the process to validate fields in django rest framework?
 like email and phone number should be unique and password should be
 alphanumeric character only.

 Where i need to write the logic inside serializers or views part and
 how i can do that?

 Thank you in advance

 Regards,
 Soumen


 --
 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/CAPUw6Wb7_45-r165wg10M-w%2B6V6zOheCnEC3_chbJ-GEHRGQLA%40mail.gmail.com
 
 .

>>> --
>>> 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/CAPjsHcFKnaczwY-%3DKWqbPWrUuecv6YYWR19qPwSWmZpSYG%2BW0w%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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/CAPUw6WbDFeAtOxksdOijTOidX%3DW8gzCs38fN_nXMSK%3DLFxA1cg%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAPjsHcHcs2ogHe6bHJt44_0saVPsR1fgug0RrQ%3D%3DEQYJRJzwHQ%40mail.gmail.com
> 
> .
>

-- 
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/CAGRNXvQ4mbVee3z6e4KWVfjqYojsBL24cg3Dqx%2BHRSRZsJOaBA%40mail.gmail.com.


Django Makemigration Error Can't Serialize

2020-01-09 Thread Wesley Montcho
Hello everyone, 
I'm a beginner in coding and i choose python,  like my favorite. 


I am interresting myself to python frameworks, and technologies, and I'm 
trying to have knoweldge in web develoment through django; 

But, recently i have some error of migration in my django project that i 
cannot fix; 

When i try to make migrations i have this error:

ValueError: Cannot serialize: 

There are some values Django cannot serialize into migration files.
For more, see 
https://docs.djangoproject.com/en/2.2/topics/migrations/#migration-serializing



please i want some person to help me about this, i have somme challenge and 
this error make me late; 

Thanks

-- 
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/6753e5ad-a617-429e-b092-caad0924cd73%40googlegroups.com.
from django.db import models
from django.db.models.query_utils import DeferredAttribute


# Create your models here.
class Sexe(models.Model):
genre = models.CharField(max_length=10)
abreviation = models.CharField(max_length=1)

def __unicode__(self):
return self.abreviation


class Activite(models.Model):
nom_domaine = models.CharField(max_length=100)
description = models.TextField()

def __unicode__(self):
return self.nom_domaine


class Personne(models.Model):
# Informations basiques concernants l'utilisateur
nom = models.CharField(max_length=30)
prenom = models.CharField(max_length=30)
pseudo = models.CharField(max_length=10, null=True)
date_de_naissance = models.DateField()
sexe = models.OneToOneField(Sexe, on_delete=models.SET(Sexe.abreviation))

# Information supplementaires
telephone = models.CharField(max_length=20)
profession = models.CharField(max_length=30)
domaine_activite = models.ForeignKey(Activite, on_delete=models.SET(str(Activite.nom_domaine)))

# Informations de connection au compte
email = models.EmailField()
mot_de_passe = models.CharField(max_length=255)

# Details par rapport l'activté sur le compte de la personne
amis = models.ManyToManyField('self', null=True)

def __unicode__(self):
return str(self.nom) + " " + str(self.prenom)


class Message(models.Model):
destinateur = models.ForeignKey(Personne, related_name="sender",
on_delete=models.SET(str(Personne.nom)+"..."+str(Personne.prenom)), blank=True,
null=False)
destinataire = models.ForeignKey(Personne,
 on_delete=models.SET(str(Personne.nom)+"..."+str(Personne.prenom)), blank=False,
 null=False)
contenu = models.TextField()
date_envoi = models.DateField(auto_now=True)

def __unicode__(self):
if self.contenu > 20:
return str(self.destinateur) + "; " + str(self.contenu[:19]) + "..."
else:
return str(self.destinateur) + "; " + str(self.contenu)


class Publication(models.Model):
auteur = models.ForeignKey(Personne, on_delete=models.SET(str(Personne.nom)+"..."+str(Personne.prenom)))
contenu = models.TextField(null=False)
image_attache = models.ImageField(null=True)

def __unicode__(self):
if self.contenu > 20:
return str(self.destinateur) + "; " + str(self.contenu[:19]) + "..."
else:
return str(self.destinateur) + "; " + str(self.contenu)


class Profil(models.Model):
user = models.OneToOneField(Personne, on_delete=models.SET(str(Personne.nom)+"..."+str(Personne.prenom)))
photo_de_profil = models.ImageField()

def __unicode__(self):
return str(self.user.nom) + " " + str(self.user.prenom)


class ProfilImage(models.Model):
profil = models.OneToOneField(Profil, on_delete= models.CASCADE)
image = models.ImageField(upload_to='WesBox/images/')
featured = models.BooleanField(default=False)
thumbnail = models.BooleanField(default=False)
active = models.BooleanField(default=True)
updated = models.DateTimeField(auto_now_add=False, auto_now=True)