Re: convert python 3 to python2

2019-09-24 Thread Andréas Kühne
Official access isn't denied - and python 2 will probably be available. The
problem is that you don't get any security fixes or any updates at all.
That in itself is a major problem. If someone is saying that you need to
use python 2, I would strongly recommend them to not even think about it.
All code that is written will be useless in a couple of years time, and
need to be updated or even worse thrown away.

Regards,

Andréas


Den sön 22 sep. 2019 kl 12:14 skrev Ankita Gupta :

>
>
> On Saturday, September 21, 2019 at 11:07:21 PM UTC+5:30, Sipum wrote:
>>
>> Hi Ankita,
>>
>> In coming January, python 2 is going to retire. So better to use python 3.
>>
> Only official access is denied, we can still work in python2. Anyway
> thanks.
>
>>
>>
>
>> Thanks
>>
>> On Sat, 21 Sep, 2019, 11:02 PM Ankita Gupta, 
>> wrote:
>>
>>> Not related to Django, I have a project made in python3 but due to some
>>> package installation, i need to convert my project to python2. Is there any
>>> method or package to solve this?
>>>
>>> --
>>> You received this message because you are 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/875549f9-5bca-4280-88fd-db197ca577dc%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/408bd2a0-add7-450d-a004-d5fc22bc4b45%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/CAK4qSCcHdvrNXoYf3t%2Bt4C%2Bk7WjQjj_z2nz6TNXB4ehtOiAfFQ%40mail.gmail.com.


Re: request module

2019-09-24 Thread dandu sreenivasulu
Thanks Deep, i will raise on stackoverflow...


On Tue, Sep 24, 2019 at 9:39 AM Deep Sukhwani 
wrote:

> The right place for this would be "requests" community -
> https://2.python-requests.org/en/master/community/support/#e-mail
>
> The best immediate course of action would be to post a question on
> stackoverflow.com and tag the question with *python-requests*
>
> --
> Regards
> Deep L Sukhwani
>
>
> On Mon, 23 Sep 2019 at 18:11, dandu sreenivasulu 
> wrote:
>
>> Hi All,
>>  can someone please help on below request
>>
>> url = 'http://abc.com/'
>> response = requests.get(url)# 
>> url1 = response.url # http://xyz.com --> when we access abc.com url it
>> will redirect to xyz.com url and there we have to entere username and
>> password
>> print(url1) #xyz.com
>> print(response.url) #xyz.com
>> post_data = {
>> 'User Name': 'sr...@gmail.com',
>> 'Password': 'srinu123',
>> 'action':'btnLogin'
>> }
>> with requests.Session() as s:
>> r = s.post(url1, data=post_data)
>> r = s.post(url1, auth=HTTPBasicAuth('sr...@gmail.com', 'srinu123'))
>> print(response.status_code) # 200
>> print(response.text) # error //
>>
>> questions:
>> 1) what attributes i have to take from text filed ?
>>
>> User Id:
>> Passwor:
>>
>>
>>
>> --
>> You received this message because you are 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/406a807c-9979-42c6-b061-9a12d66cd65b%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/CAEMqiPd9XEK3H76tgJKw%2BdiUyPFBGHBLygqZ1FCwXY4xhmFgoQ%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/CAAZQr5vOPM%3DYssGQw6s36KyZZkLZABx1BQkOEbrEu90i9zD-SA%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
 wrote:
>
> Official access isn't denied - and python 2 will probably be available. The 
> problem is that you don't get any security fixes or any updates at all. That 
> in itself is a major problem. If someone is saying that you need to use 
> python 2, I would strongly recommend them to not even think about it. All 
> code that is written will be useless in a couple of years time, and need to 
> be updated or even worse thrown away.

This is totally untrue. Yes, all code should be converted to py3, but
that is simply not happing at many companies. They will continue to
use their py2 apps, and either support them internally or purchase py2
support from one of the many companies offering it. Is that a good
idea? No, but it's a reality.

-- 
You received this message because you are 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/CACwCsY4asgYPCoXVabOi4NABck-NfAsjOOsZN_1-MVQ07HZe7Q%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Deep Sukhwani
Wow, TIL there are companies selling support for Python 2? Never heard of
it. So basically we are saying these companies will maintain there own
version of Python programming language which will continue to be maintained
as long as they have paid users for Python 2? I seriously doubt that. Or
may be I am understanding it all wrong.


--
Regards
Deep L Sukhwani


On Tue, 24 Sep 2019 at 17:32, Larry Martell  wrote:

> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
>  wrote:
> >
> > Official access isn't denied - and python 2 will probably be available.
> The problem is that you don't get any security fixes or any updates at all.
> That in itself is a major problem. If someone is saying that you need to
> use python 2, I would strongly recommend them to not even think about it.
> All code that is written will be useless in a couple of years time, and
> need to be updated or even worse thrown away.
>
> This is totally untrue. Yes, all code should be converted to py3, but
> that is simply not happing at many companies. They will continue to
> use their py2 apps, and either support them internally or purchase py2
> support from one of the many companies offering it. Is that a good
> idea? No, but it's a reality.
>
> --
> You received this message because you are 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/CACwCsY4asgYPCoXVabOi4NABck-NfAsjOOsZN_1-MVQ07HZe7Q%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/CAEMqiPeL8KMsq9d7FhZGh%2B73dY7i3rhA7kxHKjpWnMA3K83S-w%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
Also large companies can do their own support.

On Tue, Sep 24, 2019 at 8:11 AM Deep Sukhwani  wrote:
>
> Wow, TIL there are companies selling support for Python 2? Never heard of it. 
> So basically we are saying these companies will maintain there own version of 
> Python programming language which will continue to be maintained as long as 
> they have paid users for Python 2? I seriously doubt that. Or may be I am 
> understanding it all wrong.
>
>
> --
> Regards
> Deep L Sukhwani
>
>
> On Tue, 24 Sep 2019 at 17:32, Larry Martell  wrote:
>>
>> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
>>  wrote:
>> >
>> > Official access isn't denied - and python 2 will probably be available. 
>> > The problem is that you don't get any security fixes or any updates at 
>> > all. That in itself is a major problem. If someone is saying that you need 
>> > to use python 2, I would strongly recommend them to not even think about 
>> > it. All code that is written will be useless in a couple of years time, 
>> > and need to be updated or even worse thrown away.
>>
>> This is totally untrue. Yes, all code should be converted to py3, but
>> that is simply not happing at many companies. They will continue to
>> use their py2 apps, and either support them internally or purchase py2
>> support from one of the many companies offering it. Is that a good
>> idea? No, but it's a reality.
>>
>> --
>> You received this message because you are 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/CACwCsY4asgYPCoXVabOi4NABck-NfAsjOOsZN_1-MVQ07HZe7Q%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/CAEMqiPeL8KMsq9d7FhZGh%2B73dY7i3rhA7kxHKjpWnMA3K83S-w%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/CACwCsY4Y%2BhYS_oLaUVC4pkRW-v_rrsjY38CwHR1Vv1%2Bt0gNZQA%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Deep Sukhwani
Thanks for the prompt reply. Did a quick cursory check with Anaconda, I
don't think Anaconda does it. In fact Anaconda has posted a few months ago
about Python 2's EOL (End of Life) -
https://www.anaconda.com/end-of-life-eol-for-python-2-7-is-coming-are-you-ready/

Also, just did a quick look at their professional services, couldn't see
anything suggesting they will offer python 2 support beyond the python 2's
community itself.

--
Regards
Deep L Sukhwani


On Tue, 24 Sep 2019 at 17:53, Larry Martell  wrote:

> Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
> Also large companies can do their own support.
>
> On Tue, Sep 24, 2019 at 8:11 AM Deep Sukhwani 
> wrote:
> >
> > Wow, TIL there are companies selling support for Python 2? Never heard
> of it. So basically we are saying these companies will maintain there own
> version of Python programming language which will continue to be maintained
> as long as they have paid users for Python 2? I seriously doubt that. Or
> may be I am understanding it all wrong.
> >
> >
> > --
> > Regards
> > Deep L Sukhwani
> >
> >
> > On Tue, 24 Sep 2019 at 17:32, Larry Martell 
> wrote:
> >>
> >> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
> >>  wrote:
> >> >
> >> > Official access isn't denied - and python 2 will probably be
> available. The problem is that you don't get any security fixes or any
> updates at all. That in itself is a major problem. If someone is saying
> that you need to use python 2, I would strongly recommend them to not even
> think about it. All code that is written will be useless in a couple of
> years time, and need to be updated or even worse thrown away.
> >>
> >> This is totally untrue. Yes, all code should be converted to py3, but
> >> that is simply not happing at many companies. They will continue to
> >> use their py2 apps, and either support them internally or purchase py2
> >> support from one of the many companies offering it. Is that a good
> >> idea? No, but it's a reality.
> >>
> >> --
> >> You received this message because you are 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/CACwCsY4asgYPCoXVabOi4NABck-NfAsjOOsZN_1-MVQ07HZe7Q%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/CAEMqiPeL8KMsq9d7FhZGh%2B73dY7i3rhA7kxHKjpWnMA3K83S-w%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/CACwCsY4Y%2BhYS_oLaUVC4pkRW-v_rrsjY38CwHR1Vv1%2Bt0gNZQA%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/CAEMqiPe-ZOJLbiXn2Qesk-dSC%2Bw8JYcAii81ecsL%2BpV%2B_7AFfA%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
You can get anyone to do anything for enough money.

On Tue, Sep 24, 2019 at 8:30 AM Deep Sukhwani  wrote:
>
> Thanks for the prompt reply. Did a quick cursory check with Anaconda, I don't 
> think Anaconda does it. In fact Anaconda has posted a few months ago about 
> Python 2's EOL (End of Life) - 
> https://www.anaconda.com/end-of-life-eol-for-python-2-7-is-coming-are-you-ready/
>
> Also, just did a quick look at their professional services, couldn't see 
> anything suggesting they will offer python 2 support beyond the python 2's 
> community itself.
>
> --
> Regards
> Deep L Sukhwani
>
>
> On Tue, 24 Sep 2019 at 17:53, Larry Martell  wrote:
>>
>> Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
>> Also large companies can do their own support.
>>
>> On Tue, Sep 24, 2019 at 8:11 AM Deep Sukhwani  wrote:
>> >
>> > Wow, TIL there are companies selling support for Python 2? Never heard of 
>> > it. So basically we are saying these companies will maintain there own 
>> > version of Python programming language which will continue to be 
>> > maintained as long as they have paid users for Python 2? I seriously doubt 
>> > that. Or may be I am understanding it all wrong.
>> >
>> >
>> > --
>> > Regards
>> > Deep L Sukhwani
>> >
>> >
>> > On Tue, 24 Sep 2019 at 17:32, Larry Martell  
>> > wrote:
>> >>
>> >> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
>> >>  wrote:
>> >> >
>> >> > Official access isn't denied - and python 2 will probably be available. 
>> >> > The problem is that you don't get any security fixes or any updates at 
>> >> > all. That in itself is a major problem. If someone is saying that you 
>> >> > need to use python 2, I would strongly recommend them to not even think 
>> >> > about it. All code that is written will be useless in a couple of years 
>> >> > time, and need to be updated or even worse thrown away.
>> >>
>> >> This is totally untrue. Yes, all code should be converted to py3, but
>> >> that is simply not happing at many companies. They will continue to
>> >> use their py2 apps, and either support them internally or purchase py2
>> >> support from one of the many companies offering it. Is that a good
>> >> idea? No, but it's a reality.
>> >>
>> >> --
>> >> You received this message because you are 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/CACwCsY4asgYPCoXVabOi4NABck-NfAsjOOsZN_1-MVQ07HZe7Q%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/CAEMqiPeL8KMsq9d7FhZGh%2B73dY7i3rhA7kxHKjpWnMA3K83S-w%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/CACwCsY4Y%2BhYS_oLaUVC4pkRW-v_rrsjY38CwHR1Vv1%2Bt0gNZQA%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/CAEMqiPe-ZOJLbiXn2Qesk-dSC%2Bw8JYcAii81ecsL%2BpV%2B_7AFfA%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/CACwCsY4gfoNpTBewvCo3-3z6J1WENrjkJkaxS7B160ot1cYXaQ%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Nick Sarbicki
I'm not convinced anyone could pay me enough to go back to Python 1...


On Tue, Sep 24, 2019 at 1:32 PM Larry Martell 
wrote:

> You can get anyone to do anything for enough money.
>
> On Tue, Sep 24, 2019 at 8:30 AM Deep Sukhwani 
> wrote:
> >
> > Thanks for the prompt reply. Did a quick cursory check with Anaconda, I
> don't think Anaconda does it. In fact Anaconda has posted a few months ago
> about Python 2's EOL (End of Life) -
> https://www.anaconda.com/end-of-life-eol-for-python-2-7-is-coming-are-you-ready/
> >
> > Also, just did a quick look at their professional services, couldn't see
> anything suggesting they will offer python 2 support beyond the python 2's
> community itself.
> >
> > --
> > Regards
> > Deep L Sukhwani
> >
> >
> > On Tue, 24 Sep 2019 at 17:53, Larry Martell 
> wrote:
> >>
> >> Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
> >> Also large companies can do their own support.
> >>
> >> On Tue, Sep 24, 2019 at 8:11 AM Deep Sukhwani 
> wrote:
> >> >
> >> > Wow, TIL there are companies selling support for Python 2? Never
> heard of it. So basically we are saying these companies will maintain there
> own version of Python programming language which will continue to be
> maintained as long as they have paid users for Python 2? I seriously doubt
> that. Or may be I am understanding it all wrong.
> >> >
> >> >
> >> > --
> >> > Regards
> >> > Deep L Sukhwani
> >> >
> >> >
> >> > On Tue, 24 Sep 2019 at 17:32, Larry Martell 
> wrote:
> >> >>
> >> >> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
> >> >>  wrote:
> >> >> >
> >> >> > Official access isn't denied - and python 2 will probably be
> available. The problem is that you don't get any security fixes or any
> updates at all. That in itself is a major problem. If someone is saying
> that you need to use python 2, I would strongly recommend them to not even
> think about it. All code that is written will be useless in a couple of
> years time, and need to be updated or even worse thrown away.
> >> >>
> >> >> This is totally untrue. Yes, all code should be converted to py3, but
> >> >> that is simply not happing at many companies. They will continue to
> >> >> use their py2 apps, and either support them internally or purchase
> py2
> >> >> support from one of the many companies offering it. Is that a good
> >> >> idea? No, but it's a reality.
> >> >>
> >> >> --
> >> >> You received this message because you are 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/CACwCsY4asgYPCoXVabOi4NABck-NfAsjOOsZN_1-MVQ07HZe7Q%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/CAEMqiPeL8KMsq9d7FhZGh%2B73dY7i3rhA7kxHKjpWnMA3K83S-w%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/CACwCsY4Y%2BhYS_oLaUVC4pkRW-v_rrsjY38CwHR1Vv1%2Bt0gNZQA%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/CAEMqiPe-ZOJLbiXn2Qesk-dSC%2Bw8JYcAii81ecsL%2BpV%2B_7AFfA%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/CACwCsY4gfoNpTBewvCo3-3z6J1WENrjkJkaxS7B160ot1cYXaQ%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/CAGuvt91fJFPuXikEg_UwL4psaUKEBAp43K2SRAj6OG%2B7_upg4A%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
Ha! How about perl? ;-)

On Tue, Sep 24, 2019 at 8:33 AM Nick Sarbicki  wrote:
>
> I'm not convinced anyone could pay me enough to go back to Python 1...
>
>
> On Tue, Sep 24, 2019 at 1:32 PM Larry Martell  wrote:
>>
>> You can get anyone to do anything for enough money.
>>
>> On Tue, Sep 24, 2019 at 8:30 AM Deep Sukhwani  wrote:
>> >
>> > Thanks for the prompt reply. Did a quick cursory check with Anaconda, I 
>> > don't think Anaconda does it. In fact Anaconda has posted a few months ago 
>> > about Python 2's EOL (End of Life) - 
>> > https://www.anaconda.com/end-of-life-eol-for-python-2-7-is-coming-are-you-ready/
>> >
>> > Also, just did a quick look at their professional services, couldn't see 
>> > anything suggesting they will offer python 2 support beyond the python 2's 
>> > community itself.
>> >
>> > --
>> > Regards
>> > Deep L Sukhwani
>> >
>> >
>> > On Tue, 24 Sep 2019 at 17:53, Larry Martell  
>> > wrote:
>> >>
>> >> Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
>> >> Also large companies can do their own support.
>> >>
>> >> On Tue, Sep 24, 2019 at 8:11 AM Deep Sukhwani  
>> >> wrote:
>> >> >
>> >> > Wow, TIL there are companies selling support for Python 2? Never heard 
>> >> > of it. So basically we are saying these companies will maintain there 
>> >> > own version of Python programming language which will continue to be 
>> >> > maintained as long as they have paid users for Python 2? I seriously 
>> >> > doubt that. Or may be I am understanding it all wrong.
>> >> >
>> >> >
>> >> > --
>> >> > Regards
>> >> > Deep L Sukhwani
>> >> >
>> >> >
>> >> > On Tue, 24 Sep 2019 at 17:32, Larry Martell  
>> >> > wrote:
>> >> >>
>> >> >> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
>> >> >>  wrote:
>> >> >> >
>> >> >> > Official access isn't denied - and python 2 will probably be 
>> >> >> > available. The problem is that you don't get any security fixes or 
>> >> >> > any updates at all. That in itself is a major problem. If someone is 
>> >> >> > saying that you need to use python 2, I would strongly recommend 
>> >> >> > them to not even think about it. All code that is written will be 
>> >> >> > useless in a couple of years time, and need to be updated or even 
>> >> >> > worse thrown away.
>> >> >>
>> >> >> This is totally untrue. Yes, all code should be converted to py3, but
>> >> >> that is simply not happing at many companies. They will continue to
>> >> >> use their py2 apps, and either support them internally or purchase py2
>> >> >> support from one of the many companies offering it. Is that a good
>> >> >> idea? No, but it's a reality.

-- 
You received this message because you are 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/CACwCsY4kf0r8Dyicw9_b1%2B5_SGRK4NM8%3D2JBTaCcVF2kxC5XeQ%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Andréas Kühne
Yes of course - I think RedHat will be continuing to support a python 2
environment because they haven't updated their own internal infrastructure
and also their distributions to python 3.

However - using one of those is still not very smart. The problem is that
all plugins have moved on. So Django, Flask, Numpy, Scipy, Mypy, Pypy and
so on are ported to python 3. The main argument still stands - why invest
money today into a language that is obsolete - and that you have had
several years notice to stop using? Porting to python 3 isn't that hard
either - there are a lot of tools to help you do that. I myself have ported
a website from python 2 to python 3, with tens of thousands rows of code.

So all you need to do is to set aside time to port the applications - and
if you don't do it now, you WILL need to do it later - that's a simple
fact. And then the code will be in the best case scenario obsolete, worst
case useless. I can't see one reason to invest a cent into writing python 2
code. I know that I am lucky to be able to define what I want to work with
and to set requirements and also have no legacy code. But even having
legacy code, it's just a matter of investing into your own application.

To say that it can't be done - look at Instagram - they did it with their
codebase, and I don't think that many of us are working on that size of
codebase.

Regards,

Andréas


Den tis 24 sep. 2019 kl 14:42 skrev Larry Martell :

> Ha! How about perl? ;-)
>
> On Tue, Sep 24, 2019 at 8:33 AM Nick Sarbicki 
> wrote:
> >
> > I'm not convinced anyone could pay me enough to go back to Python 1...
> >
> >
> > On Tue, Sep 24, 2019 at 1:32 PM Larry Martell 
> wrote:
> >>
> >> You can get anyone to do anything for enough money.
> >>
> >> On Tue, Sep 24, 2019 at 8:30 AM Deep Sukhwani 
> wrote:
> >> >
> >> > Thanks for the prompt reply. Did a quick cursory check with Anaconda,
> I don't think Anaconda does it. In fact Anaconda has posted a few months
> ago about Python 2's EOL (End of Life) -
> https://www.anaconda.com/end-of-life-eol-for-python-2-7-is-coming-are-you-ready/
> >> >
> >> > Also, just did a quick look at their professional services, couldn't
> see anything suggesting they will offer python 2 support beyond the python
> 2's community itself.
> >> >
> >> > --
> >> > Regards
> >> > Deep L Sukhwani
> >> >
> >> >
> >> > On Tue, 24 Sep 2019 at 17:53, Larry Martell 
> wrote:
> >> >>
> >> >> Anaconda, Enthought, ActiveState, Red Hat and maybe others as well.
> >> >> Also large companies can do their own support.
> >> >>
> >> >> On Tue, Sep 24, 2019 at 8:11 AM Deep Sukhwani <
> deepsukhw...@gmail.com> wrote:
> >> >> >
> >> >> > Wow, TIL there are companies selling support for Python 2? Never
> heard of it. So basically we are saying these companies will maintain there
> own version of Python programming language which will continue to be
> maintained as long as they have paid users for Python 2? I seriously doubt
> that. Or may be I am understanding it all wrong.
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Regards
> >> >> > Deep L Sukhwani
> >> >> >
> >> >> >
> >> >> > On Tue, 24 Sep 2019 at 17:32, Larry Martell <
> larry.mart...@gmail.com> wrote:
> >> >> >>
> >> >> >> On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
> >> >> >>  wrote:
> >> >> >> >
> >> >> >> > Official access isn't denied - and python 2 will probably be
> available. The problem is that you don't get any security fixes or any
> updates at all. That in itself is a major problem. If someone is saying
> that you need to use python 2, I would strongly recommend them to not even
> think about it. All code that is written will be useless in a couple of
> years time, and need to be updated or even worse thrown away.
> >> >> >>
> >> >> >> This is totally untrue. Yes, all code should be converted to py3,
> but
> >> >> >> that is simply not happing at many companies. They will continue
> to
> >> >> >> use their py2 apps, and either support them internally or
> purchase py2
> >> >> >> support from one of the many companies offering it. Is that a good
> >> >> >> idea? No, but it's a reality.
>
> --
> You received this message because you are 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/CACwCsY4kf0r8Dyicw9_b1%2B5_SGRK4NM8%3D2JBTaCcVF2kxC5XeQ%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/CAK4qSCdgjCPedFX8r1Z61GegRzaP8P4u%2BV%3Dz4NDqti7LfkSLKg%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread אורי
On Sat, Sep 21, 2019 at 8:32 PM Ankita Gupta 
wrote:

> Not related to Django...
>

Then write to python-l...@python.org

-- 
You received this message because you are 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/CABD5YeHwPs89%2BX-xWcbP4-c%2BnS6OrjQH9aMC-z%2BPA_hX8zZOcA%40mail.gmail.com.


[no subject]

2019-09-24 Thread Avi gehlot
Yo put in admin.py
Django.models import users

But
You put apptwo.models inport users
This way ...

On Tue, 24 Sep 2019 at 9:43 AM, Deep Sukhwani 
wrote:

> Are you supposed to be using a virtualenv and you don't have that
> activated?
>
> Can you run *pip freeze | grep -i django* and share the output?
>
> --
> Regards
> Deep L Sukhwani
>
>
> On Tue, 24 Sep 2019 at 09:40, MEGA NATHAN 
> wrote:
>
>> Hi.
>>
>>
>> i 'm meganathan from india i was doing django trining ,
>>
>> And i have one dout .mo module name found models
>>
>> *ModuleNotFoundError: No module named 'django.models'*
>>
>>
>>
>>
>>
>> *Regards*
>> *Meganathan,*
>>
>> --
>> You received this message because you are 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/f85f29b7-e3d9-4dfa-945f-70f1fb8e90f1%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/CAEMqiPe7rf4syuVUTEZVO%2BOMh7K-cvGX_yLsL0vhchNbTTfATw%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_t-_Ct-9tzG816JgJEY_Ad%2BK1jcAcAdeUuejBfX06cCEubOw%40mail.gmail.com.


Django developer server auto quit when iterate QuerySet in template

2019-09-24 Thread Huy Bùi
Hello,

 Everytime i try to access a url, the Django developer server auto quit 
without any log about what happens.
 After debugging a little bit, i find out if i remove this block of code in 
the template file, i can access the web page normally:

 
 
 {% for d in departments %}
  {{ d.name }} - {{ d.department_code }} 

 {% endfor %}
 

 But i can iterate the QuerySet in the view normally, it seems like there 
aren't any problem iterating the QuerySet:

def edit(request):
departments = Department.objects.filter()
for d in departments:
print(d.id, d.name, d.department_code)

return render(request, 'edit/edit.html', {'departments': departments})

 I have no idea what is happening and it's driving me crazy. Any help would 
be appreciated. 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/905973fa-6d90-4b45-bb69-ffcc787d2524%40googlegroups.com.


creating school year

2019-09-24 Thread Rain
i have a question how to create school year with start date and end date 
all transaction must under this year. Thanks..

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4e3ad7a5-a1c2-4c0d-ae17-57f98f9df975%40googlegroups.com.


django.contrib.auth: Confusion about AuthenticationForm.confirm_login_allowed

2019-09-24 Thread Christian Franke
Hello,

I am a bit confused about the relation and separation of
responsibilities between `AuthenticationForm.confirm_login_allowed` and
`ModelBackend.user_can_authenticate`.

When `AuthenticationForm` is used together with `ModelBackend`, we will
never call `AuthenticationForm.confirm_login_allowed` for an inactive
account, because `ModelBackend.authenticate` will never return an
inactive user, as `ModelBackend.user_can_authenticate` will return
`False` for inactive users. So the error message "This account is
inactive." is never shown for this combination of Form and Backend, and
the error message will always be about an incorrect password.

When `AuthenticationForm` is combined with `AllowAllUsersModelBackend`,
`AuthenticationForm.confirm_login_allowed` will be called and raise a
validation error for inactive accounts, because they are returned from
the backend, leading to the error message "This account is inactive."

Given that `AuthenticationForm.confirm_login_allowed` exists the way
that it does, it seems like there are valid configurations in which the
form has the responsibility to determine the user's authorization to log in.

However, it seems quite dangerous to me to leave it up to the form to
deny login to users, e.g. because there might be other ways of
authentication that are not using AuthenticationForm.

So my question would be: Under which circumstances is it a good idea to
leave such authorization decisions up to the form/what setup did the
original authors have in mind when writing `confirm_login_allowed`?

All Best,
Chris

-- 
I like PGP. How about:
curl -slf https://nowhere.ws/nowhere.asc | gpg --import -

-- 
You received this message because you are 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/63909bc7-221a-f269-5b5d-eed461b0c9fe%40nowhere.ws.


0x0030BA1AB7B36983.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Django developer server auto quit when iterate QuerySet in template

2019-09-24 Thread Deep Sukhwani
Possible to push the whole code to a Github repo so someone could check out
and try locally - Couldn't really figure out anything that might be going
wrong by looking at this much mode?

Also, just out of curiosity, why are you using *Department.objects.filter()*
instead of *Department.objects.all()* since you are anyways not passing
anything to the filter.

--
Regards
Deep L Sukhwani


On Tue, 24 Sep 2019 at 20:23, Huy Bùi  wrote:

> Hello,
>
>  Everytime i try to access a url, the Django developer server auto quit
> without any log about what happens.
>  After debugging a little bit, i find out if i remove this block of code
> in the template file, i can access the web page normally:
>
>  
>  
>  {% for d in departments %}
>   {{ d.name }} - {{ d.department_code }}
> 
>  {% endfor %}
>  
>
>  But i can iterate the QuerySet in the view normally, it seems like there
> aren't any problem iterating the QuerySet:
>
> def edit(request):
> departments = Department.objects.filter()
> for d in departments:
> print(d.id, d.name, d.department_code)
>
> return render(request, 'edit/edit.html', {'departments': departments})
>
>  I have no idea what is happening and it's driving me crazy. Any help
> would be appreciated. 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/905973fa-6d90-4b45-bb69-ffcc787d2524%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/CAEMqiPf-0NxxKjbWXPh7R7qZvPDLgOeamrhpCw7MASit8%3DB3vg%40mail.gmail.com.


Re: ModuleNotFoundError: No module named :

2019-09-24 Thread MEGA NATHAN
Hi.
 again i change and run but same problem coming 



*Regards*
Meganathan G



On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
wrote:

> Error in admin.py. So same here in admin.py.
>
> Before starting a django project, try to understand the architecture of it
> and the working flow of it.
> Otherwise, you can't go long away.
> Best Wishes,
>
> On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
> wrote:
>
>> In your views.py:
>> from .models import users
>>
>> That's it.
>>
>> On Tue, Sep 24, 2019 at 10:13 AM Deep Sukhwani 
>> wrote:
>>
>>> Are you supposed to be using a virtualenv and you don't have that
>>> activated?
>>>
>>> Can you run *pip freeze | grep -i django* and share the output?
>>>
>>> --
>>> Regards
>>> Deep L Sukhwani
>>>
>>>
>>> On Tue, 24 Sep 2019 at 09:40, MEGA NATHAN 
>>> wrote:
>>>
 Hi.


 i 'm meganathan from india i was doing django trining ,

 And i have one dout .mo module name found models

 *ModuleNotFoundError: No module named 'django.models'*





 *Regards*
 *Meganathan,*

 --
 You received this message because you are 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/f85f29b7-e3d9-4dfa-945f-70f1fb8e90f1%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/CAEMqiPe7rf4syuVUTEZVO%2BOMh7K-cvGX_yLsL0vhchNbTTfATw%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/CACNsr2-bU6cCHuthEizB4ZB45UcTns3c-wERXqmbo36upa7Ksw%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/CAEvDBLeWLN4%3DpQSBA8AkoLQF5ByWXvcScZJznL__6kQR20UAfg%40mail.gmail.com.


list records of another app in another app

2019-09-24 Thread Perceval Maturure
Hi awesome django users
i want to list model records of App1 in  a detail view of App2
any ideas?
Regards

-- 
*Perceval Maturure*

*083 303 9423*

-- 
You received this message because you are 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/CAFZtZmAH2ObYHnCwmAkU0uBd8WK%3D0ch%2BVriJRVpu0w9FJKQ3DA%40mail.gmail.com.


how to use django pagination with sql query and not ORM

2019-09-24 Thread leb dev
I now how to use django pagination with ORM django after filtering the 
required data and put in into *pagination div*

*queryset_list = employee.objects.all()*
*query=request.GET.get("q")*
*if query:*
*queryset_list=queryset_list.filter(*
*  Q(name__icontains=query)|*
*  Q(father_name__icontains=query)|*
*  Q(mother_name__icontains=query)|*
*  Q(content__icontains=query)|*
*  Q(create_date__icontains=query)*
*  # Q(user__first_name__contains=query)*
*).distinct()*


*paginator = Paginator(queryset_list, 5)*
*page_request_var = "page"*
*page = request.GET.get(page_request_var)*
*queryset = paginator.get_page(page)*

*context={*
*"object_list":queryset,*
*"title":"List Items",*
*"page_request_var":page_request_var,*
*}*
*return render(request,"blog/list.html", context)*


the above code is working 

my question is how to convert this ORM into raw SQL 

i know that i must use LIMIT and OFFSET  in raw SQL  to embedded into 
paginator.



-- 
You received this message because you are 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/2d44b204-8520-423a-992c-597fd479f856%40googlegroups.com.


Re: list records of another app in another app

2019-09-24 Thread Jani Tiainen
Hi.

Just import models and use them?

ti 24. syysk. 2019 klo 22.10 Perceval Maturure 
kirjoitti:

>
> Hi awesome django users
> i want to list model records of App1 in  a detail view of App2
> any ideas?
> Regards
>
> --
> *Perceval Maturure*
>
> *083 303 9423*
>
> --
> You received this message because you are 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/CAFZtZmAH2ObYHnCwmAkU0uBd8WK%3D0ch%2BVriJRVpu0w9FJKQ3DA%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/CAHn91oekrTWY%3DjYEEdCjvWso2DqwdrT-kKTA8nCM5LkQbtZPvA%40mail.gmail.com.


Re: convert python 3 to python2

2019-09-24 Thread Mike Dewhirst
I think the original question was around backwards conversion of 3.x 
code to 2.7.


I don't know of course because all my efforts have been forwards but I 
believe the six module would be the easiest way backwards.


And I imagine you would simply run your unit tests in 2.7 and use the 
six utilities to correct errors. With a little luck that would 
simultaneously keep the codebase compatible with 3.x for the inevitable 
forward upgrade.


Just a thought

Mike

On 24/09/2019 10:00 pm, Larry Martell wrote:

On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne
 wrote:

Official access isn't denied - and python 2 will probably be available. The 
problem is that you don't get any security fixes or any updates at all. That in 
itself is a major problem. If someone is saying that you need to use python 2, 
I would strongly recommend them to not even think about it. All code that is 
written will be useless in a couple of years time, and need to be updated or 
even worse thrown away.

This is totally untrue. Yes, all code should be converted to py3, but
that is simply not happing at many companies. They will continue to
use their py2 apps, and either support them internally or purchase py2
support from one of the many companies offering it. Is that a good
idea? No, but it's a reality.



--
You received this message because you are 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/251d3edb-1d78-cc02-8f46-4171f9639255%40dewhirst.com.au.


Re: how to use django pagination with sql query and not ORM

2019-09-24 Thread Deep Sukhwani
Have you tried using the *.query* on Django's QuerySet (documentation: [1])

For example, if my QuerySet is:
*User.objects.filter(username__contains='alpha')*

I can obtain the underlying raw SQL Query using:
*print(User.objects.filter(username__contains='alpha').query)*
*>>> *print(User.objects.filter(username__contains='alpha').query)
SELECT `auth_user`.`id`, `auth_user`.`password`, `auth_user`.`last_login`,
`auth_user`.`is_superuser`, `auth_user`.`username`,
`auth_user`.`first_name`, `auth_user`.`last_name`, `auth_user`.`email`,
`auth_user`.`is_staff`, `auth_user`.`is_active`, `auth_user`.`date_joined`
FROM `auth_user` WHERE `auth_user`.`username` LIKE BINARY %alpha%

1:
https://docs.djangoproject.com/en/2.2/topics/db/sql/#performing-raw-queries

--
Regards
Deep L Sukhwani


On Wed, 25 Sep 2019 at 00:47, leb dev  wrote:

> I now how to use django pagination with ORM django after filtering the
> required data and put in into *pagination div*
>
> *queryset_list = employee.objects.all()*
> *query=request.GET.get("q")*
> *if query:*
> *queryset_list=queryset_list.filter(*
> *  Q(name__icontains=query)|*
> *  Q(father_name__icontains=query)|*
> *  Q(mother_name__icontains=query)|*
> *  Q(content__icontains=query)|*
> *  Q(create_date__icontains=query)*
> *  # Q(user__first_name__contains=query)*
> *).distinct()*
>
>
> *paginator = Paginator(queryset_list, 5)*
> *page_request_var = "page"*
> *page = request.GET.get(page_request_var)*
> *queryset = paginator.get_page(page)*
>
> *context={*
> *"object_list":queryset,*
> *"title":"List Items",*
> *"page_request_var":page_request_var,*
> *}*
> *return render(request,"blog/list.html", context)*
>
>
> the above code is working
>
> my question is how to convert this ORM into raw SQL
>
> i know that i must use LIMIT and OFFSET  in raw SQL  to embedded into
> paginator.
>
>
>
> --
> You received this message because you are 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/2d44b204-8520-423a-992c-597fd479f856%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/CAEMqiPc5zqcT%2BaPYSySLCJe22nPC-fCk_RkaTvWvRx5CSqkXQA%40mail.gmail.com.


Virtual Environment error

2019-09-24 Thread yasar arafath Kajamydeen
Dear All,

Actually i forget my virtual environment name. So when i run  --  python 
manage.py  runserver   command its showing   error like this  .


ImportError: Couldn't import Django. Are you sure it's installed and 
available on your PYTHONPATH environment variable? Did you forget to 
activate a virtual environment?




Thanks in Advance.


Regards,
Yasar Arafath K

-- 
You received this message because you are 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/198d3480-4f3b-4cf3-971d-ce6c7ec19080%40googlegroups.com.


Re: list records of another app in another app

2019-09-24 Thread Paul Barber
I was actually thinking of doing the same thing

On Tuesday, September 24, 2019 at 3:10:46 PM UTC-4, Perceval Maturure wrote:
>
>
> Hi awesome django users
> i want to list model records of App1 in  a detail view of App2
> any ideas?
> Regards
>
> -- 
> *Perceval Maturure*
>
> *083 303 9423*
>

-- 
You received this message because you are 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/ee7c5ea4-a109-4e63-a581-394e1dcc96cc%40googlegroups.com.


Why my replies won't work

2019-09-24 Thread TruZillah
i am trying to reply to people question but for some reason it won't go 
through so i am going to see if this post actually goes through

-- 
You received this message because you are 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/b87bb460-7eeb-4f7a-8925-2047a24e4207%40googlegroups.com.


Re: Help for building recommendation system in django

2019-09-24 Thread TruZillah
try using aws... go to aws.com and sign-up for a free account and used the 
Amazon Personalize service... or your can google it and it will take you 
right there

On Monday, September 23, 2019 at 11:48:12 PM UTC-4, Gabriel Araya Garcia 
wrote:
>
> Hi, What is an  recommendation system ? I live in Chile, and I do not know 
> what is that. 
> Have you something done in this minute ?
>
> El mar., 24 sept. 2019 a las 0:35, Mahir Shah ( >) escribió:
>
>> Hello , I am trying to build an recommendation system on books using 
>> django framework but am not been able do it . Please help me out with this 
>>
>> -- 
>> You received this message because you are 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/27027877-2836-452b-a608-473100edc83e%40googlegroups.com
>> .
>>
>
>
> -- 
> Gabriel Araya Garcia
> GMI - Desarrollo de Sistemas Informáticos
> 99.7721.15.70
>
>

-- 
You received this message because you are 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/7e8e7797-0e1f-4c2b-9159-90c10a45e9b2%40googlegroups.com.


Re: Help for building recommendation system in django

2019-09-24 Thread TruZillah
aws offers a good solution google Amazon Personalize... that will help you 
solve your problem...

On Monday, September 23, 2019 at 11:36:32 PM UTC-4, Mahir Shah wrote:
>
> Hello , I am trying to build an recommendation system on books using 
> django framework but am not been able do it . Please help me out with this 

-- 
You received this message because you are 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/cefd3799-4245-4d92-aecb-c2f130aa9b1b%40googlegroups.com.


Re: ModuleNotFoundError: No module named :

2019-09-24 Thread Abu Yusuf
share your full project here.

On Tue, Sep 24, 2019 at 10:43 PM MEGA NATHAN 
wrote:

>
>
> Hi.
>  again i change and run but same problem coming 
>
>
>
> *Regards*
> Meganathan G
>
>
>
> On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
> wrote:
>
>> Error in admin.py. So same here in admin.py.
>>
>> Before starting a django project, try to understand the architecture of
>> it and the working flow of it.
>> Otherwise, you can't go long away.
>> Best Wishes,
>>
>> On Tue, Sep 24, 2019 at 10:32 AM Abu Yusuf 
>> wrote:
>>
>>> In your views.py:
>>> from .models import users
>>>
>>> That's it.
>>>
>>> On Tue, Sep 24, 2019 at 10:13 AM Deep Sukhwani 
>>> wrote:
>>>
 Are you supposed to be using a virtualenv and you don't have that
 activated?

 Can you run *pip freeze | grep -i django* and share the output?

 --
 Regards
 Deep L Sukhwani


 On Tue, 24 Sep 2019 at 09:40, MEGA NATHAN 
 wrote:

> Hi.
>
>
> i 'm meganathan from india i was doing django trining ,
>
> And i have one dout .mo module name found models
>
> *ModuleNotFoundError: No module named 'django.models'*
>
>
>
>
>
> *Regards*
> *Meganathan,*
>
> --
> You received this message because you are 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/f85f29b7-e3d9-4dfa-945f-70f1fb8e90f1%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/CAEMqiPe7rf4syuVUTEZVO%2BOMh7K-cvGX_yLsL0vhchNbTTfATw%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/CACNsr2-bU6cCHuthEizB4ZB45UcTns3c-wERXqmbo36upa7Ksw%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/CAEvDBLeWLN4%3DpQSBA8AkoLQF5ByWXvcScZJznL__6kQR20UAfg%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/CACNsr2-GJBUAZs7hhe6JhTnXQOO7zdrivNygQp%3DR78%2Bdb9UP0w%40mail.gmail.com.


Re: TemplateDoesNotExist

2019-09-24 Thread Desh Deepak
Create template folder inside testapp.

Like this:
testapp>template>base.html



On Wed, 25 Sep 2019, 10:47 yerri swamy,  wrote:

>
>
> On Mon, Sep 23, 2019 at 6:53 PM Desh Deepak 
> wrote:
>
>> Show me your views.py file.
>>
>> On Mon, 23 Sep 2019, 18:48 Abu Yusuf,  wrote:
>>
>>> 1. ensure you have a folder templates inside static folder
>>> 2. ensure you filled up templates_dir: 'templates'
>>> 3. ensure 'base.html' exists inside templates folder
>>>
>>> On Mon, Sep 23, 2019 at 6:40 PM yerri swamy 
>>> wrote:
>>>
 Hi guys,

 By using templates folder i am not getting what i am expecting
 and i am getting error 'Template Does Not Exist' ,and also defaulty it's
 not coming templates variable in settings.py file,How do i slove this error
 please explain me any one.

 --
 You received this message because you are 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/208e411a-a8f5-4238-b846-f086826f2ff4%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/CACNsr29mvap_G4%2Bc70NrkDZEQvPye%3D22caxfBvdUvMt_b7kXqQ%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/CAJ0m4xiPWfJ%3Dt-CjkDL81F7wn5ETmcBRacMyBi5n0zpO0C%3DUQg%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/CAKMSwL-OH3MOgjE5YDwVtsH-2xPv5oNxvuWHna8MZYUXS0iR0A%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/CAJ0m4xhvoPjpgJXQKk61oG4rfnVRnUwLCX1CgYH%3DGdze8BGAfw%40mail.gmail.com.


Re: Virtual Environment error

2019-09-24 Thread Deep Sukhwani
Depending on how you installed *virtualenv* package and what you are using
to create and activate virtualenv you can determine the currently present
virtualenvs on your computer.


   - If you used *virtualenvwrapper* - use *lsvirtualenv*
   - Additionally, you can look in your Home Directory and search for a
   directory named .virtualenvs (Note there's a dot before virtualenvs) to
   see the list of all present virtualenvs
   - Finally, you can always just go ahead and create a new one - shouldn't
   take too much time

--
Regards
Deep L Sukhwani


On Wed, 25 Sep 2019 at 08:44, yasar arafath Kajamydeen 
wrote:

> Dear All,
>
> Actually i forget my virtual environment name. So when i run  --  python
> manage.py  runserver   command its showing   error like this  .
>
>
> ImportError: Couldn't import Django. Are you sure it's installed and
> available on your PYTHONPATH environment variable? Did you forget to
> activate a virtual environment?
>
>
>
>
> Thanks in Advance.
>
>
> Regards,
> Yasar Arafath K
>
> --
> You received this message because you are 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/198d3480-4f3b-4cf3-971d-ce6c7ec19080%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/CAEMqiPfagZtyvNC%2BLzzmTvasK2HXFcdLnDLqyxJirBq4-miCgQ%40mail.gmail.com.