How to populate fields generated by modelformset_factory with data from database

2020-08-07 Thread Michael Klassen
Hello: I am using modelformset_factory to generate my form based on a model. If the user submits a page, then returns to it later, I would like to populate the fields with what they previously answered. I can only find examples of pre-populated fields with the extra forms; is there a way to d

Model security error in shell

2020-08-07 Thread Juan D.
Hi. This is something that only occurs in the shell environment, not in the web. If I have this model: class Phone_App(models.Model): phone= models.ForeignKey(Phone, on_delete=models.CASCADE) app_name = models.ForeignKey(App, on_delete=models.CASCADE) downloads = models.IntegerField(d

Security issue in django.db.models

2020-08-07 Thread Juan D.
I've created a model with null and blank set to False in robot_name: class Robot(models.Model): robot_name = models.CharField(max_length=200, null=False, blank=False) version = models.CharField(max_length=20, blank=True, null=True) class Meta: unique_together = ('robot_name',

Re: Python-django project

2020-08-07 Thread loic medou
Interested On Tue, 21 Jul 2020, 04:09 learn code, wrote: > Hi everyone, > > I am learning python and django, like to work on the projects to improve > more.If any one interested to join with me to work on the projects,plz send > me a email. > > -- > You received this message because you are subs

Re: Security issue in django.db.models

2020-08-07 Thread neeraj garg
It basically sets a null value i.e. "" for the fields that you don't pass while creating an object in shell. And "" it acceptable value. If you want to restrict "" then add some validations. On Fri, Aug 7, 2020, 5:16 PM Juan D. wrote: > I've created a model with null and blank set to False in ro

Re: How to populate fields generated by modelformset_factory with data from database

2020-08-07 Thread Integr@te System
Hi Michael, You can read queryset combine with model in modelformset_factory() method to get exact user and/or any fields you need as existed instance or base on cookies or sth like that to identify your user, depend on your use case(ex trigger events or choose one option...). Hope it helpful.

Python-django project

2020-08-07 Thread Akshat Zala
Interested in working My whatsapp number: +91 9619073241 -- 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

Re: Python-django project

2020-08-07 Thread hajar Benjat
Interested On Tue, Jul 21, 2020, 4:10 AM learn code wrote: > Hi everyone, > > I am learning python and django, like to work on the projects to improve > more.If any one interested to join with me to work on the projects,plz send > me a email. > > -- > You received this message because you are su

Re: Security issue in django.db.models

2020-08-07 Thread ule...@gmail.com
Null value is not the same as an empty string !!! You have to validate the robot_name see also : https://stackoverflow.com/questions/6940499/how-can-you-create-a-non-empty-charfield-in-django Op vrijdag 7 augustus 2020 om 15:11:48 UTC+2 schreef neera...@gmail.com: > It basically sets a null val

Re: Python-django project

2020-08-07 Thread vishnu thuletiya
Yes i am in On Sun, 26 Jul 2020, 9:30 pm Andi Setyawan, wrote: > Interested > > Pada tanggal 21 Jul 2020 10:10 AM, "learn code" > menulis: > >> Hi everyone, >> >> I am learning python and django, like to work on the projects to improve >> more.If any one interested to join with me to work on th

Re: Python-django project

2020-08-07 Thread Anu Pande
Interested. On Fri, Aug 7, 2020, 21:09 hajar Benjat wrote: > Interested > > On Tue, Jul 21, 2020, 4:10 AM learn code wrote: > >> Hi everyone, >> >> I am learning python and django, like to work on the projects to improve >> more.If any one interested to join with me to work on the projects,plz

Need the create statements for my Django models

2020-08-07 Thread Saahitya E
Hi, I was recently porting a legacy DB to Django by using the inspectdb command and then manually comparing the model to the corresponding table description. I want to confirm that I have not made any mistakes by getting the corresponding SQL create commands that migrate would have used to cre