Re: Re:

2023-07-19 Thread Vishesh Mangla
Very true. I am from a tier 1 University and I know how useless the degree
is . Teaches apples and people want oranges, even the CS ones.

On Wed, 19 Jul, 2023, 21:11 David Emanuel Sandoval, <
davidemanuelsando...@gmail.com> wrote:

> Just don't give up.
>
> A degree is always good, it can open more doors.
>
> But not all companies require a degree. You can even work remotely for a
> company.
> I myself got my first dev job with what would be the equivalent of a "high
> school" education.
> I never went to a university.
> But I did work a lot to improve my skills in this field.
> David Emanuel Sandoval
> 
> WEB DEVELOPER
> +549 3734 607102
>
> 
> 
>
>
>
>
>
> El mié, 19 jul 2023 a las 11:06, Vitor Angheben (<
> vitor_anghe...@hotmail.com>) escribió:
>
>> Hi Asim, I'm a fresh graduate in Industrial Engineer, but working with
>> software development
>>
>> Please, check my profile on my LinkedIn, if you find it interesting let
>> me know!!
>>
>> https://www.linkedin.com/in/vitor-a-5977a0b3/
>>
>> Best regards!
>> --
>> *De:* django-users@googlegroups.com  em
>> nome de Ibtsam Khan 
>> *Enviado:* terça-feira, 18 de julho de 2023 13:48
>> *Para:* django-users@googlegroups.com 
>> *Assunto:* Re:
>>
>> Hey I'm a fresh graduate from BS IT. And I'm a MERN Stack developer
>> learning Django for the web. What do u think?
>>
>> On Tue, Jul 18, 2023, 9:08 PM Asim Sulehria 
>> wrote:
>>
>> Do you have it or not ?
>> We are just hiring Django developers as fresh graduates !
>>
>>
>> On Tue, Jul 18, 2023 at 8:50 PM Vishesh Mangla 
>> wrote:
>>
>> Degree is not sufficient. Memorizing 250 DSA questions is also a
>> requirement.
>>
>> On Tue, 18 Jul, 2023, 21:18 Asim Sulehria, 
>> wrote:
>>
>> For getting a Job into industry you need a proper degree !
>> Do you have it or not?
>>
>> On Tue, Jul 18, 2023 at 8:36 PM Vishesh Mangla 
>> wrote:
>>
>> No degree teaches django or even web development.
>>
>> On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
>> wrote:
>>
>> Do you have a bachelor's degree in relevant field like Computer Science?/
>> Software Engineering?/ Data Science?
>>
>> On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
>> wrote:
>>
>> My number is 08102980007
>>
>> On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
>> wrote:
>>
>> Dear community, I am currently looking for a remote internship on Django
>> to gain more experience in this field I currently have skills in django,
>> database testing api development with rest framework using Django channels
>> to integrate websockets and asgi connections I don't mind working for free
>> but would also be glad if I'm payed thank you.
>>
>> --
>> 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/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%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/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%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/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%40mail.gmail.com
>> 

Re: Re:

2023-07-19 Thread David Emanuel Sandoval
Just don't give up.

A degree is always good, it can open more doors.

But not all companies require a degree. You can even work remotely for a
company.
I myself got my first dev job with what would be the equivalent of a "high
school" education.
I never went to a university.
But I did work a lot to improve my skills in this field.
David Emanuel Sandoval 
WEB DEVELOPER
+549 3734 607102








El mié, 19 jul 2023 a las 11:06, Vitor Angheben ()
escribió:

> Hi Asim, I'm a fresh graduate in Industrial Engineer, but working with
> software development
>
> Please, check my profile on my LinkedIn, if you find it interesting let me
> know!!
>
> https://www.linkedin.com/in/vitor-a-5977a0b3/
>
> Best regards!
> --
> *De:* django-users@googlegroups.com  em
> nome de Ibtsam Khan 
> *Enviado:* terça-feira, 18 de julho de 2023 13:48
> *Para:* django-users@googlegroups.com 
> *Assunto:* Re:
>
> Hey I'm a fresh graduate from BS IT. And I'm a MERN Stack developer
> learning Django for the web. What do u think?
>
> On Tue, Jul 18, 2023, 9:08 PM Asim Sulehria 
> wrote:
>
> Do you have it or not ?
> We are just hiring Django developers as fresh graduates !
>
>
> On Tue, Jul 18, 2023 at 8:50 PM Vishesh Mangla 
> wrote:
>
> Degree is not sufficient. Memorizing 250 DSA questions is also a
> requirement.
>
> On Tue, 18 Jul, 2023, 21:18 Asim Sulehria,  wrote:
>
> For getting a Job into industry you need a proper degree !
> Do you have it or not?
>
> On Tue, Jul 18, 2023 at 8:36 PM Vishesh Mangla 
> wrote:
>
> No degree teaches django or even web development.
>
> On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
> wrote:
>
> Do you have a bachelor's degree in relevant field like Computer Science?/
> Software Engineering?/ Data Science?
>
> On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
> wrote:
>
> My number is 08102980007
>
> On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
> wrote:
>
> Dear community, I am currently looking for a remote internship on Django
> to gain more experience in this field I currently have skills in django,
> database testing api development with rest framework using Django channels
> to integrate websockets and asgi connections I don't mind working for free
> but would also be glad if I'm payed thank you.
>
> --
> 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/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%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/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%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/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%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
> 

RE: Re:

2023-07-19 Thread Vitor Angheben
Hi Asim, I'm a fresh graduate in Industrial Engineer, but working with software 
development

Please, check my profile on my LinkedIn, if you find it interesting let me 
know!!

https://www.linkedin.com/in/vitor-a-5977a0b3/

Best regards!

De: django-users@googlegroups.com  em nome de 
Ibtsam Khan 
Enviado: terça-feira, 18 de julho de 2023 13:48
Para: django-users@googlegroups.com 
Assunto: Re:

Hey I'm a fresh graduate from BS IT. And I'm a MERN Stack developer learning 
Django for the web. What do u think?

On Tue, Jul 18, 2023, 9:08 PM Asim Sulehria 
mailto:de.asimha...@gmail.com>> wrote:
Do you have it or not ?
We are just hiring Django developers as fresh graduates !


On Tue, Jul 18, 2023 at 8:50 PM Vishesh Mangla 
mailto:manglavishes...@gmail.com>> wrote:
Degree is not sufficient. Memorizing 250 DSA questions is also a requirement.

On Tue, 18 Jul, 2023, 21:18 Asim Sulehria, 
mailto:de.asimha...@gmail.com>> wrote:
For getting a Job into industry you need a proper degree !
Do you have it or not?

On Tue, Jul 18, 2023 at 8:36 PM Vishesh Mangla 
mailto:manglavishes...@gmail.com>> wrote:
No degree teaches django or even web development.

On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
mailto:de.asimha...@gmail.com>> wrote:
Do you have a bachelor's degree in relevant field like Computer Science?/ 
Software Engineering?/ Data Science?

On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
mailto:utibesolom...@gmail.com>> wrote:
My number is 08102980007

On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
mailto:utibesolom...@gmail.com>> wrote:
Dear community, I am currently looking for a remote internship on Django to 
gain more experience in this field I currently have skills in django, database 
testing api development with rest framework using Django channels to integrate 
websockets and asgi connections I don't mind working for free but would also be 
glad if I'm payed thank you.

--
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/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%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/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%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/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%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/CACaE8x7uc5tqyS4nhVkHKdjS%2BgB%2BkkNp22US6sPBt791dnoaRg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe 

Re: Re:

2022-09-27 Thread MD Seam Uddin
Add ne please +8801854422750

Get Outlook for Android


From: django-users@googlegroups.com  on behalf 
of André Lewis 
Sent: Tuesday, September 27, 2022 8:20:34 AM
To: django-users@googlegroups.com 
Subject: Re:

Hi! could you add me as well,
+18762382482

On Mon, 26 Sept 2022 at 20:45, Adolfo Duque León Fresneda (MisterRevenue) 
mailto:duque...@gmail.com>> wrote:
hello if you can send me the link or add me +529381108109.. greeting from Mexico

El lunes, 26 de septiembre de 2022 a las 7:54:05 UTC-5, 
farid...@gmail.com escribió:
Hello fellow developers, I will be creating a WhatsApp group chat later in the 
day, So I will like my fellow Python Django Developers to join the group. It 
will be much easier to discuss there and I will sacrifice myself out for anyone 
who need my service.

God bless you all
Enjoy your day
Biliaminu

--
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/1e19374b-65cb-4fd0-8533-7cc5751fc1f2n%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/CAJN6x_jJ8w_QBGWOEaXjgO9fChofhZ28fBZ5t9b%2BWyGipSvmsw%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/PS1PR04MB28856B3F884A073B6680FB69A3559%40PS1PR04MB2885.apcprd04.prod.outlook.com.


Re: Re:

2022-09-26 Thread Raphael Polanco
Abdulfarid, please include me: 917-304-3414.

On Mon, Sep 26, 2022 at 12:59 PM Phantom Witch 
wrote:

> Hi, add me too. My number is +923237620106
>
> On Mon, Sep 26, 2022 at 9:34 PM Zziwa Abdurahman <
> zziwaabdurahma...@gmail.com> wrote:
>
>> +25675404234
>>
>>
>> On Mon, Sep 26, 2022, 4:02 PM Bhuvnesh Sharma 
>> wrote:
>>
>>> Send the link here so that others can join too.
>>>
>>> On Mon, Sep 26, 2022, 6:29 PM Makrand  wrote:
>>>
 Any cloud related work ask me

 Get Outlook for Android 
 --
 *From:* django-users@googlegroups.com 
 on behalf of Israr Hussain Rao 
 *Sent:* Monday, September 26, 2022 6:27:11 PM
 *To:* django-users@googlegroups.com 
 *Subject:* Re:

 really appreciated brother,
 Can you please add me +905338372362

 regards




 On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle <
 faridosk...@gmail.com> wrote:

 Hello fellow developers, I will be creating a WhatsApp group chat later
 in the day, So I will like my fellow Python Django Developers to join the
 group. It will be much easier to discuss there and I will sacrifice myself
 out for anyone who need my service.

 God bless you all
 Enjoy your day
 Biliaminu

 --
 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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.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/CA%2BZJHEqs391Ei3dXv7YKnE1rngR73E3NdmSA1KvGUakF4Q8g7w%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/CANkA2%2B%2BCF4xA_fV%3D%2BE187FOXP4zCtqfp3d0jG-Z3JrONOfXywQ%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/CAJz00TmqbwtDwkyaG5tg-Eaj%2BxB6EczEKJ5iu3fFD8%3Ds1r707A%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 

Re: Re:

2022-09-26 Thread Phantom Witch
Hi, add me too. My number is +923237620106

On Mon, Sep 26, 2022 at 9:34 PM Zziwa Abdurahman <
zziwaabdurahma...@gmail.com> wrote:

> +25675404234
>
>
> On Mon, Sep 26, 2022, 4:02 PM Bhuvnesh Sharma 
> wrote:
>
>> Send the link here so that others can join too.
>>
>> On Mon, Sep 26, 2022, 6:29 PM Makrand  wrote:
>>
>>> Any cloud related work ask me
>>>
>>> Get Outlook for Android 
>>> --
>>> *From:* django-users@googlegroups.com 
>>> on behalf of Israr Hussain Rao 
>>> *Sent:* Monday, September 26, 2022 6:27:11 PM
>>> *To:* django-users@googlegroups.com 
>>> *Subject:* Re:
>>>
>>> really appreciated brother,
>>> Can you please add me +905338372362
>>>
>>> regards
>>>
>>>
>>>
>>>
>>> On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle <
>>> faridosk...@gmail.com> wrote:
>>>
>>> Hello fellow developers, I will be creating a WhatsApp group chat later
>>> in the day, So I will like my fellow Python Django Developers to join the
>>> group. It will be much easier to discuss there and I will sacrifice myself
>>> out for anyone who need my service.
>>>
>>> God bless you all
>>> Enjoy your day
>>> Biliaminu
>>>
>>> --
>>> 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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.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/CA%2BZJHEqs391Ei3dXv7YKnE1rngR73E3NdmSA1KvGUakF4Q8g7w%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/CANkA2%2B%2BCF4xA_fV%3D%2BE187FOXP4zCtqfp3d0jG-Z3JrONOfXywQ%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/CAJz00TmqbwtDwkyaG5tg-Eaj%2BxB6EczEKJ5iu3fFD8%3Ds1r707A%40mail.gmail.com.


Re: Re:

2022-09-26 Thread Zziwa Abdurahman
+25675404234


On Mon, Sep 26, 2022, 4:02 PM Bhuvnesh Sharma  wrote:

> Send the link here so that others can join too.
>
> On Mon, Sep 26, 2022, 6:29 PM Makrand  wrote:
>
>> Any cloud related work ask me
>>
>> Get Outlook for Android 
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of Israr Hussain Rao 
>> *Sent:* Monday, September 26, 2022 6:27:11 PM
>> *To:* django-users@googlegroups.com 
>> *Subject:* Re:
>>
>> really appreciated brother,
>> Can you please add me +905338372362
>>
>> regards
>>
>>
>>
>>
>> On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle <
>> faridosk...@gmail.com> wrote:
>>
>> Hello fellow developers, I will be creating a WhatsApp group chat later
>> in the day, So I will like my fellow Python Django Developers to join the
>> group. It will be much easier to discuss there and I will sacrifice myself
>> out for anyone who need my service.
>>
>> God bless you all
>> Enjoy your day
>> Biliaminu
>>
>> --
>> 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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.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/CA%2BZJHEqs391Ei3dXv7YKnE1rngR73E3NdmSA1KvGUakF4Q8g7w%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/CANkA2%2B%2BCF4xA_fV%3D%2BE187FOXP4zCtqfp3d0jG-Z3JrONOfXywQ%40mail.gmail.com.


Re: Re:

2022-09-26 Thread Bongo movies
Add me +2557623317196

On Mon, Sep 26, 2022 at 9:02 AM Bhuvnesh Sharma 
wrote:

> Send the link here so that others can join too.
>
> On Mon, Sep 26, 2022, 6:29 PM Makrand  wrote:
>
>> Any cloud related work ask me
>>
>> Get Outlook for Android 
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of Israr Hussain Rao 
>> *Sent:* Monday, September 26, 2022 6:27:11 PM
>> *To:* django-users@googlegroups.com 
>> *Subject:* Re:
>>
>> really appreciated brother,
>> Can you please add me +905338372362
>>
>> regards
>>
>>
>>
>>
>> On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle <
>> faridosk...@gmail.com> wrote:
>>
>> Hello fellow developers, I will be creating a WhatsApp group chat later
>> in the day, So I will like my fellow Python Django Developers to join the
>> group. It will be much easier to discuss there and I will sacrifice myself
>> out for anyone who need my service.
>>
>> God bless you all
>> Enjoy your day
>> Biliaminu
>>
>> --
>> 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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.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/CA%2BZJHEqs391Ei3dXv7YKnE1rngR73E3NdmSA1KvGUakF4Q8g7w%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/CAJ56zLAvrdOigF8nyUtQv4fpT_xBpQC6pg3JO%3Dc%3D9VeJdroW7Q%40mail.gmail.com.


Re: Re:

2022-09-26 Thread Emmanuel Esin
Add me up.

+2349073661204

On Mon, Sep 26, 2022, 2:02 PM Bhuvnesh Sharma  wrote:

> Send the link here so that others can join too.
>
> On Mon, Sep 26, 2022, 6:29 PM Makrand  wrote:
>
>> Any cloud related work ask me
>>
>> Get Outlook for Android 
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of Israr Hussain Rao 
>> *Sent:* Monday, September 26, 2022 6:27:11 PM
>> *To:* django-users@googlegroups.com 
>> *Subject:* Re:
>>
>> really appreciated brother,
>> Can you please add me +905338372362
>>
>> regards
>>
>>
>>
>>
>> On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle <
>> faridosk...@gmail.com> wrote:
>>
>> Hello fellow developers, I will be creating a WhatsApp group chat later
>> in the day, So I will like my fellow Python Django Developers to join the
>> group. It will be much easier to discuss there and I will sacrifice myself
>> out for anyone who need my service.
>>
>> God bless you all
>> Enjoy your day
>> Biliaminu
>>
>> --
>> 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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.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/CA%2BZJHEqs391Ei3dXv7YKnE1rngR73E3NdmSA1KvGUakF4Q8g7w%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/CACEb5y1ZcnfchW9d2ipWFao0S6DfHjSj2SwHP2mroie11TGg7g%40mail.gmail.com.


Re: Re:

2022-09-26 Thread Bhuvnesh Sharma
Send the link here so that others can join too.

On Mon, Sep 26, 2022, 6:29 PM Makrand  wrote:

> Any cloud related work ask me
>
> Get Outlook for Android 
> --
> *From:* django-users@googlegroups.com  on
> behalf of Israr Hussain Rao 
> *Sent:* Monday, September 26, 2022 6:27:11 PM
> *To:* django-users@googlegroups.com 
> *Subject:* Re:
>
> really appreciated brother,
> Can you please add me +905338372362
>
> regards
>
>
>
>
> On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle 
> wrote:
>
> Hello fellow developers, I will be creating a WhatsApp group chat later in
> the day, So I will like my fellow Python Django Developers to join the
> group. It will be much easier to discuss there and I will sacrifice myself
> out for anyone who need my service.
>
> God bless you all
> Enjoy your day
> Biliaminu
>
> --
> 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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.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/CA%2BZJHEqs391Ei3dXv7YKnE1rngR73E3NdmSA1KvGUakF4Q8g7w%40mail.gmail.com.


Re: Re:

2022-09-26 Thread Makrand
Any cloud related work ask me

Get Outlook for Android

From: django-users@googlegroups.com  on behalf 
of Israr Hussain Rao 
Sent: Monday, September 26, 2022 6:27:11 PM
To: django-users@googlegroups.com 
Subject: Re:

really appreciated brother,
Can you please add me +905338372362

regards





On Mon, Sep 26, 2022 at 3:53 PM Abdulfarid Olakunle 
mailto:faridosk...@gmail.com>> wrote:
Hello fellow developers, I will be creating a WhatsApp group chat later in the 
day, So I will like my fellow Python Django Developers to join the group. It 
will be much easier to discuss there and I will sacrifice myself out for anyone 
who need my service.

God bless you all
Enjoy your day
Biliaminu

--
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%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAP%2B6t03QietcLL13kabk%3DwKOUBdK_tJL%2Bwkywh_U_frrTWSAMQ%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/TY2PR0101MB3344312E90E7FDDD8F717C46A4529%40TY2PR0101MB3344.apcprd01.prod.exchangelabs.com.


Re: Re-write an application from Turbogear to Django.

2021-11-27 Thread Derek
Agreed. You could also consider keeping Dojo and upgrading to the current 
version.

On Thursday, 25 November 2021 at 19:41:52 UTC+2 sutharl...@gmail.com wrote:

> I would have chosen the first option, since we can have some relationships 
> in the database and once all the apis are ready. We can easily pick React 
> part.
>
> On Thu, 25 Nov 2021 at 23:03, Stamatia  wrote:
>
>> Hi,
>>
>> I have a question that might need discussion.
>> I have a legacy application on Turbogears(1.5) and an old version of 
>> Dojo.js on front end and I want to re-write it on Django and Reactjs. 
>>
>> What is the best approach to do it?
>> Is it better: 
>> 1. to start with backend and re-write everything on Django and then to 
>> change the front end
>> 2. to change frontend and backend at the same time (step by step - page 
>> by page) 
>> 3. or to start with front end, apply the changes to current application 
>> and then to change backend?
>>
>> Thanks,
>> Stam
>>
>>
>> -- 
>> 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/84a7c2ee-5352-4231-8595-169b780cf3c9n%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/240a402c-0f81-4595-9d8e-ca876dd11d19n%40googlegroups.com.


Re: Re-write an application from Turbogear to Django.

2021-11-25 Thread Lalit Suthar
I would have chosen the first option, since we can have some relationships
in the database and once all the apis are ready. We can easily pick React
part.

On Thu, 25 Nov 2021 at 23:03, Stamatia  wrote:

> Hi,
>
> I have a question that might need discussion.
> I have a legacy application on Turbogears(1.5) and an old version of
> Dojo.js on front end and I want to re-write it on Django and Reactjs.
>
> What is the best approach to do it?
> Is it better:
> 1. to start with backend and re-write everything on Django and then to
> change the front end
> 2. to change frontend and backend at the same time (step by step - page by
> page)
> 3. or to start with front end, apply the changes to current application
> and then to change backend?
>
> Thanks,
> Stam
>
>
> --
> 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/84a7c2ee-5352-4231-8595-169b780cf3c9n%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/CAGp2JVF5uMWy3x9fjupaaqEaHLK5u6V%3DdByB%3Dzkd3BPN%2BBqj%2BA%40mail.gmail.com.


Re: Re : Need help in django database related

2021-10-14 Thread Richard Dushime
i Think using Django  u will create models then register  them in admin,
 for saving data /registration  u will create a form that will be posting
data  in database  may be u can add in an email scripts if u want to always
be aware of who has registered for an event

On Wed, Oct 13, 2021 at 8:37 PM Avi shah  wrote:

> I want to build an platform where admin can add events and I want end
> users to register for that event , so how do I save the
> data/registration of the user for that particular event , how can i create
> dynamic tables like 1 table for 1 event or is there some other logic behind
> it?
>
> Thanks in advance
>
> --
> 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/CALa7AFPNK_KTJvDERYXmi_RG9_xq58EjiBAH7PsOcL0gCFHDYg%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/CAJCm56JivJajSaa-KihmRA1VYajHmVN5vbTZKp6e%3D_bUx%2BONtQ%40mail.gmail.com.


Re: Re : Need help in django database related

2021-10-14 Thread MR INDIA
Maybe you need to learn db relationships in django models and forms, 
Learn about db :

https://www.webforefront.com/django/setuprelationshipsdjangomodels.html 

And inspect source code of this project:

https://github.com/sajib1066/django-event-management


Hope this helps, 

A fellow django developer
On Wednesday, 13 October 2021 at 23:08:46 UTC+5:30 get...@gmail.com wrote:

> I want to build an platform where admin can add events and I want end 
> users to register for that event , so how do I save the 
> data/registration of the user for that particular event , how can i create 
> dynamic tables like 1 table for 1 event or is there some other logic behind 
> it?
>
> Thanks in advance
>

-- 
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/6622e73e-29bf-4e6c-b418-2518db8b357an%40googlegroups.com.


Re: Re:

2021-10-09 Thread Sebastian Jung
Have you truncate table auth_users?

ola neat  schrieb am Sa., 9. Okt. 2021, 16:00:

> But it working perfectly offline
>
> On Sat, Oct 9, 2021, 14:26 Ahmad Abdulnasir Shuaib <
> ahmadabdulnas...@gmail.com> wrote:
>
>> Check your models, you may have unique_together option enabled.
>>
>> On Sat, Oct 9, 2021, 12:09 PM Sebastian Jung 
>> wrote:
>>
>>> Hello,
>>>
>>> No only friends get social media or WhatsApp.
>>>
>>> I think yoz need a experience developer. Try to get one developer on
>>> upwork. I have no expeeience with serializer...
>>>
>>> Regards
>>>
>>>
>>>
>>> Hubert Kanyamahanga  schrieb am
>>> Sa., 9. Okt. 2021, 09:31:
>>>
 Can you write to me on whatsapp so that I can  provide more help or
 even skype or telegram

 Get Outlook for Android 

 --
 *From:* django-users@googlegroups.com 
 on behalf of Sebastian Jung 
 *Sent:* Saturday, October 9, 2021 7:26:44 AM
 *To:* django-users@googlegroups.com 
 *Subject:* Re:

 I mean same database and not same database system...

 ola neat  schrieb am Sa., 9. Okt. 2021, 09:25:

 Yes postgres

 On Sat, Oct 9, 2021, 08:15 Sebastian Jung 
 wrote:

 On exactly same database?

 ola neat  schrieb am Sa., 9. Okt. 2021, 09:14:

 But it working on localhost without issues

 On Sat, Oct 9, 2021, 08:07 Hubert Kanyamahanga <
 kanyamahanga.hub...@aims-senegal.org> wrote:

 Hi Ola, I see where the issue is, the line
 *self.perform_create(serializer)* on the *def create() *method creates
 as well as the line *serializer.save()* on the method *def post()*. So
 in other words, you are trying to create the same user twice,* please
 comment one of them if you want you can empty your table and start again it
 will work.*

 Again there is no reason to use these two methods as they do the same
 thing. Remove completely either the post or the create.

 You can text me on whatsApp if you need more support: +221777922780

 Best,

 H


 On Sat, 9 Oct 2021 at 06:51, ola neat  wrote:

 this is my function
 [image: image.png]


 On Fri, Oct 8, 2021 at 6:52 PM Sebastian Jung <
 sebastian.ju...@gmail.com> wrote:

 Hello,

 Your app tries to insert a new entry in table auth.users. in this table
 a User exists with id=2 and you get this constraint error. Please truncate
 auth.users table and try it again.

 Regards

 ola neat  schrieb am Fr., 8. Okt. 2021, 18:12:

 Hello guys
 I've got this issue i don't understand, before i deployed my  APIS to
 heroku everything was working perfectly, but now that i deployed I'm
 getting this error, pls can anyone 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/CAHLKn727okM8xWxX2o7ZgSLT6pDFXQf_oS6NC-83K7zkv9NhXw%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/CAKGT9mz-hLnzKVtPSh5WsGhG1CO-afPLJtqwSBz2mHTibgpPZw%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/CAHLKn71yxd2sTLNvXf4srU9t2pfahc29NdOOa5j0zZmPn%3DACgw%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
 

Re: Re:

2021-10-09 Thread ola neat
But it working perfectly offline

On Sat, Oct 9, 2021, 14:26 Ahmad Abdulnasir Shuaib <
ahmadabdulnas...@gmail.com> wrote:

> Check your models, you may have unique_together option enabled.
>
> On Sat, Oct 9, 2021, 12:09 PM Sebastian Jung 
> wrote:
>
>> Hello,
>>
>> No only friends get social media or WhatsApp.
>>
>> I think yoz need a experience developer. Try to get one developer on
>> upwork. I have no expeeience with serializer...
>>
>> Regards
>>
>>
>>
>> Hubert Kanyamahanga  schrieb am
>> Sa., 9. Okt. 2021, 09:31:
>>
>>> Can you write to me on whatsapp so that I can  provide more help or even
>>> skype or telegram
>>>
>>> Get Outlook for Android 
>>>
>>> --
>>> *From:* django-users@googlegroups.com 
>>> on behalf of Sebastian Jung 
>>> *Sent:* Saturday, October 9, 2021 7:26:44 AM
>>> *To:* django-users@googlegroups.com 
>>> *Subject:* Re:
>>>
>>> I mean same database and not same database system...
>>>
>>> ola neat  schrieb am Sa., 9. Okt. 2021, 09:25:
>>>
>>> Yes postgres
>>>
>>> On Sat, Oct 9, 2021, 08:15 Sebastian Jung 
>>> wrote:
>>>
>>> On exactly same database?
>>>
>>> ola neat  schrieb am Sa., 9. Okt. 2021, 09:14:
>>>
>>> But it working on localhost without issues
>>>
>>> On Sat, Oct 9, 2021, 08:07 Hubert Kanyamahanga <
>>> kanyamahanga.hub...@aims-senegal.org> wrote:
>>>
>>> Hi Ola, I see where the issue is, the line
>>> *self.perform_create(serializer)* on the *def create() *method creates
>>> as well as the line *serializer.save()* on the method *def post()*. So
>>> in other words, you are trying to create the same user twice,* please
>>> comment one of them if you want you can empty your table and start again it
>>> will work.*
>>>
>>> Again there is no reason to use these two methods as they do the same
>>> thing. Remove completely either the post or the create.
>>>
>>> You can text me on whatsApp if you need more support: +221777922780
>>>
>>> Best,
>>>
>>> H
>>>
>>>
>>> On Sat, 9 Oct 2021 at 06:51, ola neat  wrote:
>>>
>>> this is my function
>>> [image: image.png]
>>>
>>>
>>> On Fri, Oct 8, 2021 at 6:52 PM Sebastian Jung 
>>> wrote:
>>>
>>> Hello,
>>>
>>> Your app tries to insert a new entry in table auth.users. in this table
>>> a User exists with id=2 and you get this constraint error. Please truncate
>>> auth.users table and try it again.
>>>
>>> Regards
>>>
>>> ola neat  schrieb am Fr., 8. Okt. 2021, 18:12:
>>>
>>> Hello guys
>>> I've got this issue i don't understand, before i deployed my  APIS to
>>> heroku everything was working perfectly, but now that i deployed I'm
>>> getting this error, pls can anyone 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/CAHLKn727okM8xWxX2o7ZgSLT6pDFXQf_oS6NC-83K7zkv9NhXw%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/CAKGT9mz-hLnzKVtPSh5WsGhG1CO-afPLJtqwSBz2mHTibgpPZw%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/CAHLKn71yxd2sTLNvXf4srU9t2pfahc29NdOOa5j0zZmPn%3DACgw%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/CAE4dFh0xyoU%3DH1N%3DvZTeTo3gGbAKNR5Z7qqT4JkwN9reb3kF2w%40mail.gmail.com
>>> 
>>> .
>>>
>>> --
>>> You received this message because you 

Re: Re:

2021-10-09 Thread Ahmad Abdulnasir Shuaib
Check your models, you may have unique_together option enabled.

On Sat, Oct 9, 2021, 12:09 PM Sebastian Jung 
wrote:

> Hello,
>
> No only friends get social media or WhatsApp.
>
> I think yoz need a experience developer. Try to get one developer on
> upwork. I have no expeeience with serializer...
>
> Regards
>
>
>
> Hubert Kanyamahanga  schrieb am
> Sa., 9. Okt. 2021, 09:31:
>
>> Can you write to me on whatsapp so that I can  provide more help or even
>> skype or telegram
>>
>> Get Outlook for Android 
>>
>> --
>> *From:* django-users@googlegroups.com  on
>> behalf of Sebastian Jung 
>> *Sent:* Saturday, October 9, 2021 7:26:44 AM
>> *To:* django-users@googlegroups.com 
>> *Subject:* Re:
>>
>> I mean same database and not same database system...
>>
>> ola neat  schrieb am Sa., 9. Okt. 2021, 09:25:
>>
>> Yes postgres
>>
>> On Sat, Oct 9, 2021, 08:15 Sebastian Jung 
>> wrote:
>>
>> On exactly same database?
>>
>> ola neat  schrieb am Sa., 9. Okt. 2021, 09:14:
>>
>> But it working on localhost without issues
>>
>> On Sat, Oct 9, 2021, 08:07 Hubert Kanyamahanga <
>> kanyamahanga.hub...@aims-senegal.org> wrote:
>>
>> Hi Ola, I see where the issue is, the line
>> *self.perform_create(serializer)* on the *def create() *method creates
>> as well as the line *serializer.save()* on the method *def post()*. So
>> in other words, you are trying to create the same user twice,* please
>> comment one of them if you want you can empty your table and start again it
>> will work.*
>>
>> Again there is no reason to use these two methods as they do the same
>> thing. Remove completely either the post or the create.
>>
>> You can text me on whatsApp if you need more support: +221777922780
>>
>> Best,
>>
>> H
>>
>>
>> On Sat, 9 Oct 2021 at 06:51, ola neat  wrote:
>>
>> this is my function
>> [image: image.png]
>>
>>
>> On Fri, Oct 8, 2021 at 6:52 PM Sebastian Jung 
>> wrote:
>>
>> Hello,
>>
>> Your app tries to insert a new entry in table auth.users. in this table a
>> User exists with id=2 and you get this constraint error. Please truncate
>> auth.users table and try it again.
>>
>> Regards
>>
>> ola neat  schrieb am Fr., 8. Okt. 2021, 18:12:
>>
>> Hello guys
>> I've got this issue i don't understand, before i deployed my  APIS to
>> heroku everything was working perfectly, but now that i deployed I'm
>> getting this error, pls can anyone 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/CAHLKn727okM8xWxX2o7ZgSLT6pDFXQf_oS6NC-83K7zkv9NhXw%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/CAKGT9mz-hLnzKVtPSh5WsGhG1CO-afPLJtqwSBz2mHTibgpPZw%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/CAHLKn71yxd2sTLNvXf4srU9t2pfahc29NdOOa5j0zZmPn%3DACgw%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/CAE4dFh0xyoU%3DH1N%3DvZTeTo3gGbAKNR5Z7qqT4JkwN9reb3kF2w%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
>> 

Re: Re: Path in First App, Part 3

2020-10-23 Thread rbar...@xcaretresearch.com
oh no, trying that ruined everything, now none of them work.  I tried 
again, and now "votes' works but "results" doesn't..  Again, is there 
anyone who knows this code?

On Friday, October 23, 2020 at 2:38:15 PM UTC-7 rbar...@xcaretresearch.com 
wrote:

> Someone suggest that I add "detail" to the urls.py code at path(' question.id>/", view detail, name="detail"
> But that ruins everything.
>
> On Friday, October 23, 2020 at 2:32:19 PM UTC-7 rbar...@xcaretresearch.com 
> wrote:
>
>> My guess is that the index url is supposed to return "detail," but, then, 
>> why even have that "detail" function in the code?  I think I have been 
>> spending too long on this and need to move.  I would appreciate it if 
>> anybody would explain this to me.  Adding "detail" to the functions just to 
>> provide a return message for the. index page seems odd. But if I take it 
>> out, I get an error message in the code and it won't run.  Hmmm.  I wish I 
>> understood this.
>>
>> On Friday, October 23, 2020 at 2:24:55 PM UTC-7 
>> rbar...@xcaretresearch.com wrote:
>>
>>>
>>> Oh my.  I figured it out partially.  I was not entering the url 
>>> correctly in address bar.  So, now, "results" and "votes" works but 
>>> "detail" doesn't.  However, "detail" returns when I just enter the basic 
>>> index url for a given question_id, it just doesn't work for "detail".  Is 
>>> it supposed to be that way.
>>> On Friday, October 23, 2020 at 2:18:11 PM UTC-7 
>>> rbar...@xcaretresearch.com wrote:
>>>
 Now I am in the situation where "votes" works but "detail" and 
 "results" does not work.  So weird.. Well, I just checked "votes" to make 
 sure it works and it doesn't.  "index works and takes me to "detail" 
 which, 
 according to the tutorial, is what it supposed to do.  Does anybody know 
 this code?

 On Wednesday, October 21, 2020 at 1:04:26 PM UTC-7 Kasper Laudrup wrote:

> Actually, I tried "votes" one more time and it did work. 
>
> On 10/21/20 12:02 PM, Kasper Laudrup wrote: 
> > Hi rbar, 
> > 
> > On 21/10/2020 20.34, rbar...@xcaretresearch.com wrote: 
> >> The error message shows that there is a match.  What am I doing 
> wrong? 
> > 
> > No, the error message shows you that there *isn't* a match: 
> > 
> >> 
> >> The current path, polls/3/detail, didn't match any of these. 
> >> 
> > 
> > Maybe change: 
> > 
> > path('/', views.detail, name='detail'), 
> > 
> > to: 
> > 
> > path('/detail', views.detail, name='detail'), 
> > 
> > The error message is quite clear and helpful, you probably just 
> didn't 
> > read it correctly. No worries, that can happen to all of us often 
> > enough :-) 
> > 
> > Hope that helps. 
> > 
> > Kind regards, 
> > 
> > Kasper Laudrup 
> > 
>
> -- 
> Cheers, 
>
> /Ralph 3.0/ 
>


-- 
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/80482765-13a1-4cec-b01a-f77b661d621en%40googlegroups.com.


Re: Re: Path in First App, Part 3

2020-10-23 Thread rbar...@xcaretresearch.com
Someone suggest that I add "detail" to the urls.py code at 
path('/", view detail, name="detail"
But that ruins everything.

On Friday, October 23, 2020 at 2:32:19 PM UTC-7 rbar...@xcaretresearch.com 
wrote:

> My guess is that the index url is supposed to return "detail," but, then, 
> why even have that "detail" function in the code?  I think I have been 
> spending too long on this and need to move.  I would appreciate it if 
> anybody would explain this to me.  Adding "detail" to the functions just to 
> provide a return message for the. index page seems odd. But if I take it 
> out, I get an error message in the code and it won't run.  Hmmm.  I wish I 
> understood this.
>
> On Friday, October 23, 2020 at 2:24:55 PM UTC-7 rbar...@xcaretresearch.com 
> wrote:
>
>>
>> Oh my.  I figured it out partially.  I was not entering the url correctly 
>> in address bar.  So, now, "results" and "votes" works but "detail" doesn't. 
>>  However, "detail" returns when I just enter the basic index url for a 
>> given question_id, it just doesn't work for "detail".  Is it supposed to be 
>> that way.
>> On Friday, October 23, 2020 at 2:18:11 PM UTC-7 
>> rbar...@xcaretresearch.com wrote:
>>
>>> Now I am in the situation where "votes" works but "detail" and "results" 
>>> does not work.  So weird.. Well, I just checked "votes" to make sure it 
>>> works and it doesn't.  "index works and takes me to "detail" which, 
>>> according to the tutorial, is what it supposed to do.  Does anybody know 
>>> this code?
>>>
>>> On Wednesday, October 21, 2020 at 1:04:26 PM UTC-7 Kasper Laudrup wrote:
>>>
 Actually, I tried "votes" one more time and it did work. 

 On 10/21/20 12:02 PM, Kasper Laudrup wrote: 
 > Hi rbar, 
 > 
 > On 21/10/2020 20.34, rbar...@xcaretresearch.com wrote: 
 >> The error message shows that there is a match.  What am I doing 
 wrong? 
 > 
 > No, the error message shows you that there *isn't* a match: 
 > 
 >> 
 >> The current path, polls/3/detail, didn't match any of these. 
 >> 
 > 
 > Maybe change: 
 > 
 > path('/', views.detail, name='detail'), 
 > 
 > to: 
 > 
 > path('/detail', views.detail, name='detail'), 
 > 
 > The error message is quite clear and helpful, you probably just 
 didn't 
 > read it correctly. No worries, that can happen to all of us often 
 > enough :-) 
 > 
 > Hope that helps. 
 > 
 > Kind regards, 
 > 
 > Kasper Laudrup 
 > 

 -- 
 Cheers, 

 /Ralph 3.0/ 

>>>

-- 
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/7b3d9cf4-4452-4f23-a644-f3c2327d811fn%40googlegroups.com.


Re: Re: Path in First App, Part 3

2020-10-23 Thread rbar...@xcaretresearch.com
My guess is that the index url is supposed to return "detail," but, then, 
why even have that "detail" function in the code?  I think I have been 
spending too long on this and need to move.  I would appreciate it if 
anybody would explain this to me.  Adding "detail" to the functions just to 
provide a return message for the. index page seems odd. But if I take it 
out, I get an error message in the code and it won't run.  Hmmm.  I wish I 
understood this.

On Friday, October 23, 2020 at 2:24:55 PM UTC-7 rbar...@xcaretresearch.com 
wrote:

>
> Oh my.  I figured it out partially.  I was not entering the url correctly 
> in address bar.  So, now, "results" and "votes" works but "detail" doesn't. 
>  However, "detail" returns when I just enter the basic index url for a 
> given question_id, it just doesn't work for "detail".  Is it supposed to be 
> that way.
> On Friday, October 23, 2020 at 2:18:11 PM UTC-7 rbar...@xcaretresearch.com 
> wrote:
>
>> Now I am in the situation where "votes" works but "detail" and "results" 
>> does not work.  So weird.. Well, I just checked "votes" to make sure it 
>> works and it doesn't.  "index works and takes me to "detail" which, 
>> according to the tutorial, is what it supposed to do.  Does anybody know 
>> this code?
>>
>> On Wednesday, October 21, 2020 at 1:04:26 PM UTC-7 Kasper Laudrup wrote:
>>
>>> Actually, I tried "votes" one more time and it did work. 
>>>
>>> On 10/21/20 12:02 PM, Kasper Laudrup wrote: 
>>> > Hi rbar, 
>>> > 
>>> > On 21/10/2020 20.34, rbar...@xcaretresearch.com wrote: 
>>> >> The error message shows that there is a match.  What am I doing 
>>> wrong? 
>>> > 
>>> > No, the error message shows you that there *isn't* a match: 
>>> > 
>>> >> 
>>> >> The current path, polls/3/detail, didn't match any of these. 
>>> >> 
>>> > 
>>> > Maybe change: 
>>> > 
>>> > path('/', views.detail, name='detail'), 
>>> > 
>>> > to: 
>>> > 
>>> > path('/detail', views.detail, name='detail'), 
>>> > 
>>> > The error message is quite clear and helpful, you probably just didn't 
>>> > read it correctly. No worries, that can happen to all of us often 
>>> > enough :-) 
>>> > 
>>> > Hope that helps. 
>>> > 
>>> > Kind regards, 
>>> > 
>>> > Kasper Laudrup 
>>> > 
>>>
>>> -- 
>>> Cheers, 
>>>
>>> /Ralph 3.0/ 
>>>
>>

-- 
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/62af1cd2-688c-423e-9ac8-c5fbc8710b23n%40googlegroups.com.


Re: Re: Path in First App, Part 3

2020-10-23 Thread rbar...@xcaretresearch.com

Oh my.  I figured it out partially.  I was not entering the url correctly 
in address bar.  So, now, "results" and "votes" works but "detail" doesn't. 
 However, "detail" returns when I just enter the basic index url for a 
given question_id, it just doesn't work for "detail".  Is it supposed to be 
that way.
On Friday, October 23, 2020 at 2:18:11 PM UTC-7 rbar...@xcaretresearch.com 
wrote:

> Now I am in the situation where "votes" works but "detail" and "results" 
> does not work.  So weird.. Well, I just checked "votes" to make sure it 
> works and it doesn't.  "index works and takes me to "detail" which, 
> according to the tutorial, is what it supposed to do.  Does anybody know 
> this code?
>
> On Wednesday, October 21, 2020 at 1:04:26 PM UTC-7 Kasper Laudrup wrote:
>
>> Actually, I tried "votes" one more time and it did work. 
>>
>> On 10/21/20 12:02 PM, Kasper Laudrup wrote: 
>> > Hi rbar, 
>> > 
>> > On 21/10/2020 20.34, rbar...@xcaretresearch.com wrote: 
>> >> The error message shows that there is a match.  What am I doing wrong? 
>> > 
>> > No, the error message shows you that there *isn't* a match: 
>> > 
>> >> 
>> >> The current path, polls/3/detail, didn't match any of these. 
>> >> 
>> > 
>> > Maybe change: 
>> > 
>> > path('/', views.detail, name='detail'), 
>> > 
>> > to: 
>> > 
>> > path('/detail', views.detail, name='detail'), 
>> > 
>> > The error message is quite clear and helpful, you probably just didn't 
>> > read it correctly. No worries, that can happen to all of us often 
>> > enough :-) 
>> > 
>> > Hope that helps. 
>> > 
>> > Kind regards, 
>> > 
>> > Kasper Laudrup 
>> > 
>>
>> -- 
>> Cheers, 
>>
>> /Ralph 3.0/ 
>>
>

-- 
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/ece222e7-2d0d-4cda-9e5e-032bb738f409n%40googlegroups.com.


Re: Re: Path in First App, Part 3

2020-10-23 Thread rbar...@xcaretresearch.com
Now I am in the situation where "votes" works but "detail" and "results" 
does not work.  So weird.. Well, I just checked "votes" to make sure it 
works and it doesn't.  "index works and takes me to "detail" which, 
according to the tutorial, is what it supposed to do.  Does anybody know 
this code?

On Wednesday, October 21, 2020 at 1:04:26 PM UTC-7 Kasper Laudrup wrote:

> Actually, I tried "votes" one more time and it did work.
>
> On 10/21/20 12:02 PM, Kasper Laudrup wrote:
> > Hi rbar,
> >
> > On 21/10/2020 20.34, rbar...@xcaretresearch.com wrote:
> >> The error message shows that there is a match.  What am I doing wrong?
> >
> > No, the error message shows you that there *isn't* a match:
> >
> >>
> >> The current path, polls/3/detail, didn't match any of these.
> >>
> >
> > Maybe change:
> >
> > path('/', views.detail, name='detail'),
> >
> > to:
> >
> > path('/detail', views.detail, name='detail'),
> >
> > The error message is quite clear and helpful, you probably just didn't 
> > read it correctly. No worries, that can happen to all of us often 
> > enough :-)
> >
> > Hope that helps.
> >
> > Kind regards,
> >
> > Kasper Laudrup
> >
>
> -- 
> Cheers,
>
> /Ralph 3.0/
>

-- 
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/953ae50f-fc98-48e4-a123-c0cb77b918a4n%40googlegroups.com.


Re: Re : how to deploy django project on iis windows server

2020-07-03 Thread Gurmeet Kaur
Hi,

It shows your static files and folders are not configured in IIS. You can
find the whole process step by step at -

https://www.mattwoodward.com/2016/07/23/running-a-django-application-on-windows-server-2012-with-iis/


It is very cleanly explained here.

On Fri, Jul 3, 2020 at 5:05 PM Avi shah  wrote:

> I am getting the error message while i have deployed the django project on
> my iis windows server , the error in the console log is this :
>
> And the project is working fine on the servers localhost , only having an
> issue while it is on the url/domain
>
> --
> 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/b3c78e55-927f-47db-9966-1ba9acd0e92fn%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/CAEbKJVhzjiNgApLVt2xL9PUHrtQS2PfaY5_KcVFWbCNoqXjG1w%40mail.gmail.com.


RE: Re: Add search to my blog app

2020-05-20 Thread Vishesh Mangla
Then you have a better option to learn react(a frontend framework for _javascript_). You cannot do dynamic stuff on the web without using _javascript_. Sent from Mail for Windows 10 From: sunday honestySent: 20 May 2020 21:57To: django-users@googlegroups.comSubject: Re: Add search to my blog app I don't know _javascript_ On Wed, May 20, 2020, 5:25 PM Vishesh Mangla  wrote:Hi if you want a search bar you need _javascript_ which will do the dynamic stuff. Add an event listener to you  of html and use “change” as the event. Then you need to insert and remove elements on the DOM based on the text in the search box. For more info ask on  https://webchat.freenode.net/ in the #_javascript_.  Sent from Mail for Windows 10 From: sunday honestySent: 20 May 2020 21:45To: Django usersSubject: Add search to my blog app Hello everyone! I have got a question. I am a Django beginner trying to build my first web app after completing a book. I made an app I called developers forum where authenticated users can post something like question or code achievement and another can comment in form of answer.I want to add a search functionality which was not covered in the tutorial.I browsed out and found how I could add the search but the search results will be displayed to a designated urls created for the purpose. I want to be able to redirect the searcher to the exact post containing the keyword they have typed in the search form with the text highlighted. How can I achieve that... If you need any pieces of my code to be able to help me, be kind to ask me; I'll post a link to where you can find it.Thanks in advance. -- 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/cdbf7038-480e-446f-aeac-e079ad575e47%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/5ec559c3.1c69fb81.ccc5c.9d57%40mx.google.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/CALcuGNv0LBJeQxZB04xyWCDvTgoo5zN82Nf_7bqpomAbQWwAFQ%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/5ec560b5.1c69fb81.18b72.a8fe%40mx.google.com.


RE: Re: NEW TO DJANGO

2020-05-20 Thread Vishesh Mangla
  Sent from Mail for Windows 10 From: Madhav NandanSent: 20 May 2020 22:19To: Django usersSubject: Re: NEW TO DJANGO I need to know what I should do so that once I click a hyperlink, it will redirect me to a payment page and I need to make a working payment option like paypal integration or razorpay integration. I did installed sdk, I made account on razorpay. what next? thanks for response. From: Madhav NandanSent: 19 May 2020 20:34To: django...@googlegroups.comSubject: NEW TO DJANGO Dear Django fellas, I'm new to Django here. I started learning and it's been a while and I'm facing a lot of issues. Can somebody help me with ''how can I integrate a payment system like PayPal to a link?'' Like I have a link, if someone clicks on that link that will redirect the user to the payment page and there on the payment provider works. I just need to get started and somebody can guide me here hopefully. I don't' need code or so. Help me here. Best regards,-- Madhav Nandancell: 9170459494Skype: gaurav.kumar3992 -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGXYL6JYzv%3DvTRNXc1ZqSvJ-6S%3DOSJt%2B%3D_%3DhLqvwyaD0Z_NoDA%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/63a1a453-ee38-4eba-85f7-a4d6f46c367d%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/5ec5605b.1c69fb81.9a1f5.8ba9%40mx.google.com.


RE: Re: NEW TO DJANGO

2020-05-20 Thread Vishesh Mangla
Haven’t you used the redirect() function in Django? Sent from Mail for Windows 10 From: Madhav NandanSent: 20 May 2020 22:19To: Django usersSubject: Re: NEW TO DJANGO I need to know what I should do so that once I click a hyperlink, it will redirect me to a payment page and I need to make a working payment option like paypal integration or razorpay integration. I did installed sdk, I made account on razorpay. what next? thanks for response. From: Madhav NandanSent: 19 May 2020 20:34To: django...@googlegroups.comSubject: NEW TO DJANGO Dear Django fellas, I'm new to Django here. I started learning and it's been a while and I'm facing a lot of issues. Can somebody help me with ''how can I integrate a payment system like PayPal to a link?'' Like I have a link, if someone clicks on that link that will redirect the user to the payment page and there on the payment provider works. I just need to get started and somebody can guide me here hopefully. I don't' need code or so. Help me here. Best regards,-- Madhav Nandancell: 9170459494Skype: gaurav.kumar3992 -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGXYL6JYzv%3DvTRNXc1ZqSvJ-6S%3DOSJt%2B%3D_%3DhLqvwyaD0Z_NoDA%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/63a1a453-ee38-4eba-85f7-a4d6f46c367d%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/5ec55fec.1c69fb81.99dba.9ce0%40mx.google.com.


RE: Re: how to use youtube links in my website

2020-05-20 Thread Vishesh Mangla
 Why just you not use the html5 video tag?Sent from Mail for Windows 10 From: Christian LedermannSent: 20 May 2020 15:16To: django-users@googlegroups.comSubject: Re: how to use youtube links in my website I would retrieve the RSS from YouTube, and process it server side with feedparser and render it in django https://pypi.org/project/feedparser/https://feeder.co/knowledge-base/rss-feed-creation/youtube-rss/  On Sat, 16 May 2020 at 01:35, John McClain  wrote:Can't you just use the script in the body section for this on the html page you want the video in view on. On Fri, 15 May 2020 at 20:17, Bunti  wrote:I want to make website to show the all the videos of my Youtube channel  PLAYLISTS. I mean to say that all of my Youtube videos should be linked to my website.  Can I get any  video tutorial of such type of project with Django?(I have learned Django upto some level. I can do CURD by function and Generic Views, user registration, password update by email etc.)  -- 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/96d8272e-7b5e-4e04-94ad-7b80f9a0ed87%40googlegroups.com. -- John McClainCell: 085-1977-823Skype: jmcclain0129Email: jmcclain0...@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/CAN-hv_qsELgRoZDTwS0HU2i9AWFSgBQLE0XcVRuY7GAADHo25w%40mail.gmail.com. -- Best Regards,Christian LedermannNewark-on-Trent - UKMobile : +44 7474997517https://uk.linkedin.com/in/christianledermannhttps://github.com/cleder/<*)))>{If you save the living environment, the biodiversity that we have left,you will also automatically save the physical environment, too. But Ifyou only save the physical environment, you will ultimately lose both.1) Don’t drive species to extinction2) Don’t destroy a habitat that species rely on.3) Don’t change the climate in ways that will result in the above.}<(((*>-- 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/CABCjzWpFDyDY%2BJoESkV_ND8QGFWE8T1mU%2BX9KEnBuAhC7SBSqQ%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/5ec51059.1c69fb81.24e0b.69ae%40mx.google.com.


RE: Re: required help to save SECRET_KEY and Third party Private API key

2020-05-19 Thread Vishesh Mangla
Why don’t you use the decouple module? Use it and add it to your gitignore.  Sent from Mail for Windows 10 From: Anirudh choudharySent: 19 May 2020 13:14To: django-users@googlegroups.comSubject: Re: required help to save SECRET_KEY and Third party Private API key thanks for your answer  after your answer, I have tried to edit the ~/.profile file and /etc/profile/ but still, I can't see my key inside my VM instance  i am putting  SECRET_KEY="jhsgdjadtad876s87dsadsad7sa"  in the above file .but when i run the command "env" i can see my key  thankyou  On Tue, May 19, 2020 at 10:54 AM Akshat Zala  wrote:You can refer the link below: 1. https://cloud.google.com/community/tutorials/secrets-manager-python On Tuesday, 19 May 2020 10:26:17 UTC+5:30, Anirudh choudhary wrote:Hello everyone  I am hosting my website on google cloud platform on Ubuntu VM instance. I cannot find a way to set the environment variable in the machine  Like when I type on my local machine os.environ.get("SECRET_KEY") it give me the key but when I type the same command on VM instance it shows me null  I have tried some method like to edit the 1./etc/environment 2.~/.bashrc but none of the files is giving me the secret Key  waiting for expert answer  thankyou -- 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/0e4dbe3c-7b38-4e61-8e64-f96dc2c44dd3%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/CAL8_rkHAv1qmfW%3DzWao92cHs2jDFsSGNEv21Fg%3D6FF%3DAo8PjuA%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/5ec39d35.1c69fb81.be2f9.1767%40mx.google.com.


RE: Re: How to resize image from Django ckeditor_uploader in the HTML template while rendering?

2020-05-18 Thread Vishesh Mangla
Sorry, I’ m just a beginner in Django but I think what you need to look at is the “Fetch API”. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API.  https://www.youtube.com/watch?v=c3qWHnJJbSYYou can send an image through your view as HttpResponse(image_object in bytes/base64 format) object if request==”your desired one”. Then instead of your page reloading the fetch API will receivethe response and then you can use insertAdjacentHtml. For more details you can check the Django IRC channel   #django->https://webchat.freenode.net/ and ask there.  Sent from Mail for Windows 10 From: Ali AhammadSent: 18 May 2020 18:02To: Django usersSubject: Re: How to resize image from Django ckeditor_uploader in the HTML template while rendering? thanx for your reply. i am using pillow in my profile app. but the main issue is with ckeditor_uploader as you know i have to use RichTextUploadingField(). besides it i have to mention in urls.py and i have to render it corresponding variable name in the template. my main goal was if i upload any picture in body=RichTextUploadingField() in localhost/admin, i want to render the image and the text contents separately. in this case i couldn't find any document where i can learn about it. i tried to use ckeditor widgets but it just customizing the ckeditor toolbar. i dun want this and i am happy with what i have for now. so is there any way to render the uploading pic and resize and positioning in html template according to my own design? text can be separated and truncatchar:400 or 500 which i kew already. but i would like to separate the image from the text of the body. i hope you understand my problemOn Monday, May 18, 2020 at 12:49:53 PM UTC+1, Vishesh Mangla wrote:You can resize an image using the Pillow library or open-cv. Sent from Mail for Windows 10 From: Ali AhammadSent: 17 May 2020 22:45To: Django usersSubject: How to resize image from Django ckeditor_uploader in the HTML template while rendering? I am using Django ckeditor_uploader to make a post view for a blog. But while rendering in the template I wanted to render image separately from the post content texts. My main goal is to set the image separately on the template on top and resizing it. And I can set more pictures inside the post  but the top one will be highlighted and rendered in different HTML page. Is there any way? I tried to use ckeditor widget but it is just customizing the toolbar of ckeditor Please let me know if you have any idea  -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4b148528-7b15-4d39-8763-5f3a0f1931b6%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/44ef45ba-68ce-4e08-a516-c7ff1a827ff5%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/5ec28c14.1c69fb81.ee3cc.aa1a%40mx.google.com.


RE: Re: how to write Ajax for a Like button in Django

2020-05-18 Thread Vishesh Mangla
Why don’t you use fetch api? Its simple. Once you get the response from the server, you can use InsertAdjacentHtml.  Sent from Mail for Windows 10 From: Motaz HejazeSent: 18 May 2020 07:34To: Django usersSubject: Re: how to write Ajax for a Like button in Django The button is submitted but without page refresh On Mon, 18 May 2020, 3:53 am Ahmed Khairy,  wrote:Hi Motaz, When I added your code it disabled the function of the button nothing happenedOn Sunday, May 17, 2020 at 9:30:38 PM UTC-4, Motaz Hejaze wrote:In your like button form in your templates , try this : i don't think you need ajax for this , but if you still need it let us know On Mon, 18 May 2020, 2:26 am Gabriel Araya Garcia,  wrote:Hi Ahmed, I was looking for that during several months and I have found examples than not run, and therefore I`ve get one conclution: "It`s not posible to get that functionality in Django". No one could demostrate with example code.If you find something, please send me the code. Thanks   Gabriel Araya GarciaGMI - Desarrollo de Sistemas Informáticos  El dom., 17 may. 2020 a las 20:15, Ahmed Khairy () escribió:Hi all, I need some help writing the ajax for a like button instead of refreshing every time a like is posted  here is the template:  {% csrf_token %}{% if user.is_authenticated %}{% if liked %} Unlike button>{% else %} Like button>{% endif  %}{% else %} Logina> to Like small>{{total_likes}} Likes strong>{% endif %}form>  Here is the urls:path('like/', LikeView, name='like_post'), here is the views:def LikeView(request, pk):post = get_object_or_404(Post, id=request.POST.get('post_id'))like = Falseif post.likes.filter(id=request.user.id).exists():post.likes.remove(request.user)like = False else:post.likes.add(request.user)like = Truereturn redirect('score:post-detail', pk=pk) class PostDetailView(DetailView):model = Posttemplate_name = "post_detail.html" def get_context_data(self, *args, **kwargs):context = super(PostDetailView, self).get_context_data() stuff = get_object_or_404(Post, id=self.kwargs['pk'])total_likes = stuff.total_likes() liked = Falseif stuff.likes.filter(id=self.request.user.id).exists():liked = True context["total_likes"] = total_likescontext["liked"] = likedreturn context   -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/00707977-9b68-4329-a13d-adb9ab7b8813%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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKVvSDCuegzvsZQ_Rfms3yMA_EO914T0yJ_n929mnx7bNDodUA%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/76f6356b-17bc-4697-b6cf-966f01e9217f%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/CAHV4E-fDsKvr77YCUwjttDQJ7nx6f9%2Bj0ZZCByUa1Ygr%3DOoY1Q%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/5ec22272.1c69fb81.dac63.72cc%40mx.google.com.


Re: Re:

On Mon, 4 May 2020, 12:47 am Motaz Hejaze,  wrote:

> first remove all whitespaces in urls.py
>
> ' login' should be 'login'
>
> and then rename your login view to something else , maybe custom_login ,
> or put your app urls before admin panel urls
>
> On Sun, May 3, 2020 at 6:42 PM fahad rasool 
> wrote:
>
>> Apps url.py
>>
>> On Sun, 3 May 2020, 8:27 pm 'Amitesh Sahay' via Django users, <
>> django-users@googlegroups.com> wrote:
>>
>>> please show your app's urls.py, as well the errors
>>>
>>> Regards,
>>> Amitesh
>>>
>>>
>>> On Sunday, 3 May, 2020, 07:53:47 pm IST, fahad rasool <
>>> rasoolfahad...@gmail.com> wrote:
>>>
>>>
>>> Than also it is not working
>>>
>>> On Sun, 3 May 2020, 7:44 pm 'Amitesh Sahay' via Django users, <
>>> django-users@googlegroups.com> wrote:
>>>
>>> it should be *return redirect('login')*
>>>
>>> please check
>>>
>>> On Sunday, 3 May, 2020, 07:34:11 pm IST, fahad rasool <
>>> rasoolfahad...@gmail.com> wrote:
>>>
>>>
>>>
>>> I am unable to redirect to my login page from signup page and nor i am
>>> able to store sign up form details in the database .please someone help its
>>> urgent..
>>>
>>> --
>>> 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/CACqgSmBdoviTSbHH%3D8yMo86MO6vpGpHyNQz1FtXgRf-UiL7zYw%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/660971716.362954.1588515193796%40mail.yahoo.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/CACqgSmAwKgU4dVWN72-u2xnvqBz5ThV6CNarukWo%2BFACwN%3DGFQ%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/940225696.366548.1588517794311%40mail.yahoo.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/CACqgSmDYKr5ztuh3meeTCt-fQvnC9OjZ1cMFK2pFAw%3DLM%2BnLoA%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/CAHV4E-csZDBbNz5HKHpto_6mtn%2B2jLOLAzjSgV95dDPX72NfhQ%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/CACqgSmBkjVHxhE9%3DXf8zY3aq9ky0-WQ8MyQaETRpaCwhkeg0Yg%40mail.gmail.com.


Re: Re:

first remove all whitespaces in urls.py

' login' should be 'login'

and then rename your login view to something else , maybe custom_login , or
put your app urls before admin panel urls

On Sun, May 3, 2020 at 6:42 PM fahad rasool 
wrote:

> Apps url.py
>
> On Sun, 3 May 2020, 8:27 pm 'Amitesh Sahay' via Django users, <
> django-users@googlegroups.com> wrote:
>
>> please show your app's urls.py, as well the errors
>>
>> Regards,
>> Amitesh
>>
>>
>> On Sunday, 3 May, 2020, 07:53:47 pm IST, fahad rasool <
>> rasoolfahad...@gmail.com> wrote:
>>
>>
>> Than also it is not working
>>
>> On Sun, 3 May 2020, 7:44 pm 'Amitesh Sahay' via Django users, <
>> django-users@googlegroups.com> wrote:
>>
>> it should be *return redirect('login')*
>>
>> please check
>>
>> On Sunday, 3 May, 2020, 07:34:11 pm IST, fahad rasool <
>> rasoolfahad...@gmail.com> wrote:
>>
>>
>>
>> I am unable to redirect to my login page from signup page and nor i am
>> able to store sign up form details in the database .please someone help its
>> urgent..
>>
>> --
>> 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/CACqgSmBdoviTSbHH%3D8yMo86MO6vpGpHyNQz1FtXgRf-UiL7zYw%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/660971716.362954.1588515193796%40mail.yahoo.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/CACqgSmAwKgU4dVWN72-u2xnvqBz5ThV6CNarukWo%2BFACwN%3DGFQ%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/940225696.366548.1588517794311%40mail.yahoo.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/CACqgSmDYKr5ztuh3meeTCt-fQvnC9OjZ1cMFK2pFAw%3DLM%2BnLoA%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/CAHV4E-csZDBbNz5HKHpto_6mtn%2B2jLOLAzjSgV95dDPX72NfhQ%40mail.gmail.com.


Re: Re:

please show your app's urls.py, as well the errors


Regards,
Amitesh 

On Sunday, 3 May, 2020, 07:53:47 pm IST, fahad rasool 
 wrote:  
 
 Than also it is not working
On Sun, 3 May 2020, 7:44 pm 'Amitesh Sahay' via Django users, 
 wrote:

it should be return redirect('login')


please check
On Sunday, 3 May, 2020, 07:34:11 pm IST, fahad rasool 
 wrote:  
 
 
I am unable to redirect to my login page from signup page and nor i am able to 
store sign up form details in the database .please someone help its urgent..

-- 
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/CACqgSmBdoviTSbHH%3D8yMo86MO6vpGpHyNQz1FtXgRf-UiL7zYw%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/660971716.362954.1588515193796%40mail.yahoo.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/CACqgSmAwKgU4dVWN72-u2xnvqBz5ThV6CNarukWo%2BFACwN%3DGFQ%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/940225696.366548.1588517794311%40mail.yahoo.com.


RE: Re: The database backend does not accept 0 as a value for AutoField.

Once you use the default argument for a model field, it cannot be removed even when u rerun migrations. You need to provide a valid default input value for each specific field Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database backend does not accept 0 as a value for AutoField. Hey thanks for your response i did so because initially at the time of migration it was asking for default value and i just putted false in rush. that filed user from User model returns username as string autofield so what shall i put as default their?i tried to put None for default value but while migrating it giving same error :--   line 192, in validate_autopk_value    raise ValueError('The database backend does not accept 0 as a 'ValueError: The database backend does not accept 0 as a value for AutoField. guys help me with this error . On Sunday, April 26, 2020 at 9:10:41 PM UTC+5:30, Antje Kazimiers wrote:setting default=False is odd for any field other than a BooleanField. I would take that out for the OneToOneField at least and see how things go.AntjeOn 4/26/20 4:19 PM, Mayur Bagul wrote:Hello guys,  im stucked with this error mentioned in subject.below link redirect details about question. https://stackoverflow.com/q/61427882/11351226 let me know how to get rid of this problem.  Thanking You. -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cad442bf-e697-47c6-a0b4-3ce65bcef480%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/7c34122c-0260-4a5b-8586-42c0037f8192%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/5ea5b9e3.1c69fb81.e88a7.4a63%40mx.google.com.


RE: Re: The database backend does not accept 0 as a value for AutoField.

Also, Please make sure that any foreign key fields are not default nulls Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database backend does not accept 0 as a value for AutoField. Hey thanks for your response i did so because initially at the time of migration it was asking for default value and i just putted false in rush. that filed user from User model returns username as string autofield so what shall i put as default their?i tried to put None for default value but while migrating it giving same error :--   line 192, in validate_autopk_value    raise ValueError('The database backend does not accept 0 as a 'ValueError: The database backend does not accept 0 as a value for AutoField. guys help me with this error . On Sunday, April 26, 2020 at 9:10:41 PM UTC+5:30, Antje Kazimiers wrote:setting default=False is odd for any field other than a BooleanField. I would take that out for the OneToOneField at least and see how things go.AntjeOn 4/26/20 4:19 PM, Mayur Bagul wrote:Hello guys,  im stucked with this error mentioned in subject.below link redirect details about question. https://stackoverflow.com/q/61427882/11351226 let me know how to get rid of this problem.  Thanking You. -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cad442bf-e697-47c6-a0b4-3ce65bcef480%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/7c34122c-0260-4a5b-8586-42c0037f8192%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/5ea5ba1a.1c69fb81.fd493.410b%40mx.google.com.


RE: Re: stack

Sure,thank Sent from Mail for Windows 10 From: Rok KlancarSent: 20 April 2020 21:57To: Django usersSubject: Re: stack Do the official Django tutorial-- 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/d024215b-ac1e-4323-b6de-07e26152e6bd%40googlegroups.com. 

	

		Virus-free. www.avg.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/5e9ed0a5.1c69fb81.db0ca.5dac%40mx.google.com.


Re: Re: Problem

please proceed with this tutorial:
https://tutorial.djangogirls.org/en/django_installation/

it covers all steps

--
Gerardo Palazuelos Guerrero



On Mon, Mar 16, 2020 at 12:59 PM Daniel Chiemelu <
chiemeluchukwuemeka...@gmail.com> wrote:

> So after creating the virtual environment what is next on installing django
>
>
>
> Sent from Mail  for
> Windows 10
>
>
>
> *From: *Phako Perez <13.phak...@gmail.com>
> *Sent: *Monday, March 16, 2020 8:42 PM
> *Subject: *Re: Problem
>
>
>
> What’s the problem???
>
>
>
> Using python 3 you can create an environment as
>
>
>
> python3 -m venv my_env
>
>
>
> Kindly send an error or what is the issue you face while trying to create
> the env, so will be more easy to help, otherwise this question you can
> search on google for a beginner tutorial
>
>
>
> Regards
>
> Sent from my iPhone
>
>
>
> On 16 Mar 2020, at 13:34, Daniel Chiemelu <
> chiemeluchukwuemeka...@gmail.com> wrote:
>
> 
>
> Please I am new in Django and I am finding it difficult to create a
> virtual environment and also install Django and I had a virtual environment
> that I created before using Flask
>
>
>
> Sent from Mail  for
> Windows 10
>
>
>
>
>
>
> 
>
> Virus-free. www.avast.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/5e6fd482.1c69fb81.b9f97.42e4%40mx.google.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/84A00726-EAF0-4D71-9CB6-2B9A0BD63184%40gmail.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/5e6fda79.1c69fb81.ee8e8.440a%40mx.google.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/CAJ8iCyM0qLmF2tD%2BNgCuB_58KPLgzttbi8DJTLfGwnqnN4QpJQ%40mail.gmail.com.


RE: Re: Problem

So after creating the virtual environment what is next on installing django Sent from Mail for Windows 10 From: Phako PerezSent: Monday, March 16, 2020 8:42 PMSubject: Re: Problem What’s the problem??? Using python 3 you can create an environment as python3 -m venv my_env Kindly send an error or what is the issue you face while trying to create the env, so will be more easy to help, otherwise this question you can search on google for a beginner tutorial RegardsSent from my iPhoneOn 16 Mar 2020, at 13:34, Daniel Chiemelu  wrote:Please I am new in Django and I am finding it difficult to create a virtual environment and also install Django and I had a virtual environment that I created before using Flask Sent from Mail for Windows 10  Virus-free. www.avast.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/5e6fd482.1c69fb81.b9f97.42e4%40mx.google.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/84A00726-EAF0-4D71-9CB6-2B9A0BD63184%40gmail.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/5e6fda79.1c69fb81.ee8e8.440a%40mx.google.com.


Re: Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

How can I do ImageField and FileField in crispy forms

On Thu, 20 Feb, 2020, 12:53 AM ,  wrote:

>
>
> Yaa did that still facing issue
>
>
>
> *From: *onlinejudge95 
> *Sent: *Thursday, February 20, 2020 12:32 AM
> *To: *django-users@googlegroups.com
> *Subject: *Re: Re: I am filling up the form but my filled out items are
> not rendering into database and also the session is not working
>
>
>
> The template file
>
>
>
>
>
> <*form **method**="post" **novalidate*>
>
> No action attribute defined here. Where do you expect the data to be sent?
>
>
> {% csrf_token %}
>
>   <*div **class**="form-group col-md-4 mb-0"*>
> {{ form.name|as_crispy_field }}
>   
>   <*div **class**="form-group col-md-4 mb-0"*>
> {{ form.email|as_crispy_field }}
>   
>   <*div **class**="form-group col-md-4 mb-0"*>
> {{ form.link_sent|as_crispy_field }}
>   
> <*button **type**="submit" **class**="btn btn-primary"*>Start
>  <*button **type**="submit" **class**="btn btn-primary"*>Save
>
>   
> {% endblock %}
>
>
>
>
>
> *From: *Farai M 
> *Sent: *Wednesday, February 19, 2020 11:19 PM
> *To: *django-users@googlegroups.com
> *Subject: *Re: I am filling up the form but my filled out items are not
> rendering into database and also the session is not working
>
>
>
> The session must be activated in the settings file check that it should
> work smoothly.
>
> On the insert can u share the template file mostly .It is to do with post
> requests not reaching back end. You can try to print the post request
> before your save to model to see if all inputs are coming through.If it's
> not that try get create to see if it's an problem with duplicates.
>
>
>
>
>
>
>
>
>
>
>
>
>
> *views.py from *django.views.generic *import *FormView, TemplateView
> *from *django.shortcuts *import *render,redirect
> *from *.models *import 
> *modelstep1,modelstep2,modelstep3,modelstep4,modelstep5,modelstep6,modelstep7,modelstep8,modelstep9,modelstep10
> *from *.forms *import 
> *FormStep1,FormStep2,FormStep3,FormStep4,FormStep5,FormStep6,FormStep7,FormStep8,FormStep9,FormStep10
>
> *def *FormStep1View(request):
> forms = FormStep1()
> *return *render(request, *'form_1.html'*, context={*'form'*: forms})
>
>
> *def *addForm1(request):
> form = FormStep1(request.POST)
> *if *form.is_valid():
> u=modelstep1()
> u.name = form.cleaned_data[*'name'*]
> u.email = form.cleaned_data[*'email'*]
> u.link_sent = form.cleaned_data[*'link_sent'*]
> u.title = request.POST.get(*'name'*)
> u.content = request.POST.get(*'email'*)
> u.content = request.POST.get(*'link_sent'*)
> u.save()
> request.session[*'name'*] = u.name
> request.session[*'email'*] = u.email
> request.session[*'link_sent'*] =u.link_sent
> *return *redirect(*'/form/2/'*,context={*'form'*: form})
>
>
>
> *def *FormStep2View(request):
> forms = FormStep2()
> *return *render(request, *'form_2.html'*, context={*'form'*: forms})
> *def *addForm2(request):
> form = FormStep2(request.POST)
> *if *form.is_valid():
>   v=modelstep2()
>   v.country=form.cleaned_data[*'country'*]
>   v.city=form.cleaned_data[*'city'*]
>   v.year_of_birth=form.cleaned_data[*'year_of_birth'*]
>   v.current_grade=form.cleaned_data[*'current_grade'*]
>   v.university=form.cleaned_data[*' university'*]
>   v.school=form.cleaned_data[*'school'*]
>   v.native_language=form.cleaned_data[*'native_language'*]
>   v.phone_number = form.cleaned_data[*'phone_number'*]
>   v.email_business=form.cleaned_data[*'email_business'*]
>   v.social_media=form.cleaned_data[*'social_media'*]
>
>   request.session[*'country'*] = v.country
>   request.session[*'city'*] = v.city
>   request.session[*'year_of_birth'*] = v.year_of_birth
>   request.session[*'current_grade'*] = v.current_grade
>   request.session[*'university'*] = v.university
>   request.session[*'school'*] = v.school
>   request.session[*'native_language'*] = v.native_language
>   request.session[*'phone_number'*] = v.phone_number
>   request.session[*'email_business'*] = v.email_business
>   request.session[*'social_media'*]=  v.social_media
>

RE: Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

 Yaa did that still facing issue From: onlinejudge95Sent: Thursday, February 20, 2020 12:32 AMTo: django-users@googlegroups.comSubject: Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working The template file  <form method="post" novalidate>No action attribute defined here. Where do you expect the data to be sent? {% csrf_token %}  <div class="form-group col-md-4 mb-0">    {{ form.name|as_crispy_field }}  div>  <div class="form-group col-md-4 mb-0">    {{ form.email|as_crispy_field }}  div>  <div class="form-group col-md-4 mb-0">    {{ form.link_sent|as_crispy_field }}  div>    <button type="submit" class="btn btn-primary">Startbutton> <button type="submit" class="btn btn-primary">Savebutton>  form>{% endblock %}  From: Farai MSent: Wednesday, February 19, 2020 11:19 PMTo: django-users@googlegroups.comSubject: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working The session must be activated in the settings file check that it should work smoothly.On the insert can u share the template file mostly .It is to do with post requests not reaching back end. You can try to print the post request  before your save to model to see if all inputs are coming through.If it's not that try get create to see if it's an problem with duplicates.  views.py from django.views.generic import FormView, TemplateViewfrom django.shortcuts import render,redirectfrom .models import modelstep1,modelstep2,modelstep3,modelstep4,modelstep5,modelstep6,modelstep7,modelstep8,modelstep9,modelstep10from .forms import FormStep1,FormStep2,FormStep3,FormStep4,FormStep5,FormStep6,FormStep7,FormStep8,FormStep9,FormStep10def FormStep1View(request):    forms = FormStep1()    return render(request, 'form_1.html', context={'form': forms})def addForm1(request):    form = FormStep1(request.POST)    if form.is_valid():    u=modelstep1()    u.name = form.cleaned_data['name']    u.email = form.cleaned_data['email']    u.link_sent = form.cleaned_data['link_sent']    u.title = request.POST.get('name')    u.content = request.POST.get('email')    u.content = request.POST.get('link_sent')    u.save()    request.session['name'] = u.name    request.session['email'] = u.email    request.session['link_sent'] =u.link_sent    return redirect('/form/2/',context={'form': form})def FormStep2View(request):    forms = FormStep2()    return render(request, 'form_2.html', context={'form': forms})def addForm2(request):    form = FormStep2(request.POST)    if form.is_valid():  v=modelstep2()  v.country=form.cleaned_data['country']  v.city=form.cleaned_data['city']  v.year_of_birth=form.cleaned_data['year_of_birth']  v.current_grade=form.cleaned_data['current_grade']  v.university=form.cleaned_data[' university']  v.school=form.cleaned_data['school']  v.native_language=form.cleaned_data['native_language']  v.phone_number = form.cleaned_data['phone_number']  v.email_business=form.cleaned_data['email_business']  v.social_media=form.cleaned_data['social_media']  request.session['country'] = v.country  request.session['city'] = v.city  request.session['year_of_birth'] = v.year_of_birth  request.session['current_grade'] = v.current_grade  request.session['university'] = v.university  request.session['school'] = v.school  request.session['native_language'] = v.native_language  request.session['phone_number'] = v.phone_number  request.session['email_business'] = v.email_business  request.session['social_media']=  v.social_media  return redirect(request, '/form/3/', context={'form':form})def FormStep3View(request):    forms = FormStep3()    return render(request, 'form_3.html', context={'form': forms})def addForm3(request):    form = FormStep3(request.POST)    if form.is_valid():   x=modelstep3()   x.internship_idea = form.cleaned_data['internship_idea']   x.startup_business = form.cleaned_data['startup_business']   x.goals = form.cleaned_data['goals']   x.established_year = form.cleaned_data['established_year']   x.number_of_employees = form.cleaned_data['number_of_employees']   x.months = form.cleaned_data['months']   x.website = form.cleaned_data['website']   x.cell_number_business = form.cleaned_data['cell_number_business']   x.co_founder_details = form.cleaned_data['co_founder_details']   x.social_media_business = form.cleaned_data['social_media_busi

Re: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

On Wed, Feb 19, 2020 at 11:31 PM  wrote:

> The template file
>
>
>
>
>
> <*form **method**="post" **novalidate*>
>
> No action attribute defined here. Where do you expect the data to be sent?

>
> {% csrf_token %}
>
>   <*div **class**="form-group col-md-4 mb-0"*>
> {{ form.name|as_crispy_field }}
>   
>   <*div **class**="form-group col-md-4 mb-0"*>
> {{ form.email|as_crispy_field }}
>   
>   <*div **class**="form-group col-md-4 mb-0"*>
> {{ form.link_sent|as_crispy_field }}
>   
> <*button **type**="submit" **class**="btn btn-primary"*>Start
>  <*button **type**="submit" **class**="btn btn-primary"*>Save
>
>   
> {% endblock %}
>
>
>
>
>
> *From: *Farai M 
> *Sent: *Wednesday, February 19, 2020 11:19 PM
> *To: *django-users@googlegroups.com
> *Subject: *Re: I am filling up the form but my filled out items are not
> rendering into database and also the session is not working
>
>
>
> The session must be activated in the settings file check that it should
> work smoothly.
>
> On the insert can u share the template file mostly .It is to do with post
> requests not reaching back end. You can try to print the post request
> before your save to model to see if all inputs are coming through.If it's
> not that try get create to see if it's an problem with duplicates.
>
>
>
>
>
>
>
>
>
>
>
>
>
> *views.py from *django.views.generic *import *FormView, TemplateView
> *from *django.shortcuts *import *render,redirect
> *from *.models *import 
> *modelstep1,modelstep2,modelstep3,modelstep4,modelstep5,modelstep6,modelstep7,modelstep8,modelstep9,modelstep10
> *from *.forms *import 
> *FormStep1,FormStep2,FormStep3,FormStep4,FormStep5,FormStep6,FormStep7,FormStep8,FormStep9,FormStep10
>
> *def *FormStep1View(request):
> forms = FormStep1()
> *return *render(request, *'form_1.html'*, context={*'form'*: forms})
>
>
> *def *addForm1(request):
> form = FormStep1(request.POST)
> *if *form.is_valid():
> u=modelstep1()
> u.name = form.cleaned_data[*'name'*]
> u.email = form.cleaned_data[*'email'*]
> u.link_sent = form.cleaned_data[*'link_sent'*]
> u.title = request.POST.get(*'name'*)
> u.content = request.POST.get(*'email'*)
> u.content = request.POST.get(*'link_sent'*)
> u.save()
> request.session[*'name'*] = u.name
> request.session[*'email'*] = u.email
> request.session[*'link_sent'*] =u.link_sent
> *return *redirect(*'/form/2/'*,context={*'form'*: form})
>
>
>
> *def *FormStep2View(request):
> forms = FormStep2()
> *return *render(request, *'form_2.html'*, context={*'form'*: forms})
> *def *addForm2(request):
> form = FormStep2(request.POST)
> *if *form.is_valid():
>   v=modelstep2()
>   v.country=form.cleaned_data[*'country'*]
>   v.city=form.cleaned_data[*'city'*]
>   v.year_of_birth=form.cleaned_data[*'year_of_birth'*]
>   v.current_grade=form.cleaned_data[*'current_grade'*]
>   v.university=form.cleaned_data[*' university'*]
>   v.school=form.cleaned_data[*'school'*]
>   v.native_language=form.cleaned_data[*'native_language'*]
>   v.phone_number = form.cleaned_data[*'phone_number'*]
>   v.email_business=form.cleaned_data[*'email_business'*]
>   v.social_media=form.cleaned_data[*'social_media'*]
>
>   request.session[*'country'*] = v.country
>   request.session[*'city'*] = v.city
>   request.session[*'year_of_birth'*] = v.year_of_birth
>   request.session[*'current_grade'*] = v.current_grade
>   request.session[*'university'*] = v.university
>   request.session[*'school'*] = v.school
>   request.session[*'native_language'*] = v.native_language
>   request.session[*'phone_number'*] = v.phone_number
>   request.session[*'email_business'*] = v.email_business
>   request.session[*'social_media'*]=  v.social_media
>   *return *redirect(request, *'/form/3/'*, 
> context={*'form'*:form})
>
>
> *def *FormStep3View(request):
> forms = FormStep3()
> *return *render(request, *'form_3.html'*, context={*'form'*: forms})
> *def *addForm3(request):
> form = FormStep3(request.POST)
> *if *form.is_valid():
>x=modelstep3()
>x.internship_idea = form.cleaned_data[*'internship_idea'*]
>x.startup_business = form.cleaned_data[*'startup_business'*]
>x.goals = form.cleaned_data[*'goals'*]
>x.established_year = form.cleaned_data[*'established_year'*]
>x.number_of_employees = form.cleaned_data[*'number_of_employees'*]
>x.months = form.cleaned_data[*'months'*]
>x.website = form.cleaned_data[*'website'*]
>x.cell_number_business = 
> form.cleaned_data[*'cell_number_business'*]

RE: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

The template file  
    {% csrf_token %} 
    {{ form.name|as_crispy_field }}  div> 
    {{ form.email|as_crispy_field }}  div> 
    {{ form.link_sent|as_crispy_field }}  div>   

RE: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working

 import os# Build paths inside the project like this: os.path.join(BASE_DIR, ...)BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))# Quick-start development settings - unsuitable for production# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/# SECURITY WARNING: keep the secret key used in production secret!SECRET_KEY = 'w(gn#4op(yq4-_@@z0zsw2-!c-ai4#wb48a1y^(ke)y)c1q('# SECURITY WARNING: don't run with debug turned on in production!DEBUG = TrueALLOWED_HOSTS = []# Application definitionINSTALLED_APPS = [    'django.contrib.admin',    'django.contrib.auth',    'django.contrib.contenttypes',    'django.contrib.sessions',    'django.contrib.messages',    'django.contrib.staticfiles',    'crispy_forms',    'mysite.core',]CRISPY_TEMPLATE_PACK = 'bootstrap4'MIDDLEWARE = [    'django.middleware.security.SecurityMiddleware',    'django.contrib.sessions.middleware.SessionMiddleware',    'django.middleware.common.CommonMiddleware',    'django.middleware.csrf.CsrfViewMiddleware',    'django.contrib.auth.middleware.AuthenticationMiddleware',    'django.contrib.messages.middleware.MessageMiddleware',    'django.middleware.clickjacking.XFrameOptionsMiddleware',]ROOT_URLCONF = 'mysite.urls'TEMPLATES = [    {    'BACKEND': 'django.template.backends.django.DjangoTemplates',    'DIRS': [    os.path.join(BASE_DIR, 'mysite/templates')    ],    'APP_DIRS': True,    'OPTIONS': {    'context_processors': [    'django.template.context_processors.debug',    'django.template.context_processors.request',    'django.contrib.auth.context_processors.auth',    'django.contrib.messages.context_processors.messages',    ],    },    },]WSGI_APPLICATION = 'mysite.wsgi.application'# Database# https://docs.djangoproject.com/en/2.1/ref/settings/#databasesDATABASES = {    'default': {    'ENGINE': 'django.db.backends.sqlite3',    'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),    }}# Password validation# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validatorsAUTH_PASSWORD_VALIDATORS = [    {    'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',    },    {    'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',    },    {    'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',    },    {    'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',    },]# Internationalization# https://docs.djangoproject.com/en/2.1/topics/i18n/LANGUAGE_CODE = 'en-us'TIME_ZONE = 'UTC'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = True# Static files (CSS, _javascript_, Images)# https://docs.djangoproject.com/en/2.1/howto/static-files/STATIC_URL = '/static/' From: Farai MSent: Wednesday, February 19, 2020 11:19 PMTo: django-users@googlegroups.comSubject: Re: I am filling up the form but my filled out items are not rendering into database and also the session is not working The session must be activated in the settings file check that it should work smoothly.On the insert can u share the template file mostly .It is to do with post requests not reaching back end. You can try to print the post request  before your save to model to see if all inputs are coming through.If it's not that try get create to see if it's an problem with duplicates. On Wed, Feb 19, 2020, 7:33 PM mick  wrote:  views.py from django.views.generic import FormView, TemplateViewfrom django.shortcuts import render,redirectfrom .models import modelstep1,modelstep2,modelstep3,modelstep4,modelstep5,modelstep6,modelstep7,modelstep8,modelstep9,modelstep10from .forms import FormStep1,FormStep2,FormStep3,FormStep4,FormStep5,FormStep6,FormStep7,FormStep8,FormStep9,FormStep10def FormStep1View(request):    forms = FormStep1()    return render(request, 'form_1.html', context={'form': forms})def addForm1(request):    form = FormStep1(request.POST)    if form.is_valid():    u=modelstep1()    u.name = form.cleaned_data['name']    u.email = form.cleaned_data['email']    u.link_sent = form.cleaned_data['link_sent']    u.title = request.POST.get('name')    u.content = request.POST.get('email')    u.content = request.POST.get('link_sent')    u.save()    request.session['name'] = u.name    request.session['email'] = u.email    request.session['link_sent'] =u.link_sent    return redirect('/form/2/',context={'form': form})def FormStep2View(request):    forms = FormStep2()    return render(request, 'form_2.html', context={'form': forms})def addForm2(request):    form = FormStep2(request.POST)    if form.is_valid():  v=modelstep2()  v.country=form.cleaned_data['country']  v.city=form.cleaned_data['city']  v.year_of_birth=form.cleaned_data['year_of_birth']  v.current_grade=form.cleaned_data['current_grade']

RE: Re: Study and project partner(s) needed

Im interested! Sent from Mail for Windows 10 From: Hedrick Godson'sSent: Friday, February 14, 2020 5:06 PMTo: django-users@googlegroups.com; ychu...@gmail.comSubject: Re: Study and project partner(s) needed Hey sir/madam let's team up.Pls reply if interested.  On Sat, 15 Feb 2020, 00:46 Chuck Yu  wrote:I'm interested too.On Friday, February 14, 2020 at 1:02:35 PM UTC-8, Hedrick wrote:Lets do this man. Please reply back.  On Fri, 14 Feb 2020, 20:00 Scorpio King  wrote:Hi I'm interested because Im software engineer and I want to become developer I have experience in c++,c#,java ,Vue js,data mining ,Python and also servive step by step.. On Fri, Feb 14, 2020, 9:15 PM Akorede Habeebullah  wrote:Hi guys,  I've been learning Django on a solo for a while now and I'm really in need of a Programmer friend/partner who we can always learn together, build projects together. This will really benefit both sides greatly. I am a person you'll really love to make friend with. Interested individuals should pls signify.  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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6d4ed94c-3864-4c5b-9f9e-5df7b6a77cdd%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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKY3Mz0Duv0eQvu08Zb9wjEtziCOOD_Yoy0Sap2P%3DfKSOwVBCQ%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/4c9d0cdd-78a1-4ffc-b31e-5b44479fd36d%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/CAJAxQDn7BnVQuuZ4618XDarEwZDkS8aqCQTjEdWH_UsRt3WgfA%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/5e471ca0.1c69fb81.ad2d9.3fa8%40mx.google.com.


Re: Re: Error with filter queryset

have you tried "OneToOneField" ?
I am wondering about a many to one field to User


[image: --]

Maninder Kumar
[image: http://]about.me/maninder.s.kumar





On Mon, Feb 10, 2020 at 12:01 AM BRAJESH KUMAR 
wrote:

> I have a local host website working with some page showing few details of
> one of many products with a data associated for usage like zoom car rental.
>
>
>
> Facing issues while trying to add a counter and have it updated by day.
>
>
>
> Eg: if I have a product a available 10 units for next 10 days and it gets
> booked for one day 3 units, the counter should update.
>
>
>
> Need help for the same.
>
>
>
> Thanks,
>
> Brajesh
>
>
>
> Sent from Mail  for
> Windows 10
>
> --
> 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/5e404fcb.1c69fb81.c5c43.951d%40mx.google.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/CABOHK3QUBBah9f%2BoSRD2Ckw5J93EROExeyjjeweG3uQaQSVaGg%40mail.gmail.com.


RE: Re: Error with filter queryset

I have a local host website working with some page showing few details of one of many products with a data associated for usage like zoom car rental. Facing issues while trying to add a counter and have it updated by day. Eg: if I have a product a available 10 units for next 10 days and it gets booked for one day 3 units, the counter should update. Need help for the same. Thanks,Brajesh Sent from Mail for Windows 10



-- 
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/5e404fcb.1c69fb81.c5c43.951d%40mx.google.com.


Re: Re: Meta question


Thank you Ani - works nicely :)

Cheers

Mike

On 10/09/2019 6:59 pm, ANi wrote:

getattr(instance, key) to get the value
setattr(instance, key ,value) to put the value, and remember to do 
instance.save() otherwise it won't actually be changed.

Mike Dewhirst於 2019年9月10日星期二 UTC+8下午4時27分06秒寫道:

Given a model instance and the name of one of its fields as a string,
how can I get/put a value in that field?

The methods might look like this ...

def get_value(obj, fldname):

 ...

 return value

def put_value(obj, fldname, value):

 pass


Thanks for any hints

Mike


-- 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/abe0c993-6cf5-4a55-9d3b-9dd213cad8db%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/8e43da3c-c3bf-8833-2c7d-51d201b3ce25%40dewhirst.com.au.


Re: Re: Composite Primary / Foreign Key support

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi Lance,

I see that you've already received a number of replies, but I'll give
you my perspective, too.

On Mon, Feb 18, 2019 at 08:26:43AM +, 'Ellinghaus, Lance J' via Django 
users wrote:
> NONCONFIDENTIAL // EXTERNAL
> So, basically, Django will not be supporting Composite Primary Keys
> in the future?
> 
> Lance

That is not what I wrote – it is almost certainly possible for Django
to support this, but it will take a lot of effort, and a relatively
large refactor of ORM internals, enough so that it is unlikely to
happen unless someone steps up to sponsor the work over an extended
period of time.

Just to give you an idea of how much effort is needed here,
personally, I have spent well over half a year working on this full
time under GSoC, with support from some really skilled and smart
Django committers (taken all together, with all the research, and
trying to keep up with django master for some time, it might be close
a year, even, though spread over a much longer period of time), and it
still wasn't enough. Of course, I'm no 10x rockstar ninja, so someone
else might get the job done faster, but it's still a fair amount of
work.

There's a lot of material out there outlining how one might go about
this, the two DEPs were already pointed out by someone else, and the
latest thread on django-developers@ that summarized the topic was
https://groups.google.com/d/topic/django-developers/wakEPFMPiyQ/discussion
The one notable thing that is missing from all design documents that
I've seen (or written) is how to make this work with migrations.
Interactions with most other parts of Django have been described at
some length already.

This answer probably won't help you solve your immediate problem, and
I get that it's frustrating. Either way, that's where we are today.

Cheers,

Michal
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCgAGBQJcbBq2AAoJEHA7T/IPM/kl/oQQAIGotHVDPhiD646CZ3hACeqX
c0+U9g2fwhDl8yVauh+Ra9BSCY74TBYNky72PpBOJJF27q+QTTaGObG7j+Iiua/T
GWMYQNixaZrxxKhDYTO2Cpw9/2vsKGG92+ZjKMLV92dNGXTboFMZyubBaBwIh0wi
erHnVkhqeGuwlmlZHtW6vogjsqZMHK+bFEq3JH6x9v7/eMX3iOhRnJELN/zKcVZE
re49pHrkHtBEwAyhL3uYBdmG4HWdP2FTJ8qEPV97fuTm4ez+BFfqy3SaCd2wjgFG
5sssd8MSWSoY/2DIDJYyOJwaM+ogG8+4HjcnFy8eYG4cPAxcVFDT9o3SN/xHOMNH
rjJ5CVtWZI+XSAWupICLCe8ObKjmMGIgbbM9M6V5DdzUCuyUXBbT59sMABXnyBuQ
OxRLMdbkXz+wgfWRkhQLTj6TC8G0znZoCin1S8+vc6aM42qZA3RMj7wU5dRrgmX6
ln8nBwjibrsoXpdukCeGmgIgpuQqtUaBfbKZh2sfh0v34ZuYHuNd7iJVDP5BJ47R
COyH7QgKijBAxgjl+GHxbLG+lqbMgJKL4kqOVEMsuX2xZ08RYt+1Cpqlq9QpPdj3
UPCYnmB2H+jEhPxBZLsH7sjXbQQCAiUqtE++2BMRDgczR7dsdmeduY+0X7toK+0A
QOowjjbhXohOLpAbmYKj
=VheK
-END PGP SIGNATURE-

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20190219150318.GE10973%40konk.org.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Composite Primary / Foreign Key support

Lance,

sincerely, nobody take care about that feature because that's needed just
for legacy db.
The number of applications with on legacy db is less than 0.01% of the
django applications.
There are some workaround for that applications, for example use SQL
Alchemy.

I implemented a CompositeKey Dajngo feature for Django 1.4.  It is
completly working also for the Generic Keys, concatening escaped keys.
There was also a draft to implement the indexes. However, Django core team
is evolving the platform so quickly (good for the framework) and the
library is not mantained anymore. On Dajngo 1.6 I had should rewrote it
completly.

In the end, now I understand why the core team don't care about the
feature. Forget it.


Il giorno lun 18 feb 2019 alle ore 09:28 'Ellinghaus, Lance J' via Django
users  ha scritto:

> NONCONFIDENTIAL // EXTERNAL
> So, basically, Django will not be supporting Composite Primary Keys in the
> future?
>
> Lance
>
> -Original Message-
> From: django-users@googlegroups.com  On
> Behalf Of Michal Petrucha
> Sent: Monday, February 11, 2019 8:34 AM
> To: Django users 
> Subject: [External] Re: Composite Primary / Foreign Key support
>
> NONCONFIDENTIAL // EXTERNAL
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via Django
> users wrote:
> > I have seen references to people adding the support of composite
> > primary keys to Django for years, but it does not look like it has been
> added.
> >
> > I have a number of legacy databases that I cannot add fields to but
> > need to be able to be queried through Django. They are read-only tables.
> > A number of the tables are also related through Composite Foreign Keys
> > and I have seen some addons but not sure what is fully supported.
> >
> > I am trying to use Django 2.1.5.
> >
> > Any help or ideas would be appreciated, and saying  "Add a field to
> > your tables" is not an option.
> >
> > Thank you.
>
> Hi Lance,
>
> I haven't been on top of this in recent years, but let me try.
>
> When it comes to just composite primary keys, as long as you only need
> read access, you might be able to get away with marking an arbitrary field
> as the primary key. Using a non-unique field as the primary key would make
> any writes to the database dangerous, but that's not your case here.
> However, you also lose the invariant that filtering on the “pk” field alias
> will match at most one row, which means the admin would probably be off the
> table, too – since that assumes the “pk” is, in fact, unique, and the same
> holds for any other package that makes use of “pk”. You should still be
> okay in your own code, though.
>
> For composite foreign keys, there is nowadays a private, undocumented API,
> ForeignObject, which is what ForeignKey builds on. The general
> ForeignObject lets you specify multiple fields that make up the relation,
> you should be able to find some examples in the test suite (there is a
> foreign_object package in there). Keep in mind that this is an internal
> API, so it might change without warning.
>
> Good luck,
>
> Michal
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
>
> iQIcBAEBCgAGBQJcYXniAAoJEHA7T/IPM/kl8EAP/Rzaxqe0bDO6vkxb4/Mmmj5S
> 62t6Cfm3VqqK6NxYjRXG904jKwDI4HMH1SAs5fdVMh9vf+VBj/S5bcIpQbesqXbh
> wbkcIn+mmnfhLDaHOGunYqp76tscBJv/rtxJZaX5NRLp7OraCWtbjRBtiw1fJ/tl
> iJD0HRIk9zn0pqyX8GjeAyM0UR+uL1wwrvz8Ur85ASsc8pFThTP6ZMQoaEIgo9D+
> HB3XfrhiOMd5Nb2SbjG4KCRe7alpFx83nuY53YVsv+8X+Nqp4Ndi7ch2Ni3jxxHf
> R7qVJYsMp/l72CNb6KiT85sb6PwQyeVdvU78cXKjkIKDirskGgQIEW2OvK+ZXC3B
> Aj4I+AMFXEKje8ITfW3/s/v+UNvVTNZHYC5NPZ6o50+YJFDoiwb0mpQMdUredWZk
> nT2cYMgyPQA/XKN9w5vUCNbTebPG/AA7yCthXbOrHn9Xl+kICkXRjjl9fHRUs55Q
> wgPqz0CFXPKaE+JFt/NABJzdSrki1y587GHsOb7hKFiQwS8DHU8WOMXkR3BGKEtN
> q0gebcqKvVnjRwLLsBvB0h3uI/yifgBTp8G8/+tZ0WuNdongTe+yPzchxuRjgx10
> e70xtBjgsyCQGRB3CPsgR2UelQOtAEt8ZyYwyPF5sQYOvQg1xjcYp87FqfqflSTE
> 6aQIMkXhKjKazmc/ew9F
> =Ji5Z
> -END PGP SIGNATURE-
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/20190211133426.GV10973%40konk.org
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> 

Re: Re: Composite Primary / Foreign Key support

There's general interest in having support for composite keys and composite 
foreign key. It's just that nobody has implemented it. 

There are proposals among the DEPs that layout ideas how they could be 
implemented:

- https://github.com/django/deps/blob/master/draft/0191-composite-fields.rst
- 
https://github.com/django/deps/blob/master/draft/0192-standalone-composite-fields.rst

On Mon, Feb 18, 2019, at 9:28 AM, 'Ellinghaus, Lance J' via Django users wrote:
> NONCONFIDENTIAL // EXTERNAL
> So, basically, Django will not be supporting Composite Primary Keys in 
> the future?
> 
> Lance
> 
> -Original Message-
> From: django-users@googlegroups.com  On 
> Behalf Of Michal Petrucha
> Sent: Monday, February 11, 2019 8:34 AM
> To: Django users 
> Subject: [External] Re: Composite Primary / Foreign Key support
> 
> NONCONFIDENTIAL // EXTERNAL
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via Django 
> users wrote:
> > I have seen references to people adding the support of composite 
> > primary keys to Django for years, but it does not look like it has been 
> > added.
> >
> > I have a number of legacy databases that I cannot add fields to but 
> > need to be able to be queried through Django. They are read-only tables.
> > A number of the tables are also related through Composite Foreign Keys 
> > and I have seen some addons but not sure what is fully supported.
> >
> > I am trying to use Django 2.1.5.
> >
> > Any help or ideas would be appreciated, and saying  "Add a field to 
> > your tables" is not an option.
> >
> > Thank you.
> 
> Hi Lance,
> 
> I haven't been on top of this in recent years, but let me try.
> 
> When it comes to just composite primary keys, as long as you only need 
> read access, you might be able to get away with marking an arbitrary 
> field as the primary key. Using a non-unique field as the primary key 
> would make any writes to the database dangerous, but that's not your 
> case here. However, you also lose the invariant that filtering on the 
> “pk” field alias will match at most one row, which means the admin 
> would probably be off the table, too – since that assumes the “pk” is, 
> in fact, unique, and the same holds for any other package that makes 
> use of “pk”. You should still be okay in your own code, though.
> 
> For composite foreign keys, there is nowadays a private, undocumented 
> API, ForeignObject, which is what ForeignKey builds on. The general 
> ForeignObject lets you specify multiple fields that make up the 
> relation, you should be able to find some examples in the test suite 
> (there is a foreign_object package in there). Keep in mind that this is 
> an internal API, so it might change without warning.
> 
> Good luck,
> 
> Michal
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> 
> iQIcBAEBCgAGBQJcYXniAAoJEHA7T/IPM/kl8EAP/Rzaxqe0bDO6vkxb4/Mmmj5S
> 62t6Cfm3VqqK6NxYjRXG904jKwDI4HMH1SAs5fdVMh9vf+VBj/S5bcIpQbesqXbh
> wbkcIn+mmnfhLDaHOGunYqp76tscBJv/rtxJZaX5NRLp7OraCWtbjRBtiw1fJ/tl
> iJD0HRIk9zn0pqyX8GjeAyM0UR+uL1wwrvz8Ur85ASsc8pFThTP6ZMQoaEIgo9D+
> HB3XfrhiOMd5Nb2SbjG4KCRe7alpFx83nuY53YVsv+8X+Nqp4Ndi7ch2Ni3jxxHf
> R7qVJYsMp/l72CNb6KiT85sb6PwQyeVdvU78cXKjkIKDirskGgQIEW2OvK+ZXC3B
> Aj4I+AMFXEKje8ITfW3/s/v+UNvVTNZHYC5NPZ6o50+YJFDoiwb0mpQMdUredWZk
> nT2cYMgyPQA/XKN9w5vUCNbTebPG/AA7yCthXbOrHn9Xl+kICkXRjjl9fHRUs55Q
> wgPqz0CFXPKaE+JFt/NABJzdSrki1y587GHsOb7hKFiQwS8DHU8WOMXkR3BGKEtN
> q0gebcqKvVnjRwLLsBvB0h3uI/yifgBTp8G8/+tZ0WuNdongTe+yPzchxuRjgx10
> e70xtBjgsyCQGRB3CPsgR2UelQOtAEt8ZyYwyPF5sQYOvQg1xjcYp87FqfqflSTE
> 6aQIMkXhKjKazmc/ew9F
> =Ji5Z
> -END PGP SIGNATURE-
> 
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/20190211133426.GV10973%40konk.org.
> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/5c6a6c98.1c69fb81.eb4fb.5c2cSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving 

RE: Re: Composite Primary / Foreign Key support

"As your requirement is read-only if the data is static you could to create a 
second database, with all the PK of the legacy database, and
then as single Pk field to that table, and access everything through a view of 
a join the two tables."

I had such a requirement, and I created a View in PostgreSQL in the same 
database.  The pk field I created was just a Window function for the current 
row in the data set.  Since I didn't need that anyway, I could safely ignore 
it.  Since it was a truly read-only model, I didn't need to worry about the 
composite key.

-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Roger Gammans
Sent: Monday, February 18, 2019 11:30 AM
To: django-users@googlegroups.com
Subject: Re: Re: Composite Primary / Foreign Key support

Lance,

I can't speak for the core team, only inform you based on what I've
seen here and in other projects.

I suspect if there was a significant need across a number of users,
then enough work could be done by those that needed it and as long as
it was 
1) fully functional, 
2) had clean good code 
3) the people who wrote where going to stay within the
community to support it 

Then there is a chance a set of code written might get merged, I don't
however thing there is sufficient interest from the core team for them
to do the work themselves.

Those requirements are quite a high bar, I started on some code to do
this, for a project a few years ago and got a limited set of composite
key functionality working in my own tree, which was just about enough
for the project I was working on. So I do have some understanding of
what is needed, and how intrusive and can get.

My code was fine for reading and writing, but you couldn't use
ForeignKey Fields to traverse composite key relationships. Which has a
surprising number of corner cases. This was for Django 1.8 and isn't
compatible with later versions (unfortunately). On the other hand some
of the code changes in the ORM point at a better approach, than we
took.

So it possible, but someone will need to invest some time into it.


The only immediately helpfuly ideas I have are;
As your requirement is read-only if the data is static you could to create a 
second database, with all the PK of the legacy database, and
then as single Pk field to that table, and access everything through a view of 
a join the two tables. 

Of course if another app is adding rows then you are a bit stuck, but if you 
absolutely can't add a autonumber field to use as a fake PK, then there is not 
a lot you can do. I've started adding single PK autonumber fields to legacy 
databases now when I get this issue, and
making the old PK into a unique index. So far that has working and hasn't 
broken my legacy apps.

If those are no good, either you can't use django or you going to need to 
invest in understanding the ORMs internals.

HTH,

-- 
Roger Gammans 
Gamma Science


On Mon, 2019-02-18 at 08:26 +, 'Ellinghaus, Lance J' via Django
users wrote:
> 
> ONCONFIDENTIAL // EXTERNAL
> So, basically, Django will not be supporting Composite Primary Keys
> in the future?
> 
> Lance
> 
> -Original Message-
> From: django-users@googlegroups.com 
> On Behalf Of Michal Petrucha
> Sent: Monday, February 11, 2019 8:34 AM
> To: Django users 
> Subject: [External] Re: Composite Primary / Foreign Key support
> 
> NONCONFIDENTIAL // EXTERNAL
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via
> Django users wrote:
> > I have seen references to people adding the support of composite 
> > primary keys to Django for years, but it does not look like it has
> been added.
> >
> > I have a number of legacy databases that I cannot add fields to
> but 
> > need to be able to be queried through Django. They are read-only
> tables.
> > A number of the tables are also related through Composite Foreign
> Keys 
> > and I have seen some addons but not sure what is fully supported.
> >
> > I am trying to use Django 2.1.5.
> >
> > Any help or ideas would be appreciated, and saying  "Add a field
> to 
> > your tables" is not an option.
> >
> > Thank you.
> 
> Hi Lance,
> 
> I haven't been on top of this in recent years, but let me try.
> 
> When it comes to just composite primary keys, as long as you only
> need read access, you might be able to get away with marking an
> arbitrary field as the primary key. Using a non-unique field as the
> primary key would make any writes to the database dangerous, but
> that's not your case here. However, you also lose the invariant that
> filtering on the “pk” field alias will match at most one row, which
> means the admin would probably be off t

Re: Re: Composite Primary / Foreign Key support

Lance,

I can't speak for the core team, only inform you based on what I've
seen here and in other projects.

I suspect if there was a significant need across a number of users,
then enough work could be done by those that needed it and as long as
it was 
1) fully functional, 
2) had clean good code 
3) the people who wrote where going to stay within the
community to support it 

Then there is a chance a set of code written might get merged, I don't
however thing there is sufficient interest from the core team for them
to do the work themselves.

Those requirements are quite a high bar, I started on some code to do
this, for a project a few years ago and got a limited set of composite
key functionality working in my own tree, which was just about enough
for the project I was working on. So I do have some understanding of
what is needed, and how intrusive and can get.

My code was fine for reading and writing, but you couldn't use
ForeignKey Fields to traverse composite key relationships. Which has a
surprising number of corner cases. This was for Django 1.8 and isn't
compatible with later versions (unfortunately). On the other hand some
of the code changes in the ORM point at a better approach, than we
took.

So it possible, but someone will need to invest some time into it.


The only immediately helpfuly ideas I have are;
As your requirement is read-only if the data is static you could to create a 
second database, with all the PK of the legacy database, and
then as single Pk field to that table, and access everything through a view of 
a join the two tables. 

Of course if another app is adding rows then you are a bit stuck, but if you 
absolutely can't add a autonumber field to use as a fake PK, then there is not 
a lot you can do. I've started adding single PK autonumber fields to legacy 
databases now when I get this issue, and
making the old PK into a unique index. So far that has working and hasn't 
broken my legacy apps.

If those are no good, either you can't use django or you going to need to 
invest in understanding the ORMs internals.

HTH,

-- 
Roger Gammans 
Gamma Science


On Mon, 2019-02-18 at 08:26 +, 'Ellinghaus, Lance J' via Django
users wrote:
> 
> ONCONFIDENTIAL // EXTERNAL
> So, basically, Django will not be supporting Composite Primary Keys
> in the future?
> 
> Lance
> 
> -Original Message-
> From: django-users@googlegroups.com 
> On Behalf Of Michal Petrucha
> Sent: Monday, February 11, 2019 8:34 AM
> To: Django users 
> Subject: [External] Re: Composite Primary / Foreign Key support
> 
> NONCONFIDENTIAL // EXTERNAL
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via
> Django users wrote:
> > I have seen references to people adding the support of composite 
> > primary keys to Django for years, but it does not look like it has
> been added.
> >
> > I have a number of legacy databases that I cannot add fields to
> but 
> > need to be able to be queried through Django. They are read-only
> tables.
> > A number of the tables are also related through Composite Foreign
> Keys 
> > and I have seen some addons but not sure what is fully supported.
> >
> > I am trying to use Django 2.1.5.
> >
> > Any help or ideas would be appreciated, and saying  "Add a field
> to 
> > your tables" is not an option.
> >
> > Thank you.
> 
> Hi Lance,
> 
> I haven't been on top of this in recent years, but let me try.
> 
> When it comes to just composite primary keys, as long as you only
> need read access, you might be able to get away with marking an
> arbitrary field as the primary key. Using a non-unique field as the
> primary key would make any writes to the database dangerous, but
> that's not your case here. However, you also lose the invariant that
> filtering on the “pk” field alias will match at most one row, which
> means the admin would probably be off the table, too – since that
> assumes the “pk” is, in fact, unique, and the same holds for any
> other package that makes use of “pk”. You should still be okay in
> your own code, though.
> 
> For composite foreign keys, there is nowadays a private, undocumented
> API, ForeignObject, which is what ForeignKey builds on. The general
> ForeignObject lets you specify multiple fields that make up the
> relation, you should be able to find some examples in the test suite
> (there is a foreign_object package in there). Keep in mind that this
> is an internal API, so it might change without warning.
> 
> Good luck,
> 
> Michal
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
> 
> iQIcBAEBCgAGBQJcYXniAAoJEHA7T/IPM/kl8EAP/Rzaxqe0bDO6vkxb4/Mmmj5S
> 62t6Cfm3VqqK6NxYjRXG904jKwDI4HMH1SAs5fdVMh9vf+VBj/S5bcIpQbesqXbh
> wbkcIn+mmnfhLDaHOGunYqp76tscBJv/rtxJZaX5NRLp7OraCWtbjRBtiw1fJ/tl
> iJD0HRIk9zn0pqyX8GjeAyM0UR+uL1wwrvz8Ur85ASsc8pFThTP6ZMQoaEIgo9D+
> HB3XfrhiOMd5Nb2SbjG4KCRe7alpFx83nuY53YVsv+8X+Nqp4Ndi7ch2Ni3jxxHf
> 

RE: Re: Composite Primary / Foreign Key support

NONCONFIDENTIAL // EXTERNAL
So, basically, Django will not be supporting Composite Primary Keys in the 
future?

Lance

-Original Message-
From: django-users@googlegroups.com  On Behalf 
Of Michal Petrucha
Sent: Monday, February 11, 2019 8:34 AM
To: Django users 
Subject: [External] Re: Composite Primary / Foreign Key support

NONCONFIDENTIAL // EXTERNAL

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via Django users 
wrote:
> I have seen references to people adding the support of composite 
> primary keys to Django for years, but it does not look like it has been added.
>
> I have a number of legacy databases that I cannot add fields to but 
> need to be able to be queried through Django. They are read-only tables.
> A number of the tables are also related through Composite Foreign Keys 
> and I have seen some addons but not sure what is fully supported.
>
> I am trying to use Django 2.1.5.
>
> Any help or ideas would be appreciated, and saying  "Add a field to 
> your tables" is not an option.
>
> Thank you.

Hi Lance,

I haven't been on top of this in recent years, but let me try.

When it comes to just composite primary keys, as long as you only need read 
access, you might be able to get away with marking an arbitrary field as the 
primary key. Using a non-unique field as the primary key would make any writes 
to the database dangerous, but that's not your case here. However, you also 
lose the invariant that filtering on the “pk” field alias will match at most 
one row, which means the admin would probably be off the table, too – since 
that assumes the “pk” is, in fact, unique, and the same holds for any other 
package that makes use of “pk”. You should still be okay in your own code, 
though.

For composite foreign keys, there is nowadays a private, undocumented API, 
ForeignObject, which is what ForeignKey builds on. The general ForeignObject 
lets you specify multiple fields that make up the relation, you should be able 
to find some examples in the test suite (there is a foreign_object package in 
there). Keep in mind that this is an internal API, so it might change without 
warning.

Good luck,

Michal
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCgAGBQJcYXniAAoJEHA7T/IPM/kl8EAP/Rzaxqe0bDO6vkxb4/Mmmj5S
62t6Cfm3VqqK6NxYjRXG904jKwDI4HMH1SAs5fdVMh9vf+VBj/S5bcIpQbesqXbh
wbkcIn+mmnfhLDaHOGunYqp76tscBJv/rtxJZaX5NRLp7OraCWtbjRBtiw1fJ/tl
iJD0HRIk9zn0pqyX8GjeAyM0UR+uL1wwrvz8Ur85ASsc8pFThTP6ZMQoaEIgo9D+
HB3XfrhiOMd5Nb2SbjG4KCRe7alpFx83nuY53YVsv+8X+Nqp4Ndi7ch2Ni3jxxHf
R7qVJYsMp/l72CNb6KiT85sb6PwQyeVdvU78cXKjkIKDirskGgQIEW2OvK+ZXC3B
Aj4I+AMFXEKje8ITfW3/s/v+UNvVTNZHYC5NPZ6o50+YJFDoiwb0mpQMdUredWZk
nT2cYMgyPQA/XKN9w5vUCNbTebPG/AA7yCthXbOrHn9Xl+kICkXRjjl9fHRUs55Q
wgPqz0CFXPKaE+JFt/NABJzdSrki1y587GHsOb7hKFiQwS8DHU8WOMXkR3BGKEtN
q0gebcqKvVnjRwLLsBvB0h3uI/yifgBTp8G8/+tZ0WuNdongTe+yPzchxuRjgx10
e70xtBjgsyCQGRB3CPsgR2UelQOtAEt8ZyYwyPF5sQYOvQg1xjcYp87FqfqflSTE
6aQIMkXhKjKazmc/ew9F
=Ji5Z
-END PGP SIGNATURE-

--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20190211133426.GV10973%40konk.org.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5c6a6c98.1c69fb81.eb4fb.5c2cSMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

can we use clean method instead of __init__

On Mon 5 Nov, 2018, 4:47 PM Aashutosh Rathi, 
wrote:

> Yes, this works for me.
> Make sure
>
>
> super(AddLabForm, self).__init__(*args, **kwargs)
>fields_keyOrder = ['id', 'date', 'start_time', 'end_time']
>if 'keyOrder' in self.fields:
>self.fields.keyOrder = fields_keyOrder
>else:
>self.fields = OrderedDict((k, self.fields[k]) for k in
> fields_keyOrder)
>
>
>
>
> On Thursday, January 22, 2015 at 1:06:59 AM UTC+5:30, Tobias Dacoir wrote:
>>
>> It still complained about the request, but I was finally able to get it
>> to work using this code:
>> def __init__(self, request, *args, **kwargs):
>> super(CustomContactForm, self).__init__(request=request, *args,
>> **kwargs)
>> fields_keyOrder = ['name', 'reason', 'email', 'body']
>> if (self.fields.has_key('keyOrder')):
>> self.fields.keyOrder = fields_keyOrder
>> else:
>> self.fields = OrderedDict((k, self.fields[k]) for k in
>> fields_keyOrder)
>>
>>
>> However it still does not re-order the fields, I searched stackoverflow
>> again and found this for Django 1.7:
>> https://github.com/pennersr/django-allauth/issues/356#issuecomment-24758824
>> But it still does not work. The order doesn't change it all. sigh :(
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/67309700-3cfc-4199-a789-8bc8653b1022%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF2Ah_HQqXkmMectBBUJkwJdYZLfbe8Qr6FBqQKwPxJ2Ln6MWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

Yes, this works for me.
Make sure


super(AddLabForm, self).__init__(*args, **kwargs)
   fields_keyOrder = ['id', 'date', 'start_time', 'end_time']
   if 'keyOrder' in self.fields:
   self.fields.keyOrder = fields_keyOrder
   else:
   self.fields = OrderedDict((k, self.fields[k]) for k in 
fields_keyOrder)




On Thursday, January 22, 2015 at 1:06:59 AM UTC+5:30, Tobias Dacoir wrote:
>
> It still complained about the request, but I was finally able to get it to 
> work using this code:
> def __init__(self, request, *args, **kwargs):
> super(CustomContactForm, self).__init__(request=request, *args, **
> kwargs)
> fields_keyOrder = ['name', 'reason', 'email', 'body']
> if (self.fields.has_key('keyOrder')):
> self.fields.keyOrder = fields_keyOrder
> else:
> self.fields = OrderedDict((k, self.fields[k]) for k in 
> fields_keyOrder)
>
>
> However it still does not re-order the fields, I searched stackoverflow 
> again and found this for Django 1.7: 
> https://github.com/pennersr/django-allauth/issues/356#issuecomment-24758824
> But it still does not work. The order doesn't change it all. sigh :(
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/67309700-3cfc-4199-a789-8bc8653b1022%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Beginner

Options regarding new names ?
i didn't get it
I am really sorry for disturbing you again and again

*Harsh Rawat |  +91-8824348448*
*Marketing Associate, SPREE'18*
*Department of Sponsorship & Marketing*
*Birla Institute of Technology and Science, Pilani*
*K.K. Birla Goa Campus*

On Sat, Jul 14, 2018 at 9:35 PM,  wrote:

> [image: BitBounce]
>
>
>
> Hello! I use a new email filtering service called BitBounce to filter my
> email. To deliver your email to my inbox, please click the button below and
> pay the small cryptocurrency fee. Thank you!
>
> *$0.05* to deliver your email.
>
> We’ve never met — I’ll pay your fee.
> 
>
> I know you — Add me to your whitelist.
> 
>
>
>
> *BitBounce*  is powered by the
> *Credo*  cryptocurrency
>
> *I’m from a business* —  what are my *delivery options*
> 
>
> BitBounce and Credo are transacted through *CredoEx*
> 
> Made by Turing Technology Inc. in San Mateo, California *Sign Up for
> BitBounce* 
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/94a55d90d1df431f4024cdef80e0a1
> e6%40ip-172-31-22-54.us-west-1.compute.internal
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALd6sVMJgAUi9ET0V%3D2PFH3ZCCTFcTa7x73tD5jh91LzFD2yzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Beginner

Title: BitBounce Autoresponse




  
  



  
  

  

  

  
  





  
  

  

  
 
 
 
  
  
 
 
 
  

  


  

  Hello! I use a new email filtering service called BitBounce to filter my email. To deliver your email to my inbox, please click the button below and pay the small cryptocurrency fee. Thank you!


$0.05 to deliver your email.


  We’ve never met — I’ll pay your fee.



  I know you — Add me to your whitelist.

  


  

  
 
 
 
  
  
 
 
 
  

  

  
  





  
  

  
BitBounce is powered by
 the Credo cryptocurrency
  
  
I’m from a business — 
what are my delivery options
  
  
BitBounce and Credo are
transacted through CredoEx
  

  
  





  
  

  
Made by Turing Technology Inc. in San Mateo, California Sign Up for BitBounce
  

  
  



  
  





-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/94a55d90d1df431f4024cdef80e0a1e6%40ip-172-31-22-54.us-west-1.compute.internal.
For more options, visit https://groups.google.com/d/optout.


Re: Re: AttributeError at /admin/login/

As a follow-up with further information.  This error occurs when on the 
Admin login screen I enter the user name and password and then click 
"SUBMIT".

The Exception Location is: 
"/home/medrec2/.virtualenvs/medrecproj/lib/python3.5/site-packages/mysql/connector/conversion.py
 
in _DATETIME_to_python, line 506".

Is there another db connector I can use to connect to the Mariadb database?

On Tuesday, May 1, 2018 at 7:45:47 AM UTC+8, Gerald Brown wrote:
>
> I had replied to Daniel Roseman instead of to the users group as I am new 
> to this group.
>
> Thanks to Daniel for his response 
>
>
>  Forwarded Message  
> Subject: Re: AttributeError at /admin/login/ 
> Date: Mon, 30 Apr 2018 21:46:35 +0800 
> From: Gerald Brown  
> To: Daniel Roseman  
>
> No. You need to show the full traceback.
> --
> DR. 
> -- 
>
> Here is the full traceback.  It is quite long.
>
> AttributeError at /admin/login/ 
>
> 'datetime.datetime' object has no attribute 'split'
>
> Request Method: POST 
> Request URL: http://192.168.0.122/admin/login/?next=/admin/ 
> Django Version: 2.0.4 
> Exception Type: AttributeError 
> Exception Value: 
>
> 'datetime.datetime' object has no attribute 'split'
>
> Exception Location: 
> /home/medrec2/.local/lib/python3.6/site-packages/mysql/connector/conversion.py
>  
> in _DATETIME_to_python, line 506 
> Python Executable: /home/medrec2/.virtualenvs/medrecproj/bin/python3.6 
> Python Version: 3.6.5 
> Python Path: 
>
> ['/home/medrec2/medrecproj',
>  '/home/medrec2/.virtualenvs/medrecproj/bin',
>  '/usr/local/lib/python36.zip',
>  '/usr/local/lib/python3.6',
>  '/usr/local/lib/python3.6/lib-dynload',
>  '/home/medrec2/.local/lib/python3.6/site-packages',
>  '/usr/local/lib/python3.6/site-packages']
>
> Server time: Sun, 29 Apr 2018 18:31:23 +0800 
> Traceback Switch to copy-and-paste view 
>  
>
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/core/handlers/exception.py
>  
>in inner 
>1. 
>   
>   response = get_response(request)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/core/handlers/base.py 
>in _get_response 
>1. 
>   
>   response = self.process_exception_by_middleware(e, 
> request)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/core/handlers/base.py 
>in _get_response 
>1. 
>   
>   response = wrapped_callback(request, *callback_args, 
> **callback_kwargs)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/views/decorators/cache.py
>  
>in _wrapped_view_func 
>1. 
>   
>   response = view_func(request, *args, **kwargs)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/contrib/admin/sites.py
>  
>in login 
>1. 
>   
>   return LoginView.as_view(**defaults)(request)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/views/generic/base.py 
>in view 
>1. 
>   
>   return self.dispatch(request, *args, **kwargs)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py 
>in _wrapper 
>1. 
>   
>   return bound_func(*args, **kwargs)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/views/decorators/debug.py
>  
>in sensitive_post_parameters_wrapper 
>1. 
>   
>   return view(request, *args, **kwargs)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py 
>in bound_func 
>1. 
>   
>   return func.__get__(self, type(self))(*args2, **kwargs2)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py 
>in _wrapper 
>1. 
>   
>   return bound_func(*args, **kwargs)
>   
>   ... 
>▶ Local vars  
>- 
>
> /home/medrec2/.local/lib/python3.6/site-packages/django/utils/decorators.py 
>in _wrapped_view 
>1. 
>   
>  

Re: Re-using CreateView, UpdateView & friendship

Hi
can you please share me any django project.for the  practicing purpose .

On Mon, Apr 30, 2018 at 10:15 AM, Mikkel Kromann 
wrote:

> Hmmm. It might be my question 3 after all.
> After a good night's sleep, I re-read the Figure 8.1 on Function vs Class
> Based Views in Two Scoops of Django ...
>
> 1) No generic view match closely what I have in mind (I think?)
> 2) I don't think I need to subclass my view
> 3) I suspect my CBV will need to process a lot of slightly different forms
>
> So, I should make 4 function based views for create, read, update and
> delete that can handle my many quite similar Models.
> Have I understood the difference between FBV and CBV correctly?
>
> thanks, Mikkel
>
>
>
> søndag den 29. april 2018 kl. 22.06.01 UTC+2 skrev Mikkel Kromann:
>>
>> Dear Django users.
>>
>> I'm testing whether Django is a good choice for a web based application
>> that I need to handle (create, read, update, delete) a lot of data tables.
>> I've discovered the built-in Class Based View, which are going to save me
>> from a lot of repetitive code lines - yay!
>>
>> Now, I've got an awful lot of models for my data tables (well, around
>> 20-30 ...) and looking at my code so far, it strikes me that it will
>> quickly become a bit repetitive, which I agree is a bad thing.
>>
>> From urls.py:
>>
>>
>> urlpatterns = [
>> # Urls for truck forms & actions
>> path('data/trucks/list/',views.TruckListView.as_view(), name=
>> 'truck_list'),
>> path('data/trucks/create/',views.TruckCreateView.as_view(), name=
>> 'truck_create'),
>> path('data/trucks/update//',views.TruckUpdateView.as_view(), name
>> ='truck_update'),
>> path('data/trucks/delete//',views.TruckDeleteView.as_view(), name
>> ='truck_delete'),
>>
>> # Urls for container forms & actions
>> path('data/containers/list/',views.ContainersListView.as_view(), name
>> ='containers_list'),
>> path('data/containers/create/',views.ContainersCreateView.as_view(),
>> name='containers_create'),
>> path('data/containers/update//',views.ContainersUpdateView.
>> as_view(), name='containers_update'),
>> path('data/containers/delete//',views.ContainersDeleteView.
>> as_view(), name='containers_delete'),
>>
>> # Urls for destination forms & actions
>> # ... guess what will come here ...
>>
>> ]
>>
>> From views.py
>>
>> # Create views
>> class TruckCreateView(CreateView):
>> model = Truck
>> fields = ['label', 'description', 'max_speed', 'max_weight',
>> 'max_volume' ]
>>
>> def get_success_url(self):
>> return reverse("truck_list")
>>
>> class ContainerCreateView(CreateView):
>> model = Container
>> fields = ['label', 'description', 'max_weight', 'max_volume' ]
>>
>> def get_success_url(self):
>> return reverse("container_list")
>>
>> # ... drum-whirl ... what is next? ...
>>
>>
>> I suppose my task at hand may be a bit unusual, but I aIso think I can't
>> be the first facing this problem.
>> Basically, I want to do more or less the same with all my models (maybe
>> in 2 or 3 variations). So,
>>
>> 1) did someone perhaps already make a nice package of Class Based Views
>> which can take an Model name as argument, with the model capable of
>> providing the necessary data, e.g. field list?
>> 2) How advisable / possible would it be to take the object name from the
>> url and pass that on to the generic class based view?
>> 3) Did I miss something very obvious? :)
>>
>>
>> Thanks for your help, Mikkel
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/3e6e5850-0afc-4b8c-af49-17ba467a540f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Thanks,

Subhani Shaik
8897630945

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGytu6DQnZh-uDaARoeB__a%3Dh%3DbviFaiLcVo8ZAxR0jSkkHP7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-using CreateView, UpdateView & friendship

Hmmm. It might be my question 3 after all.
After a good night's sleep, I re-read the Figure 8.1 on Function vs Class 
Based Views in Two Scoops of Django ...

1) No generic view match closely what I have in mind (I think?)
2) I don't think I need to subclass my view
3) I suspect my CBV will need to process a lot of slightly different forms

So, I should make 4 function based views for create, read, update and 
delete that can handle my many quite similar Models.
Have I understood the difference between FBV and CBV correctly?

thanks, Mikkel



søndag den 29. april 2018 kl. 22.06.01 UTC+2 skrev Mikkel Kromann:
>
> Dear Django users.
>
> I'm testing whether Django is a good choice for a web based application 
> that I need to handle (create, read, update, delete) a lot of data tables.
> I've discovered the built-in Class Based View, which are going to save me 
> from a lot of repetitive code lines - yay! 
>
> Now, I've got an awful lot of models for my data tables (well, around 
> 20-30 ...) and looking at my code so far, it strikes me that it will 
> quickly become a bit repetitive, which I agree is a bad thing.
>
> From urls.py:
>
>
> urlpatterns = [
> # Urls for truck forms & actions
> path('data/trucks/list/',views.TruckListView.as_view(), name=
> 'truck_list'),
> path('data/trucks/create/',views.TruckCreateView.as_view(), name=
> 'truck_create'),
> path('data/trucks/update//',views.TruckUpdateView.as_view(), name=
> 'truck_update'),
> path('data/trucks/delete//',views.TruckDeleteView.as_view(), name=
> 'truck_delete'),
>
> # Urls for container forms & actions
> path('data/containers/list/',views.ContainersListView.as_view(), name=
> 'containers_list'),
> path('data/containers/create/',views.ContainersCreateView.as_view(), 
> name='containers_create'),
> path('data/containers/update//',views.ContainersUpdateView.as_view
> (), name='containers_update'),
> path('data/containers/delete//',views.ContainersDeleteView.as_view
> (), name='containers_delete'),
>
> # Urls for destination forms & actions
> # ... guess what will come here ...
>
> ]
>
> From views.py
>
> # Create views
> class TruckCreateView(CreateView):
> model = Truck
> fields = ['label', 'description', 'max_speed', 'max_weight', 
> 'max_volume' ]
>
> def get_success_url(self):
> return reverse("truck_list")
>
> class ContainerCreateView(CreateView):
> model = Container
> fields = ['label', 'description', 'max_weight', 'max_volume' ]
>
> def get_success_url(self):
> return reverse("container_list")
>
> # ... drum-whirl ... what is next? ... 
>
>
> I suppose my task at hand may be a bit unusual, but I aIso think I can't 
> be the first facing this problem.
> Basically, I want to do more or less the same with all my models (maybe in 
> 2 or 3 variations). So, 
>
> 1) did someone perhaps already make a nice package of Class Based Views 
> which can take an Model name as argument, with the model capable of 
> providing the necessary data, e.g. field list?
> 2) How advisable / possible would it be to take the object name from the 
> url and pass that on to the generic class based view?
> 3) Did I miss something very obvious? :)
>
>
> Thanks for your help, Mikkel
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3e6e5850-0afc-4b8c-af49-17ba467a540f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-configuring allauth to fit custom specifications

Hi,

I haven't used allauth specifically, but you can always do things like this:

1. Override the default templates by including your templates first. That
way you will only get the functionality that your templates add. See here :
https://docs.djangoproject.com/en/2.0/howto/overriding-templates/
and here:
https://stackoverflow.com/questions/37439153/django-auth-where-to-put-custom-templates

2. You can only add the views that you need from the all auth package. If
you check through the all auth package you will find a urls.py somewhere.
Only add the views that you require for your project and you should be fine.

Regards,

Andréas

2018-01-02 22:13 GMT+01:00 Fun. Bytes :

> I have a set of expectations I'm trying to achieve. I want a sign up,
> login, and forget password page. I also want to have social sign in using
> Twitter, Facebook, or Google. Another thing I want is to send a
> confirmation email to the user validating their account.
>
> I know I can do this with Django allauth, but allauth comes with extra
> features that I don't need. For example, I don't need the password reset
> and change email pages. I want to remove these pages and their
> corresponding functionality, but I'm afraid I might break the code if I do
> this.
>
> I was thinking about two solutions. One solution would be to go through
> the allauth templates and change some of the code to fit my specifications,
> but I feel like it would be very tedious because a lot of things might
> break if I remove some funcionality.
>
> The second solution I was thinking of doing was building on top of auth
> and using a custom User model and building custom login, sign up, and reset
> pages. Adding the required functionality and everything. I could also build
> the models to provide social login by copying allauth's templates. I am
> just debating on what would be the best possible choice to do this. I would
> be happy if anyone can point me in the right direction.
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/5f49ce0c-9f85-4e23-a44d-2ebbe08f1695%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCc%2B2E6DbVn1WbA1XXwktr0YbM%3Daf2xX-a%3DiPHGYTVU0Gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-runnable sql scripts in the migrations framework

On Nov 2, 2017 4:01 AM, "Chris Wedgwood"  wrote:

Hi

As part of my deployment process I want to be able to have some db
scripts that are re-runnable

For example I have some internal configuration tables that I would
like to be able to change values with a merge statement in the same
file but not have to create a new migration file

I suppose my question is does the migration framework allow for
re-runnables?

If not can anyone recommend a good approach for this?


I have no idea what you are actually trying to achieve, but it sounds like
a custom management command may be able to get you there:

https://docs.djangoproject.com/en/1.11/howto/custom-management-commands/

-James

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciW278wFSMeZvSC5N3q%2BYr3MqM7t7NJfCBeNxqQX1M8D7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Migration of auth.user to custom user


On 7/08/2017 11:55 PM, Tim Graham wrote:

Some steps are outlined in https://code.djangoproject.com/ticket/25313.


OK thanks Tim. I'll start the planning. I'll presume Django 1.10 isn't 
sufficiently different from 1.8 for which the instructions are written.


I wish I wasn't an underconfident wuss!



On Friday, August 4, 2017 at 3:37:08 AM UTC-4, Mike Dewhirst wrote:

I have read  widely (including the docs) and been daunted by the
notion
of coverting auth.user  into a custom user. I have data and wonder if
there have been any recent recipes for doing this?

Thanks

Mike

--
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 post to this group, send email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c29496a8-1294-481a-8316-5c288b0af6f9%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--

Climate Pty Ltd
PO Box 308
Mount Eliza
Vic 3930
Australia +61

T: 03 9034 3977
M: 0411 704 143


--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3bade296-ace2-d356-d1bf-d5aa3c25b201%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Re :Re: download file when debug=false

Thk i will print it on monday  please 

Envoyé depuis Yahoo Mail pour Android 
 
  Le sam. j oct. PM à 8:05 PM, Constantine Covtushenko a 
écrit :   Hi Richard,
Ah, I missed your point last time. Sorry for that.
Can you please print here code sniped with with your app returns excel file?It 
helps us to suggest something valuable.
Regards,

On Sep 30, 2016, at 12:06, Richard Auscard  wrote:
hello,
i have developp a django application where excel file are generate after some 
operation. when debug=true thes excel files can be download but when false it 
is not possible.my question is how to solve this issus.
all think are ok when debug=true
-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1075ee7d-6927-47ee-8196-243a3d5091f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2071744624.164549.1475353978264%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re :Re: download file when debug=false

I juste want to know if there particular config to do when debug=false before 
make possible to download file from app. I van do it when debug=true

Envoyé depuis Yahoo Mail pour Android 
 
  Le ven. j sept. PM à 7:30 PM, Constantine Covtushenko 
a écrit :   Hi Richard,
There are a lot of options of how to change/switch application behaviour.It 
depends on what you eventually need to get.
Mentioned solution: settings.DEBUG = true/false can be one of them
Hope it helps.
Regards,Constantine C.

On Sep 30, 2016, at 12:06, Richard Auscard  wrote:
hello,
i have developp a django application where excel file are generate after some 
operation. when debug=true thes excel files can be download but when false it 
is not possible.my question is how to solve this issus.
all think are ok when debug=true
-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1075ee7d-6927-47ee-8196-243a3d5091f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/812755964.3218265.1475317628399%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: how to design custom forms in django with bootstrap


u need read how to use css file by django 
:https://docs.djangoproject.com/en/1.9/intro/tutorial06/ 
before this u need download bootstrap in ur location disk,and add 
in the  of ur html.


ww
 
From: Ikram Ulhaq
Date: 2016-06-21 05:02
To: Django users
Subject: Re: how to design custom forms in django with bootstrap

sir i want to design a custom form in django that will store data in 
database...i done this with built in django forms but i can't be able to design 
with bootstarp or css. data not inserted if i create my own custom form like 




Email address

  




Email address

  



some button




Email address

aa

  


On Monday, June 20, 2016 at 4:56:29 PM UTC+5, Ikram Ulhaq wrote:
Hi everyone!
i am new in django and want to design custom form in bootstarp that can use to 
send data to database.i made form successfully but values not inserted in 
database.please help

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0872af0f-c81f-42f9-998f-89a60ec390aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/201606220844433196233%40qq.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: help with the django tutorial part 1

yes, that was it, thanks it's running now

On Tuesday, February 2, 2016 at 2:16:45 PM UTC, 林攀 wrote:
>
>  url(r'^/$, views.index, name='index'),
>
>
>
>
>
> --
> *林攀*
>
> At 2016-02-02 20:35:58,"Bipul Raj"  wrote:
>
>   >> url(r'^$, views.index, name='index'),
>
> Are you sure if you have closing single quote with *r'^$* ? I do not see 
> it in error.
>
> On 2 February 2016 at 17:00, Russell Stanfield  > wrote:
>
>> Hi,
>>
>> at this page:
>>
>> https://docs.djangoproject.com/en/1.9/intro/tutorial01/
>>
>> I have got this far in the tutorial:
>>
>>
>> In the polls/urls.py file include the following code:
>> polls/urls.py
>>
>> from django.conf.urls import url
>> from . import views
>> urlpatterns = [
>> url(r'^$', views.index, name='index'),]
>>
>> The next step is to point the root URLconf at the polls.urls module. In 
>> mysite/urls.py, add an import for django.conf.urls.include and insert an 
>> include() 
>>  
>> in the urlpatterns list, so you have:
>> mysite/urls.py
>>
>> from django.conf.urls import include, urlfrom django.contrib import admin
>> urlpatterns = [
>> url(r'^polls/', include('polls.urls')),
>> url(r'^admin/', admin.site.urls),
>>
>>
>> You have now wired an index view into the URLconf. Lets verify it’s
>> working, run the following command:
>>
>> $ python manage.py runserver
>>
>> When I try to start the server I get the following output:
>>
>>
>> root@russellberrypi:/home/mycode/mysite# python manage.py 
>> 
>>  
>> runserver
>> Performing system checks...
>>
>> Unhandled exception in thread started by 
>> Traceback (most recent call last):
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 
>> 226, in wrapper
>> fn(*args, **kwargs)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py",
>>  
>> line 116, in inner_run
>> self.check(display_num_errors=True)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
>> line 426, in check
>> include_deployment_checks=include_deployment_checks,
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", 
>> line 75, in run_checks
>> new_errors = check(app_configs=app_configs)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 
>> 10, in check_url_config
>> return check_resolver(resolver)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 
>> 19, in check_resolver
>> for pattern in resolver.url_patterns:
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 
>> 33, in __get__
>> res = instance.__dict__[self.name 
>> ]
>>  
>> = self.func(instance)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 
>> 417, in url_patterns
>> patterns = getattr(self.urlconf_module, "urlpatterns", 
>> self.urlconf_module)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 
>> 33, in __get__
>> res = instance.__dict__[self.name 
>> ]
>>  
>> = self.func(instance)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 
>> 410, in urlconf_module
>> return import_module(self.urlconf_name)
>>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
>> import_module
>> __import__(name)
>>   File "/home/mycode/mysite/mysite/urls.py", line 20, in 
>> url(r'^polls/', include('polls.urls')),
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 
>> 52, in include
>> urlconf_module = import_module(urlconf_module)
>>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
>> import_module
>> __import__(name)
>>   File "/home/mycode/mysite/polls/urls.py", line 8
>> url(r'^$, views.index, name='index'),
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>>
>> I think all the files  I have created/edited look good, but can put them 
>> up here if required
>>
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django 

Re: Re: help with the django tutorial part 1

 SHould be

 url(r'^$', views.index , name='index')


 you have missed  '

Many thanks,

Serge


+380 636150445
skype: skhohlov

On Tue, Feb 2, 2016 at 3:58 PM, 林攀 <18610710...@163.com> wrote:

>  url(r'^/$, views.index, name='index'),
>
>
>
>
>
> --
> *林攀*
>
> At 2016-02-02 20:35:58,"Bipul Raj"  wrote:
>
>   >> url(r'^$, views.index, name='index'),
>
> Are you sure if you have closing single quote with *r'^$* ? I do not see
> it in error.
>
> On 2 February 2016 at 17:00, Russell Stanfield <
> russell.stanfi...@gmail.com> wrote:
>
>> Hi,
>>
>> at this page:
>>
>> https://docs.djangoproject.com/en/1.9/intro/tutorial01/
>>
>> I have got this far in the tutorial:
>>
>>
>> In the polls/urls.py file include the following code:
>> polls/urls.py
>>
>> from django.conf.urls import url
>> from . import views
>> urlpatterns = [
>> url(r'^$', views.index, name='index'),]
>>
>> The next step is to point the root URLconf at the polls.urls module. In
>> mysite/urls.py, add an import for django.conf.urls.include and insert an
>> include()
>> 
>> in the urlpatterns list, so you have:
>> mysite/urls.py
>>
>> from django.conf.urls import include, urlfrom django.contrib import admin
>> urlpatterns = [
>> url(r'^polls/', include('polls.urls')),
>> url(r'^admin/', admin.site.urls),
>>
>>
>> You have now wired an index view into the URLconf. Lets verify it’s
>> working, run the following command:
>>
>> $ python manage.py runserver
>>
>> When I try to start the server I get the following output:
>>
>>
>> root@russellberrypi:/home/mycode/mysite# python manage.py
>> 
>> runserver
>> Performing system checks...
>>
>> Unhandled exception in thread started by 
>> Traceback (most recent call last):
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line
>> 226, in wrapper
>> fn(*args, **kwargs)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py",
>> line 116, in inner_run
>> self.check(display_num_errors=True)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
>> line 426, in check
>> include_deployment_checks=include_deployment_checks,
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py",
>> line 75, in run_checks
>> new_errors = check(app_configs=app_configs)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line
>> 10, in check_url_config
>> return check_resolver(resolver)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line
>> 19, in check_resolver
>> for pattern in resolver.url_patterns:
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line
>> 33, in __get__
>> res = instance.__dict__[self.name
>> ]
>> = self.func(instance)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line
>> 417, in url_patterns
>> patterns = getattr(self.urlconf_module, "urlpatterns",
>> self.urlconf_module)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line
>> 33, in __get__
>> res = instance.__dict__[self.name
>> ]
>> = self.func(instance)
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line
>> 410, in urlconf_module
>> return import_module(self.urlconf_name)
>>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
>> import_module
>> __import__(name)
>>   File "/home/mycode/mysite/mysite/urls.py", line 20, in 
>> url(r'^polls/', include('polls.urls')),
>>   File
>> "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line
>> 52, in include
>> urlconf_module = import_module(urlconf_module)
>>   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
>> import_module
>> __import__(name)
>>   File "/home/mycode/mysite/polls/urls.py", line 8
>> url(r'^$, views.index, name='index'),
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>>
>> I think all the files  I have created/edited look good, but can put them
>> up here if required
>>
>>
>>
>> --
>> You received this message because you are 

Re: Re. My Django Book.

Since I am grinding my way through the learning process right now I thing I 
have some fairly pithy comments to contribute. It seems that no two 
tutorials do things the same way. I got bogged down in Two  Scoops because 
I needed a more detailed cookbook approach. Tango With Django is the best 
except it is written for Django 1.7. There is a serious break between how 
1.7 and 1.8 handle template files in the settings.py file. I still haven't 
recovered from this. Initial setup made me pull my hair out by the roots 
(and I can't afford to loose much more). Some suggestions:
  If your using a database other than the built in SQLite set it up 
first.
  Setup virtualenv and virtualenvmapper next.
  Do everything else inside of virtualenv.
  Install Django with pip (virtualenv active)
Then start a tutorial. The Django documentations tutorial seemed to be very 
good until it segued into a long trites on API setup. Really annoying. I 
just wanted to get the basic system set up. That said, the official 
tutorial may still be your best bet. Good luck.

Gary R 


On Thursday, July 30, 2015 at 1:35:16 PM UTC-7, Steve Burrus wrote:
>
> * Say I was wondering if anyone else has ever read this particulkar Django 
> book called "Sams Teach Yourself Django in 24 Hours" I checked out of the 
> library yesterday? [yeah I know it's one of the "24 hours" series] Does it 
> really teach the beginner a lot of things concerning Django?*
>
>
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5f6624d8-d7f5-47a5-9088-b528b16bbe7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re. My Django Book.

I am also looking for books which provide more of examples. The two scoops
of Django is more of doing things right than tutoring as MOnobot said. This
are the following things I want to learn in Django

I want to learn how to manually create form rather than creating modelform.
Combing forms from multiple models and show them under one view.

Rgards,
Sarfaraz Ahmed

On Fri, Jul 31, 2015 at 9:01 PM, monoBOT  wrote:

> two scoops is more like ways of doing things right than really explaining
> or tutoring.
>
> 2015-07-31 15:33 GMT+01:00 Mark Phillips :
>
>> The django docs are excellent. However, if you are more of a book person,
>> then try Try Two Scoops of Django (http://twoscoopspress.org/) - well
>> written and updated.
>>
>> Mark
>>
>> On Fri, Jul 31, 2015 at 6:33 AM, rmschne  wrote:
>>
>>> I'm no way an advanced user, but I found the book simplistic and not
>>> worth it.  Django's own documentation is much better
>>> https://docs.djangoproject.com
>>>
>>> On Thursday, 30 July 2015 21:35:16 UTC+1, Steve Burrus wrote:

 * Say I was wondering if anyone else has ever read this particulkar
 Django book called "Sams Teach Yourself Django in 24 Hours" I checked out
 of the library yesterday? [yeah I know it's one of the "24 hours" series]
 Does it really teach the beginner a lot of things concerning Django?*




>>> --
>>> 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 post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/272afb4b-6e50-45be-92a8-4580049c3a3f%40googlegroups.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAEqej2PGuSBiLChgYu9jk%3DS_5otDK1WMeZsfJqYYjKTMXh0TSQ%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> *monoBOT*
> Visite mi sitio(Visit my site): monobotsoft.es/blog/
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BxOsGAO8imS8%3D0OaDZiCGXFsWoyDs%3DCMtrAknd-gEqT8k0vqg%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks with regards,
Sarfaraz Ahmed

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEPJdiyQ9kFw%2BxUNVYFyUqU%2BDBJ1UsyakdeP7fVvJHMevPSwCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re. My Django Book.

two scoops is more like ways of doing things right than really explaining
or tutoring.

2015-07-31 15:33 GMT+01:00 Mark Phillips :

> The django docs are excellent. However, if you are more of a book person,
> then try Try Two Scoops of Django (http://twoscoopspress.org/) - well
> written and updated.
>
> Mark
>
> On Fri, Jul 31, 2015 at 6:33 AM, rmschne  wrote:
>
>> I'm no way an advanced user, but I found the book simplistic and not
>> worth it.  Django's own documentation is much better
>> https://docs.djangoproject.com
>>
>> On Thursday, 30 July 2015 21:35:16 UTC+1, Steve Burrus wrote:
>>>
>>> * Say I was wondering if anyone else has ever read this particulkar
>>> Django book called "Sams Teach Yourself Django in 24 Hours" I checked out
>>> of the library yesterday? [yeah I know it's one of the "24 hours" series]
>>> Does it really teach the beginner a lot of things concerning Django?*
>>>
>>>
>>>
>>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/272afb4b-6e50-45be-92a8-4580049c3a3f%40googlegroups.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEqej2PGuSBiLChgYu9jk%3DS_5otDK1WMeZsfJqYYjKTMXh0TSQ%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*monoBOT*
Visite mi sitio(Visit my site): monobotsoft.es/blog/

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BxOsGAO8imS8%3D0OaDZiCGXFsWoyDs%3DCMtrAknd-gEqT8k0vqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re. My Django Book.

The django docs are excellent. However, if you are more of a book person,
then try Try Two Scoops of Django (http://twoscoopspress.org/) - well
written and updated.

Mark

On Fri, Jul 31, 2015 at 6:33 AM, rmschne  wrote:

> I'm no way an advanced user, but I found the book simplistic and not worth
> it.  Django's own documentation is much better
> https://docs.djangoproject.com
>
> On Thursday, 30 July 2015 21:35:16 UTC+1, Steve Burrus wrote:
>>
>> * Say I was wondering if anyone else has ever read this particulkar
>> Django book called "Sams Teach Yourself Django in 24 Hours" I checked out
>> of the library yesterday? [yeah I know it's one of the "24 hours" series]
>> Does it really teach the beginner a lot of things concerning Django?*
>>
>>
>>
>>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/272afb4b-6e50-45be-92a8-4580049c3a3f%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEqej2PGuSBiLChgYu9jk%3DS_5otDK1WMeZsfJqYYjKTMXh0TSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re. My Django Book.

I'm no way an advanced user, but I found the book simplistic and not worth 
it.  Django's own documentation is much 
better https://docs.djangoproject.com

On Thursday, 30 July 2015 21:35:16 UTC+1, Steve Burrus wrote:
>
> * Say I was wondering if anyone else has ever read this particulkar Django 
> book called "Sams Teach Yourself Django in 24 Hours" I checked out of the 
> library yesterday? [yeah I know it's one of the "24 hours" series] Does it 
> really teach the beginner a lot of things concerning Django?*
>
>
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/272afb4b-6e50-45be-92a8-4580049c3a3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time


Great tool, thanks :)

On 03/24/2015 11:22 PM, Russell Keith-Magee wrote:

Hi Gergely,

One option is to use a test suite GUI tool, like cricket:

http://pybee.org/cricket

Cricket lets you view your entire test suite as a tree, select subsets 
of the suite to run, see test results as the suite executes, and 
re-run the failures from the previous execution.


Yours,
Russ Magee %-)


On Tue, Mar 24, 2015 at 6:27 PM, Gergely Polonkai > wrote:


Hello,

I have a pretty extended test suite for my application, which can
run for about 15 minutes. Now when I introduce an error, I will be
notified of it pretty late, and a one-liner fix needs another 15
minutes to check. Of course if only one of my tests fail, I can
add the name of the test case as a parameter to manage.py test,
but in case of many failures it’s pretty hard to do the same.

Is there a way to run only the tests that failed last time, even
if I have to install a separate app/module for that? A quick
Google search gave me no usable results.

Best,
Gergely
-- 
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 post to this group, send email to django-users@googlegroups.com
.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/CACczBU%2B-SR3uASD_eQc_c%2BKFp%3DvCgaWga6pfUgA%2BJHr5HgkCHQ%40mail.gmail.com

.
For more options, visit https://groups.google.com/d/optout.


--
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 post to this group, send email to django-users@googlegroups.com 
.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJxq84-hZn2VOe_dHRS63BXTmFJ8h3pbdsuKgQE1uFJo6csBZw%40mail.gmail.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55127937.3090406%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time

Hello Carl,

thanks, I will take a look at this, too!

Best,
Gergely

On 24 March 2015 at 23:33, Carl Meyer  wrote:

> Hi Gergely,
>
> On 03/24/2015 04:27 AM, Gergely Polonkai wrote:
> > I have a pretty extended test suite for my application, which can run
> > for about 15 minutes. Now when I introduce an error, I will be notified
> > of it pretty late, and a one-liner fix needs another 15 minutes to
> > check. Of course if only one of my tests fail, I can add the name of the
> > test case as a parameter to manage.py test, but in case of many failures
> > it’s pretty hard to do the same.
> >
> > Is there a way to run only the tests that failed last time, even if I
> > have to install a separate app/module for that? A quick Google search
> > gave me no usable results.
>
> I use py.test [1], another test runner which has plugins that offer this
> feature. The pytest-django [2] plugin provides the necessary integration
> to make py.test able to run a normal Django test suite. Then the
> pytest-cache [3] plugin offers an ``--lf`` (last-failed) option to run
> only the tests that failed in the last run, and the pytest-xdist [4]
> plugin offers the even-more-advanced ``--looponfail`` option, which "run
> your tests repeatedly in a subprocess. After each run py.test waits
> until a file in your project changes and then re-runs the previously
> failing tests. This is repeated until all tests pass after which again a
> full run is performed."
>
> If you're interested in advanced Python testing, I think py.test is near
> the top of the list of tools you should at least take for a spin.
>
> Carl
>
> [1] http://pytest.org/latest/
> [2] https://pypi.python.org/pypi/pytest-django/
> [3] https://pypi.python.org/pypi/pytest-cache
> [4] https://bitbucket.org/pytest-dev/pytest-xdist
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5511E627.8090409%40oddbird.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBUL4JS184G5Fx_kLQx59i2FVwhgcnp5K0nMD5uHGh3sppQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time

Hi Gergely,

On 03/24/2015 04:27 AM, Gergely Polonkai wrote:
> I have a pretty extended test suite for my application, which can run
> for about 15 minutes. Now when I introduce an error, I will be notified
> of it pretty late, and a one-liner fix needs another 15 minutes to
> check. Of course if only one of my tests fail, I can add the name of the
> test case as a parameter to manage.py test, but in case of many failures
> it’s pretty hard to do the same.
> 
> Is there a way to run only the tests that failed last time, even if I
> have to install a separate app/module for that? A quick Google search
> gave me no usable results.

I use py.test [1], another test runner which has plugins that offer this
feature. The pytest-django [2] plugin provides the necessary integration
to make py.test able to run a normal Django test suite. Then the
pytest-cache [3] plugin offers an ``--lf`` (last-failed) option to run
only the tests that failed in the last run, and the pytest-xdist [4]
plugin offers the even-more-advanced ``--looponfail`` option, which "run
your tests repeatedly in a subprocess. After each run py.test waits
until a file in your project changes and then re-runs the previously
failing tests. This is repeated until all tests pass after which again a
full run is performed."

If you're interested in advanced Python testing, I think py.test is near
the top of the list of tools you should at least take for a spin.

Carl

[1] http://pytest.org/latest/
[2] https://pypi.python.org/pypi/pytest-django/
[3] https://pypi.python.org/pypi/pytest-cache
[4] https://bitbucket.org/pytest-dev/pytest-xdist

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5511E627.8090409%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: Re-run only tests that failed last time

Hello Russ,

I've already installed the juno test runner, but a graphical tool cannot
hurt locally  I'll check it out tomorrow, thanks for the link!

Best,
Gergely
On 24 Mar 2015 23:22, "Russell Keith-Magee"  wrote:

> Hi Gergely,
>
> One option is to use a test suite GUI tool, like cricket:
>
> http://pybee.org/cricket
>
> Cricket lets you view your entire test suite as a tree, select subsets of
> the suite to run, see test results as the suite executes, and re-run the
> failures from the previous execution.
>
> Yours,
> Russ Magee %-)
>
>
> On Tue, Mar 24, 2015 at 6:27 PM, Gergely Polonkai 
> wrote:
>
>> Hello,
>>
>> I have a pretty extended test suite for my application, which can run for
>> about 15 minutes. Now when I introduce an error, I will be notified of it
>> pretty late, and a one-liner fix needs another 15 minutes to check. Of
>> course if only one of my tests fail, I can add the name of the test case as
>> a parameter to manage.py test, but in case of many failures it’s pretty
>> hard to do the same.
>>
>> Is there a way to run only the tests that failed last time, even if I
>> have to install a separate app/module for that? A quick Google search gave
>> me no usable results.
>>
>> Best,
>> Gergely
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CACczBU%2B-SR3uASD_eQc_c%2BKFp%3DvCgaWga6pfUgA%2BJHr5HgkCHQ%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJxq84-hZn2VOe_dHRS63BXTmFJ8h3pbdsuKgQE1uFJo6csBZw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBULt18gAbJT1-1OWEd2Xy%2Bsk-201%3D%2Bs1EYgJ9zveyo-Uaw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time

Hi Gergely,

One option is to use a test suite GUI tool, like cricket:

http://pybee.org/cricket

Cricket lets you view your entire test suite as a tree, select subsets of
the suite to run, see test results as the suite executes, and re-run the
failures from the previous execution.

Yours,
Russ Magee %-)


On Tue, Mar 24, 2015 at 6:27 PM, Gergely Polonkai 
wrote:

> Hello,
>
> I have a pretty extended test suite for my application, which can run for
> about 15 minutes. Now when I introduce an error, I will be notified of it
> pretty late, and a one-liner fix needs another 15 minutes to check. Of
> course if only one of my tests fail, I can add the name of the test case as
> a parameter to manage.py test, but in case of many failures it’s pretty
> hard to do the same.
>
> Is there a way to run only the tests that failed last time, even if I have
> to install a separate app/module for that? A quick Google search gave me no
> usable results.
>
> Best,
> Gergely
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACczBU%2B-SR3uASD_eQc_c%2BKFp%3DvCgaWga6pfUgA%2BJHr5HgkCHQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJxq84-hZn2VOe_dHRS63BXTmFJ8h3pbdsuKgQE1uFJo6csBZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time

@Erik: On the CI side, certainly, I will run all the tests upon each
commit. I want to utilize this thing only on my developer machine, so I can
do a quick run after I think I fixed a problem. Naturally, if those failing
tests are green, I will run the whole suite again.

Separating/tweaking my current tests is not really an option; the whole
project is pretty big, with some large apps (yes, those must be cut in
smaller pieces, but that’s not today’s work yet). It will happen, though,
but thanks for pointing it out!

@Ramiro Morales: This juno test runner seems promising, thank you for the
link!

On 24 March 2015 at 15:08, Ramiro Morales  wrote:

> On Tue, Mar 24, 2015 at 7:27 AM, Gergely Polonkai 
> wrote:
> > Hello,
> >
> > I have a pretty extended test suite for my application, which can run for
> > about 15 minutes. Now when I introduce an error, I will be notified of it
> > pretty late, and a one-liner fix needs another 15 minutes to check. Of
> > course if only one of my tests fail, I can add the name of the test case
> as
> > a parameter to manage.py test, but in case of many failures it’s pretty
> hard
> > to do the same.
> >
> > Is there a way to run only the tests that failed last time, even if I
> have
> > to install a separate app/module for that? A quick Google search gave me
> no
> > usable results.
>
> Mine found:
>
> https://pypi.python.org/pypi/django-juno-testrunner
>
> http://nose.readthedocs.org/en/latest/plugins/testid.html#looping-over-failed-tests
> plus https://github.com/django-nose/django-nose
>
> --
> Ramiro Morales
> @ramiromorales
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAO7PdF_-Km0%2BHC9jcJ%3DfvFJEJZqQoA_Xp_uSL6r0cTCSXjhN%2Bg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBU%2B3gm7COWJnJqCd80u12Upk%3DhFnfjpZGF7D1MnJfMb9WQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time

On Tue, Mar 24, 2015 at 7:27 AM, Gergely Polonkai  wrote:
> Hello,
>
> I have a pretty extended test suite for my application, which can run for
> about 15 minutes. Now when I introduce an error, I will be notified of it
> pretty late, and a one-liner fix needs another 15 minutes to check. Of
> course if only one of my tests fail, I can add the name of the test case as
> a parameter to manage.py test, but in case of many failures it’s pretty hard
> to do the same.
>
> Is there a way to run only the tests that failed last time, even if I have
> to install a separate app/module for that? A quick Google search gave me no
> usable results.

Mine found:

https://pypi.python.org/pypi/django-juno-testrunner
http://nose.readthedocs.org/en/latest/plugins/testid.html#looping-over-failed-tests
plus https://github.com/django-nose/django-nose

-- 
Ramiro Morales
@ramiromorales

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO7PdF_-Km0%2BHC9jcJ%3DfvFJEJZqQoA_Xp_uSL6r0cTCSXjhN%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time


> Den 24/03/2015 kl. 11.27 skrev Gergely Polonkai :
> 
> I have a pretty extended test suite for my application, which can run for 
> about 15 minutes. Now when I introduce an error, I will be notified of it 
> pretty late, and a one-liner fix needs another 15 minutes to check. Of course 
> if only one of my tests fail, I can add the name of the test case as a 
> parameter to manage.py test, but in case of many failures it’s pretty hard to 
> do the same.
> 
> Is there a way to run only the tests that failed last time, even if I have to 
> install a separate app/module for that? A quick Google search gave me no 
> usable results.

Only re-running failed tests partly defeats the purpose of testing. Your fix 
for failing test case A may introduce a failure in test case B.

Instead, I would look into either tweaking you very slow test so they run 
faster, or splitting up your test cases into fast and slow tests, so you can 
run your slow tests less frequently depending on some setting.

Erik

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4A592356-7DB3-44B5-8ACC-332B4811E40D%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.


Re: Re-run only tests that failed last time

If you have created packages for your tests, you can run all tests in a
package. If the tests aren't in the same package, it won't help you however.

Regards,

Andréas

2015-03-24 11:27 GMT+01:00 Gergely Polonkai :

> Hello,
>
> I have a pretty extended test suite for my application, which can run for
> about 15 minutes. Now when I introduce an error, I will be notified of it
> pretty late, and a one-liner fix needs another 15 minutes to check. Of
> course if only one of my tests fail, I can add the name of the test case as
> a parameter to manage.py test, but in case of many failures it’s pretty
> hard to do the same.
>
> Is there a way to run only the tests that failed last time, even if I have
> to install a separate app/module for that? A quick Google search gave me no
> usable results.
>
> Best,
> Gergely
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACczBU%2B-SR3uASD_eQc_c%2BKFp%3DvCgaWga6pfUgA%2BJHr5HgkCHQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUbnx9KRCi%2BNSCbLsUp3Hym9V5DWcBSFuw%3D5-cK5HTwMyjA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: how to put files in different dirs

yes , what i mean is "media files".
there are so many file,may be several thousands ,to be uploaded from client to 
server. 
if all files in one dir , it'll be slow. 
but i don't find any way  put files in different dirs just using django.
now i write a function to put  files in different dirs ,but it complex.
is there any easy way ?
Thanks ! 



163 email

From: Rodrigo Zayit
Date: 2015-02-25 23:36
To: django-users
CC: paiis314
Subject: Re: how to put files in different dirs
Hi!


I didn't understand your question. You don't need to put all your files in the 
same dir... you can create folders like "images", "images/products", "css", 
"js", etc
Or are you asking about "media files"? I mean, files that will be uploaded 
through admin area...?


Best regards,
Rodrigo Zayit

On Wednesday, 4 February 2015 11:50:11 UTC-2, 老张 wrote:
hi . Guys
i'm designing a django web site,which produce many files.
if all these files are in ONE directory。i'm afraid that performance is a 
problem.
even i can put many entries in  stattic-dirs in setting.py.but it seems only 
one entry in stattic-dirs be used
Can anyone tell me how  i  can put files in different dirs , or in different 
dirs with same parent dir ?
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/12150c6c-e90e-414c-be8b-e77d4d220308%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/201502260930373900639%40163.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: how to have popup window and print it

Thanks Rafael E. Ferrero a lot . this is what I want.
Web programing is really hard to me as a shell programmer.
Hope I can know it well soon.




163 email

From: Rafael E. Ferrero
Date: 2015-01-28 19:30
To: django-users
Subject: Re: how to have popup window and print it
IMHO - You can't find anything in Django because it's not a Django problem.
The popup windows you can do it a little of javascript [1] and for print you 
can do a button in html and use javascript for print the page 
onclick="javascript:window.print();" (something like this, i think)



Fill with data your popup it's a Django job... with views you can solve it.

[1]-http://www.quirksmode.org/js/popup.html



--
Rafael E. Ferrero



2015-01-28 0:08 GMT-03:00 163 email :

hi.
i'm new to django. i'm try using django1.7 with jquery ,bootstrap.
 Now i have a webpage , i want:
  when click a  link , there is  a new popup window, and form with data from 
database 
  in  popup window,and then print contend in the popup window.
but i did not find how to do it just using django in doc of django.
is there anybody can tell me how to do it with  example code .
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/201501281108172507659%40163.com.
For more options, visit https://groups.google.com/d/optout.



-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJJc_8UZz644q34Snj7KiGjh2FMN4avq02MyNoORGaakSXX8iw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/201501290844456256107%40163.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

Ah it works. After I restarted Django and hit F5 again it re-orders it now. 
So the code above is the solution. 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/49953ca8-9cf5-4eae-acfa-ecfc40f4ad44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

It still complained about the request, but I was finally able to get it to 
work using this code:
def __init__(self, request, *args, **kwargs):
super(CustomContactForm, self).__init__(request=request, *args, **
kwargs)
fields_keyOrder = ['name', 'reason', 'email', 'body']
if (self.fields.has_key('keyOrder')):
self.fields.keyOrder = fields_keyOrder
else:
self.fields = OrderedDict((k, self.fields[k]) for k in 
fields_keyOrder)


However it still does not re-order the fields, I searched stackoverflow 
again and found this for Django 1.7: 
https://github.com/pennersr/django-allauth/issues/356#issuecomment-24758824
But it still does not work. The order doesn't change it all. sigh :(

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f9ad446d-432d-40bd-90c7-7bbb9d484b5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?


>
> So pass the request
>

def __init__(self, request, *args, **kwargs):

self.request=request
super(CustomContactForm, self).__init__(*args, **kwargs) 

self.fields.keyOrder = ['name', 'reason', 'email', 'body'] 

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f0dea9b0-9269-430f-8dd1-5cf20fb3a64d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

Unfortunately this doesn't work as the contact form needs to be passed the 
request as well. I tried to modify the call to super but it didn't work.

As a workaround what I did now was to look at the HTML Code that the tag {{ 
form.as_p }} creates, and copy and paste that into the HTML template 
instead of using {{ form.as_p }}. Then I can freely shuffle around my 
fields, however for stuff like Choice Widgets, I need to supply the options 
in the HTML code as well, which is quite troublesome. 

So far I still haven't found a real solution. :(

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/080a9ff8-2a05-4af6-aba6-075530e40f8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re-Order rendering of input fields of django-contact-form?

Try

def __init__(self, *args, **kwargs):
super(CustomContactForm, self).__init__(*args, **kwargs)
self.fields.keyOrder = ['name', 'reason', 'email', 'body']


On Tuesday, January 20, 2015 at 11:26:01 PM UTC+2, Tobias Dacoir wrote:
>
> I'm using django-contact-form which allows me to subclass it and add 
> custom fields to it. However all my added fields will appear at the bottom. 
> I even tried overwriting the original fields but still the order they 
> appear is wrong. How can I control this? I tried searching for an answer, 
> but only found ModelForm info that didn't work as the parent just inherits 
> from forms.Form and is not a ModelForm.
>
> Parent Class cound be found here: 
> https://bitbucket.org/ubernostrum/django-contact-form/src/4b7d2fa20c1d01568fb7c4c800155378e176923b/contact_form/forms.py?at=default
>
> My overwritten class:
> class CustomContactForm(ContactForm):
> REASON = (
> ('support', 'Support'),
> ('feedback','Feedback'),
> )
> reason = forms.ChoiceField(choices=REASON, label='Reason')
> name = forms.CharField(max_length=100,
>label=u'Your name')
> email = forms.EmailField(max_length=200,
>  label=u'Your email address')
> body = forms.CharField(widget=forms.Textarea,
>   label=u'Your message')
>
>
>
> and my template:
> {% extends 'base.html' %}
>
> {% block body_block %}
> Contact Form
>   To send us a message fill out the below form.
> {% csrf_token %}
> {{ form.as_p }}
> 
>   
> {% endblock %}
>
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6b0ae083-59df-48d6-bc29-f6f9ae6878af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: prob. with non-related objects deleted

No problem. If you are happy with the functionality, then keep it simple
and go with what you know.

However, I would highly, highly recommend that you do not rely on system
level packages for application development (such as those installed as .deb
packages). I would move your entire project into a Python virtual
environment and manage all package versions via pip. It is definitely worth
a Google...

If you have any plans to make it a long-standing project, future developers
who look at your code will thank you.

-James

On Tue, Jan 6, 2015 at 1:08 PM,  wrote:

>  thank you for your answer, james.
>
> i had a quick look, but unfortunatly, both are not readily available as
> .deb packages for python3, so i just just had some tries and came away with
> the following solution. in the previously mentioned "removeEntry" method, i
> changed the "with" block to the following:
>
>  with transaction.atomic():
> if self.prev_entry == self.next_entry:
> self.prev_entry.next_entry = self.prev_entry
> self.prev_entry.prev_entry = self.prev_entry
> self.prev_entry.save()
> else:
> self.prev_entry.next_entry = self.next_entry
> self.prev_entry.save()
> self.next_entry.prev_entry = self.prev_entry
> self.next_entry.save()
> self.next_entry = None
> self.prev_entry = None
> self.save()
> self.delete()
>
>  now it works as it should. i have a feeling that in the previous
> version, when there where only 2 entries left, self.prev_entry.next_entry
> and self.next_entry.prev_entry were different objects in django, although
> they are the same database objects.
>
> best regards
>
>
> tom
>
>
> *Gesendet:* Dienstag, 06. Januar 2015 um 12:56 Uhr
> *Von:* "James Schneider" 
> *An:* django-users@googlegroups.com
> *Betreff:* Re: prob. with non-related objects deleted
>
> This looks a lot like a basic MPTT tree. Have you looked at django-mptt or
> django-treebeard? Either of those packages could probably save you a ton of
> headache here, assuming that your lists contain all of the same type of
> model, which it appears they do.
>
>
> http://django-mptt.github.io/django-mptt/overview.html#what-is-modified-preorder-tree-traversal
>
> https://tabo.pe/projects/django-treebeard/docs/tip/
>
> -James
> On Jan 6, 2015 3:30 AM,  wrote:
>>
>> hello all,
>>
>> my problem is the following (the models.py is attached):
>> i want to implement a double-linked list (type BasicEntry) with the first
>> entry having an empty name. each entry has two attributes prev_entry and
>> next_entry to its neigbours. the first entry is created automaticaly and
>> should never be removed. upon removing the second to last entry (using the
>> function removeEntry), the last entry is also removed, although i do not
>> know why. i tracked it down to the "collect" function in "deletion.py" on
>> line 190:
>>
>> for related in model._meta.get_all_related_objects(
>> include_hidden=True, include_proxy_eq=True):
>>
>> do i misunderstand django or is this a known problem or "feature"?
>> although i think i removed all references from the to be removed entry to
>> the other entries...
>>
>>
>> class BasicEntry(models.Model):
>> name = models.CharField(max_length=10)
>> entry_col = models.ForeignKey(EntryCollection)
>> next_entry = models.ForeignKey('BasicEntry', related_name='next',
>> null=True, default=None)
>> prev_entry = models.ForeignKey('BasicEntry', related_name='prev',
>> null=True, default=None)
>>
>> def addEntry(self, name):
>> try_nr = 1
>> new_entry = None
>> while True:
>> try:
>> with transaction.atomic():
>> new_entry = BasicEntry(name=name,
>>entry_col=self.entry_col,
>>next_entry=self.next_entry,
>>prev_entry=self)
>> new_entry.save()
>> self.next_entry.prev_entry = new_entry
>> self.next_entry.save()
>> self.next_entry = new_entry
>> if self.prev_entry == self:
>> self.prev_entry = new_entry
>> self.save()
>> except IntegrityError as e:
>> print('addEntry: try %d' %(try_nr))
>> try_nr += 1
>> if try_nr >= DB_Transaction_Tries:
>> raise(e)
>> time.sleep(DB_Transaction_sleep)
>> else:
>> break
>> return(new_entry)
>>
>> def removeEntry(self):
>> if self.name == '':
>>   

Re: Re: How to make database queries that “filters” results according to tuples of values?

Remember that |= is just a shorthand for

query = query | ... rest of parameters

So in the end it is just an "or" like you say, nothing magical about that

Glad I could help

Regards!

On Thu, Nov 27, 2014 at 4:56 AM,  wrote:

> Hi Vijay,
>
> thank you very much. I have not known, that |= also could be used on Q().
> Thought Q is only there for making "or" "not" and so stuff of calls! Great!
>
> Best Regards,
> Mike
>
> *Gesendet:* Mittwoch, 26. November 2014 um 20:30 Uhr
> *Von:* "Vijay Khemlani" 
> *An:* django-users@googlegroups.com
> *Betreff:* Re: How to make database queries that “filters” results
> according to tuples of values?
>  I think you could construct a Q object like this:
>
> from django.db.models import Q
>
> query = Q()
> for preference in user.preferences.all():
> query |= Q(dish=preference.dish) & Q(ingredient=preference.ingredient)
>
> Meal.objects.filter(query)
>
> That returns the meals where their (ingredient, dish) combination match at
> least one of the preferences of the user.
>
> On Wed, Nov 26, 2014 at 3:54 PM,  wrote:
>>
>>   Hi,
>> let’s assume I have the following model:
>>
>> *class Ingredient(models.Model):*
>> *ingredient= models.CharField(max_length=255)*
>> *class Dish(models.Model):*
>> *BREAKFAST = 'bf'*
>> *LUNCH = 'l'*
>> *DINNER = 'D'*
>> *DISH_CHOICES = (*
>> *(BREAKFAST, 'Breakfast'),*
>> *(LUNCH, 'Lunch'),*
>> *(DINNER, 'Dinner'),*
>> *)*
>> *dish =
>> models.CharField(max_length=32,choices=DISH_CHOICES,unique=True)*
>>
>> *class Preference(models.Model):*
>> *ingredient= models.ForeignKey(Ingredient)*
>> *dish = models.ForeignKey(Dish)*
>> *date_created = models.DateTimeField(auto_now_add=True)*
>> *date_updated = models.DateTimeField(auto_now=True,
>> verbose_name='Date updated')*
>> *owner  = models.ForeignKey(User, related_name='preferences')*
>>
>> *class Meal(models.Model):*
>> *name = models.CharField(max_length=255)*
>> *ingredient= models.ManyToManyField(Ingredient)*
>> *kalorins = models.IntegerField()*
>> *thumbnail = models.URLField(blank=True)*
>> *dish= models.ForeignKey(Dish)*
>>
>> I want to execute a database query in the view resulting all meals that
>> would match the preference’s of a user.
>> But something like: *result =
>> Meal.objects.filter(ingredient__in=user.request.name.pfreferences) *will
>> select all the meals witch are in the preference list of the user,
>> regardless his choice of the “Dish Type”. So if a person only likes tomatos
>> for breakfast, he also will get all meals with tomates for lunch and dinner.
>>
>> So I am looking for a way, which returns only the “*Meal*s” where the
>> *ingredient*s and the *dish *BOTH match the *ingredient*s and the *dish *of
>> the *user’s Preference.*
>> I haven’t found anything in the django books I have or the documentation
>> Thanks a lot.
>> Best Regards,
>> Mike
>>
>>
>>
>>
>> --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/trinity-f0d51c02-a559-4c2a-b1d1-e807598864ff-1417028087688%403capp-gmx-bs08
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALn3ei0t_uWYDK7wk9ems1M9ZV8vRuXbTVT9MSTynuxUGhYWiQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> 

Re: re-apply migrations on restored database

a ha!

I see the table on the restored database. I always though that running the
dump.sql would build an exact copy of the original database, but now I'm
thinking it just drops and rebuilds the existing original tables. I will
manually drop my dev database and then restore the dump again... and see
what happens...

Thanks,
H.

2014-10-30 15:14 GMT-03:00 Markus Holtermann :

> Hey Hector,
>
> There is a database table called "django_migrations" that is used to keep
> track of the applied migrations. I guess it's not documented, because
> touching it shouldn't ever be necessary.
>
> It would be interesting to see how you ended up in a state that Django
> thinks all migrations have been applied, though.
>
> /Markus
>
>
> On October 30, 2014 7:07:02 PM CET, "Héctor Urbina" 
> wrote:
>>
>> Hello,
>>
>> I'm working on a development branch for a django (1.7) project. I have a
>> couple of migrations, including a data migration, in this branch; and I
>> already applied the migrations. After that, I took a dump of the production
>> database (which didn't have those migrations, of course) and restored it to
>> use in development. So, first thing I need to do is to re-apply all the
>> development migrations to the database "again", but django says "no
>> migrations to apply".
>>
>> I can't find in the documentation how is that django knows what
>> migrations have been applied so far, or if there is a way of changing that,
>> in order to re-apply them.
>>
>> Any help would be appreciated,
>>
>> Hector.
>>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>



-- 
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADHcORiTRXK7RMWvgRXf4Fvqpekw5kryN0tKqyh977wqWdfzqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: re-apply migrations on restored database

Hey Hector,

There is a database table called "django_migrations" that is used to keep track 
of the applied migrations. I guess it's not documented, because touching it 
shouldn't ever be necessary.

It would be interesting to see how you ended up in a state that Django thinks 
all migrations have been applied, though.

/Markus

On October 30, 2014 7:07:02 PM CET, "Héctor Urbina"  wrote:
>Hello,
>
>I'm working on a development branch for a django (1.7) project. I have
>a
>couple of migrations, including a data migration, in this branch; and I
>already applied the migrations. After that, I took a dump of the
>production
>database (which didn't have those migrations, of course) and restored
>it to
>use in development. So, first thing I need to do is to re-apply all the
>development migrations to the database "again", but django says "no
>migrations to apply".
>
>I can't find in the documentation how is that django knows what
>migrations
>have been applied so far, or if there is a way of changing that, in
>order
>to re-apply them.
>
>Any help would be appreciated,
>
>Hector.
>
>-- 
>Héctor Urbina S.
>Ingeniero en Bioinformática
>Fono: 82049138
>
>-- 
>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 post to this group, send email to django-users@googlegroups.com.
>Visit this group at http://groups.google.com/group/django-users.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/django-users/CADHcORjtM2ywhbMGZWDrsatReCz1_H76JrX_axo6mysTL-xH2Q%40mail.gmail.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/EB185059-7189-43EE-BCBA-77EBCB83AB9C%40markusholtermann.eu.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Upgrading Django (to 1.7)

Fred, thanks a jillion for the excellent advice! I obviously missed that 
bit in the data migration boilerplate.

On Saturday, September 27, 2014 9:29:10 AM UTC-5, Fred Stluka wrote:
>
>  Bob,
>  
> Are you referring directly to the models by name in the data 
> migrations?  That could be the problem, because yes, the migration
> would be using the latest models at the time that the migration is
> executed, not the models as they stood at the time that the 
> migration was written.
>
> There's a warning in a comment in the boilerplate code generated
> for each data migration by the command:
> % manage datamigration  
>
> It says:
>
> def forwards(self, orm):
> "Write your forwards methods here."
> # Note: Don't use "from appname.models import ModelName". 
> # Use orm.ModelName to refer to models in this application,
> # and orm['appname.ModelName'] for models in other applications.
>
> and there is a dictionary of the models as they existed at that
> time shown later in the same file.
>
> If you always follow this advice and manipulate orm.ModelName 
> instead of appname.models.ModelName, it should solve exactly 
> the problem you are describing.
>
> Hope this helps,
> --Fred 
> --
> Fred Stluka -- mailt...@bristle.com  -- 
> http://bristle.com/~fred/ 
> Bristle Software, Inc -- http://bristle.com -- Glad to be of service! 
> Open Source: Without walls and fences, we need no Windows or Gates. 
> --
>  
> On 9/27/14 10:00 AM, bobhaugen wrote:
>  
> The problem we ran into was not with the order of migrations, it was that 
> all of the migrations were running with the latest models.py code. The data 
> migration was trying to move data from one model field to another model 
> field, and the "from" field had been deleted from models.py.  
>
> This was awhile ago, and my memory might be faulty. Do the latest 
> migrations give you any way to deal with that situation? I mean, do they 
> migrate the models in models.py in sync with the the database schema 
> migrations? 
>
> I can see where a data migration might work in a schema migration sequence 
> if you expressed it all in SQL, just dealing with the database alone, but 
> we of course wrote in Python using the Django ORM.
>
> On Friday, September 26, 2014 10:04:49 AM UTC-5, Fred Stluka wrote: 
>>
>>  Bob,
>>
>> You can control the order in which migrations run.
>>
>> For South, see "depends_on" and "needed_by":
>> - http://south.readthedocs.org/en/latest/dependencies.html
>>
>> For Django 1.7 migrations, see "dependencies":
>> - https://docs.djangoproject.com/en/dev/topics/migrations/#dependencies
>>
>> --Fred 
>> --
>>
>>
>
>  
>  

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ddd6b3c9-71ba-4396-8c1d-9558eefd815a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Massive import in Django database

Hi, John:
Sorry! The pseudo code write by me is not correct, and It's slow..   I will 
come back tonight. 

With Regards,
Qiancong,Mo

From: moqianc...@gmail.com
Date: 2014-06-11 23:47
To: django-users
Subject: Re: Massive import in Django database
Hi, John:
I think your code is right, except "Doc.object" should be "Doc.objects";

The following pseudo code maybe fater than what you write:

doc_map = {}
for each xml:
extract from the xml data -> mydoc_code, mydoc_text, myRelated_doc_codes
doc = Doc.objects.create(doc_code=mydoc_code, doc_text=mydoc_text)
doc_map[mydoc_code] = (doc, myRelated_doc_codes)
for (doc, rcodes) in doc_map.values():
for rcode in rcodes:
doc.related_doc.add(doc_map[rcode])
doc.save()

I have checked, It's okay;
The object have be cached in doc_map, and no need re-query related_codes for 
related_doc from database,  the speed should speed up.

With Regards.




moqianc...@gmail.com

From: John Carlo
Date: 2014-06-11 21:14
To: django-users
Subject: Massive import in Django database
Hello everybody, 


I've fallen in love with Django two years ago and I've been using it for my job 
projects. In the past I found very useful information in this group, so a big 
thank you guys!


I have a little doubt.
I have to import in Django db (sqlite for local development, mySql on the 
server) about 1.000.000 xml documents.


The model class is the following:


class Doc(models.Model):
doc_code =  models.CharField(max_length=20, unique=True, primary_key=True, 
db_index = True) 

doc_text = models.TextField(null=True, blank=True) 
related_doc= models.ManyToManyField('self', null=True, blank=True, db_index 
= True) 



>From what I know bulk insertion is not possibile because I have a 
>ManyToManyField relation.


So I have this simple loop (in pseudo code)


for each xml:
   extract from the xml  date-> mydoc_code, mydoc_text, myRelated_doc_codes


   myDoc = Doc.object.get_or_create(doc_code = mydoc_code)[0]
   myDoc.doc_text = mydoc_text
   
   for reldoc_code in myRelated_doc_codes:
myRelDoc =  Doc.object.get_or_create(doc_code = reldoc_code )[0]
myDoc.related_doc.add(myRelDoc )


  myDoc.save()




I'm doing it right? Do you have some suggestions, recommendation? I fear that 
since I have 1.000.000 docs to import, it will take a lt of time, 
especially during the get_or_create routines


thank you in advance everybody!


John








 
-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5b88deaf-d806-4a64-9e8d-528d95599c80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2014061208110509465878%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Django Python roop

On Wed, Jun 11, 2014 at 8:12 AM, moqianc...@gmail.com
 wrote:
> write right code, write clean code,  It's a basic rule for our develope
> work.


for that you have to learn what the code means.  "while x !=[]:" will
always be an endless loop.  the "[]" doesn't do what you think.

-- 
Javier

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFkDaoR%2B4Ho8EBOJXs1eyn0NrrJGhfBa%2Bke7RSMT4Q4dut_LOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Django Python roop

Sometimes, I have to use while statement too. But any time, I think 
write right code, write clean code,  It's a basic rule for our develope work.




moqianc...@gmail.com

From: hito koto
Date: 2014-06-11 21:05
To: django-users
Subject: Re: Django Python roop

Hi, qiancong:
Thank you,
Do you not use the while statement to Django?


2014年6月11日水曜日 21時52分54秒 UTC+9 Qiancong:
 
Hi, hito koto:
I think  the problems you asked should be post in python-lang mail-list. 
For python program,  I prefer "for", not "while";  It's more simpler.
But  if you like while, I think the following code maybe helpful:

def fff(x):
y = []
i = 0
xlen = len(x)
while i< xlen:
y.append(x[i])
i += 1
return y

but I more like the follow writing:
def fff(x):
return x[:]

or you just do as following:
y  = x[:]

python is a power & beautiful language,   
please read the  https://docs.python.org/2/tutorial/ at first like  François 
said.

With Regards.




moqia...@gmail.com

From: hito koto
Date: 2014-06-11 19:21
To: django-users
Subject: Django Python roop
Hello, all

I want to change to while statement from for statement, so how can i do to?

this is my correct for statement codes:

def fff(x):
y = []
for i in range(len(x)):
y.append(x[i])
return y

and i want change to while statement 

So, this code have erroes:
TypeError: list indices must be integers, not list
def fff(x):
y = []
while x !=[]:
   for i in x:
   y.append(x[i])
return y

-- 


-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8afde78f-9910-4d26-b1e6-e5f1eaaca63b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2014061121121170324647%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Django Python roop

In your function, if x is not a empty list,  then while will be a infinite 
loop, x always not be  [];
then the inner for-loop  will append many many items into y list, Then your 
computer will say "have the Memory Error",  to tell you the memory not enought.





moqianc...@gmail.com

From: hito koto
Date: 2014-06-11 20:49
To: django-users
Subject: Re: Django Python roop
MemoryError , Why? idon't know.
I try this have Traceback (most recent call last):
  File "", line 1, in 
  File "", line 5, in foo
MemoryError errors:  

I'm change to this code: have the Memory Error,

def foo(x):
y = []
while x != []:
for i in range(len(x)):
y.append(x[i])
return y



2014年6月11日水曜日 20時21分42秒 UTC+9 hito koto:
Hello, all

I want to change to while statement from for statement, so how can i do to?

this is my correct for statement codes:

def fff(x):
y = []
for i in range(len(x)):
y.append(x[i])
return y

and i want change to while statement 

So, this code have erroes:
TypeError: list indices must be integers, not list
def fff(x):
y = []
while x !=[]:
   for i in x:
   y.append(x[i])
return y

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cae941c1-3af8-4ba7-9a1c-2d1232dbed9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2014061121074166965044%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Django python fuction

Thanks

2014年6月11日水曜日 10時37分43秒 UTC+9 Qiancong:
>
>  
> Yeah, I think hito koto need a function like copy.deepcopy.. I think he 
> known copy.deepcopy before(as his example said),  just not known how to 
> write a funtion work as copy.deecopy does for list.
>  
> --
>  moqia...@gmail.com 
>  
>  *From:* François Schiettecatte 
> *Date:* 2014-06-11 00:21
> *To:* django-users 
> *Subject:* Re: Django python fuction
>  Wouldn't the deep copy module handle this for you:
>  
> https://docs.python.org/2/library/copy.html
>  
> François
>  
> On Jun 10, 2014, at 12:17 PM, hito koto  
> wrote:
>  
> > Hi,  Qiancong :
> > 
> > I was looking for exactly this、
> > Thank you ver much!
> > 
> > 
> > 2014年6月10日火曜日 23時35分52秒 UTC+9 Qiancong:
> > 
> > Hi, hito koto:
> > I think you want to deep copy the list. The following code maybe  
> helpful:
> > def dcopy(obj):
> > if not isinstance(obj, list):
> > return obj
> > return [dcopy(x) for x in obj]
> >  
> > But this function only deep copy for list.  You can change code as what 
> I did for dic, set, tuple , etc ..
> > moqia...@gmail.com
> >  
> > From: François Schiettecatte
> > Date: 2014-06-10 22:07
> > To: django-users
> > Subject: Re: Django python fuction
> > You need to use .append() to add elements to a list, I suggest you take 
> a look at the python tutorial:
> >  
> > https://docs.python.org/2/tutorial/
> >  
> > Not quite sure what you are doing with i or elem either.
> >  
> > François
> >  
> > On Jun 10, 2014, at 10:01 AM, hito koto  wrote:
> >  
> > > So, I also have errors:
> > >
> > >
> > > >>> def foo(x):
> > > ... myList = []
> > > ... if isinstance(x, list):
> > > ... for i in x:
> > > ... elem = i
> > > ... return myList + foo(elem)
> > > ... else:
> > > ... return 1
> > > ...
> > > >>>
> > > >>> foo(a)
> > > Traceback (most recent call last):
> > >   File "", line 1, in 
> > >   File "", line 6, in foo
> > >   File "", line 6, in foo
> > > TypeError: can only concatenate list (not "int") to list
> > >
> > >
> > >
> > >
> > >
> > > 2014年6月10日火曜日 22時53分28秒 UTC+9 François Schiettecatte:
> > > You are redefining 'list' on  line 2, rename list to myList as follows:
> > >
> > > def foo(x):
> > > myList = []
> > > if isinstance(x, list):
> > > for i in x:
> > > elem = i
> > > return myList + foo(i)
> > > else:
> > > return 1
> > >
> > > And take this to a python list, this is for django.
> > >
> > > Cheers
> > >
> > > François
> > >
> > >
> > > On Jun 10, 2014, at 9:43 AM, hito koto  wrote:
> > >
> > > > hi,
> > > >
> > > > I have this erroes:
> > > >
> > > > >>> def foo(x):
> > > > ... list = []
> > > > ... if isinstance(x, list):
> > > > ... for i in x:
> > > > ... elem = i
> > > > ... return list + foo(i)
> > > > ... else:
> > > > ... return 1
> > > > ...
> > > > >>> foo(a)
> > > > Traceback (most recent call last):
> > > >   File "", line 1, in 
> > > >   File "", line 3, in foo
> > > > TypeError: isinstance() arg 2 must be a class, type, or tuple of 
> classes and types
> > > >
> > > >
> > > >
> > > > 2014年6月10日火曜日 22時27分42秒 UTC+9 Andrew Farrell:
> > > > In general, I recommend adding the line "import pdb;pdb.set_trace()"
> > > > to the top of your function and walking through it to see why it 
> doesn't work.
> > > >
> > > > def foo(x):
> > > > import pdb;pdb.set_trace()
> > > >
> > > > list = []
> > > > if isinstance(x, list):
> > > > for i in x:
> > > > elem = i
> > > > return list + foo(i)
> > > > else:
> > > > return 1
> > > >
> > > > See https://docs.python.org/2/library/pdb.html on how pdb works.
> > > > There are faster ways to debug, but when starting out, pdb lets you 
> see what is happening as you run the function.
> > > >
> > > >
> > > > Some questions I have about this function:
> > > > - What is the purpose of the "elem" function? It is never accessed.
> > > > - What is the purpose of returning 1 if the argument is not a list?
> > > > - Why is it named "foo" rather than something that tells me what the 
> purpose of the function is?
> > > >
> > > >
> > > > On Tue, Jun 10, 2014 at 8:16 AM, hito koto  
> wrote:
> > > > Hello,
> > > >
> > > > I don't know how can i do to change to write python function
> > > > I want to following code change to write python function or change 
> to write  recursive definition
> > > > >>> y = [10, 12, [13, [14, 9], 16], 7]
> > > > >>> z = copy.deepcopy(y)
> > > > >>> y
> > > > [10, 12, [13, [14, 9], 16], 7]
> > > > >>> z
> > > > [10, 12, [13, [14, 9], 16], 7]
> > > > >>> z[2][1][1]
> > > > 9
> > > > >>> z[2][1][1] = 88
> > > > >>> z
> > > > [10, 12, [13, [14, 88], 16], 7]
> > > > 

  1   2   3   4   5   >