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 the projects,plz send
>> me a email.
>>
>> --
>> 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%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/CAG_zNb--MuYzCdxh4PmzbCmXiKCMxefeM%3D4zUx5mRU7zkvE99A%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/CAL8QkRURyTe1xdWs2LLNkNToUF6tM62b4mwdk5TosRWFeaXcMA%40mail.gmail.com.


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 send
>> me a email.
>>
>> --
>> 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%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/CAMcj6WfU0_0g4qdV8LqqOVo7Lrad7HipL7QDG%3Dxc4ZTx7OHHWQ%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/CAFWCH_rtLhqDvrJf0UCeB2PfLj-cZRzy4xtNgZkVFo-k8XJ1Bg%40mail.gmail.com.


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 
create the model and then comparing it to the original SQL create queries 
in my DB. I saw that there was a python3 manage.py sql  to do 
exactly that, but it seems to be depreciated. 

Thanks and regards
Saahitya


PS: Using migrations is not possible as other services are using the DB.

-- 
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/d9560bc8-aef5-4e1b-b31f-c63c72e3d268n%40googlegroups.com.


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 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 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', 'version',)
>>
>> On the admin website everything works perfectly and I am not allowed to 
>> create a robot without a name. However, on the shell:
>>
>> Robot.objects.create(version="test_version")
>>
>> doesn't raise any Exception.
>>
>> What could it be?
>>
>> -- 
>> 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/4ff1570e-70a2-495c-82e3-f20d760992d2n%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/22808c7d-62d8-42e0-aca6-3a631d7af61bn%40googlegroups.com.


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 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%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/CAMcj6WfU0_0g4qdV8LqqOVo7Lrad7HipL7QDG%3Dxc4ZTx7OHHWQ%40mail.gmail.com.


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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d627a047-ea85-4287-827d-de65671c5dd9o%40googlegroups.com.


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.



On Fri, Aug 7, 2020, 6:46 PM Michael Klassen  wrote:

> 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 do this with
> the first form?
>
> Thank you.
>
> --michael
>
> --
> 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/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%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/CAP5HUWpRt6Ler6_kViH%3DEz8KELMQ2Ss-Fbdeuw%2B-1Yjf0D7CPA%40mail.gmail.com.


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 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', 'version',)
>
> On the admin website everything works perfectly and I am not allowed to
> create a robot without a name. However, on the shell:
>
> Robot.objects.create(version="test_version")
>
> doesn't raise any Exception.
>
> What could it be?
>
> --
> 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/4ff1570e-70a2-495c-82e3-f20d760992d2n%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/CAGR%2BspfiXjjPePW2JHh2_QEdGKjOHiSsZLAYZjxfTYr_Ea6tFw%40mail.gmail.com.


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', 'version',)

On the admin website everything works perfectly and I am not allowed to 
create a robot without a name. However, on the shell:

Robot.objects.create(version="test_version")

doesn't raise any Exception.

What could it be?

-- 
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/4ff1570e-70a2-495c-82e3-f20d760992d2n%40googlegroups.com.


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 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%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/CABDh9wjZzm7zhw97YkWC9FVXozkWQ8x4vizAgPimZUwu23nqiQ%40mail.gmail.com.


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 do this with 
the first form?

Thank you.

--michael

-- 
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/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%40googlegroups.com.


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(default=0, editable=False)
apk_file = ContentTypeRestrictedFileField(upload_to=get_upload_path,

content_types=['application/vnd.android.package-archive', ],
max_upload_size=214958080,
max_length=500)

I can create apps with None fields:
Phone_App.objects.create(phone=self.r1_v1, app_name=self.app1)

Also, with:
class Phone(models.Model):
phone_name = models.CharField(max_length=200, null=False, blank=False)
version = models.CharField(max_length=20, blank=True, null=True)

class Meta:
unique_together = ('phone_name', 'version',)

I can create objects using:

Robot.objects.create(version="Version test")

What's wrong? Thx!

-- 
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/4aba95b6-ce53-4462-b3f5-1f652930b4c6n%40googlegroups.com.


Re: Creating table that will hold a randomly generated number of 5 or 6 digits

2020-08-07 Thread Ogunsanya Opeyemi
Hi,
I suggest you use the randrange function in python

On Thursday, August 6, 2020, Issa Kehinde  wrote:

> Hello developer,
>
> Pls, i want to have a table that will hold a randomly generated number.
> This number will be send to user via sms for authentication into the app.
> Once a user enter the digits, it will be compared to what is in the
> database. if it match, the user will be logged in to the app.
> How can I achieve this? Kindly  assist. Thanks!
>
> Also can the uuid be used to generate a 6 digit random ?
>
> --
> 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/6ff6198c-3711-434b-b40e-4ec050f082c5o%
> 40googlegroups.com
> 
> .
>


-- 
OGUNSANYA OPEYEMI

-- 
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/CABJxPrFdZOSJsR50vB4iKSYGNVHcgx3ypcy8rPxcW7j-Uo4mwg%40mail.gmail.com.