Order column

2019-09-18 Thread Luca Bertolotti
Hello
I have a query that filter the data.
I put the results in a table in the template
I have make a function that by clkicking on the th order the data,ex.

def filter(request):

  results = My.objects.filter()

  return render(request, "pro/all.html", {"all": results, })


than in the template i have :
.

 Column Name 
street 

etx...


than i have the def

def order(request, column_name)
   
   here i need to have again :
   results = My.objects.filter().order_by() 
So in which way i can pass the variable results in order to apply the 
order_by

-- 
You received this message because you are subscribed to the Google Groups 
"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/1d61b952-a37e-42fa-98f7-10dafc7bb788%40googlegroups.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Sipum
Hi Preetham,

I know we are in s/w industry and we are well known of copy and paste. But
u did it here also. 😅😅
Thanks.


On Wed, 18 Sep, 2019, 11:47 AM Preetham Varanasi, <
varanasipreetham...@gmail.com> wrote:

> Hi Raju,
> I m interested but can remote possible as currently, I m in India?
>
>
> Thank you
> Regards
> Preetham
>
> On Wed, Sep 18, 2019 at 8:05 AM Sipum  wrote:
>
>> Hi Raju,
>>
>> I m interested but can remote possible as currently I m in India?
>>
>> Thank you
>> Regards
>> Sipum
>>
>> On Wed, 18 Sep, 2019, 2:06 AM Raju N Somanna, 
>> wrote:
>>
>>> Hi All
>>>
>>> I've an immediate need for Backend Developers (*Python/Django ORM* -
>>> New York City) with my client in NYC. As the title suggests my team is
>>> looking for Python/Django specialist, someone who is good experience on
>>> ORM.
>>>
>>> Please do let me know if you have any from your contacts/references who
>>> might be interested in this opportunity.
>>>
>>> *PS: ABOUT US*
>>> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in
>>> revenues, 8000+ resources footprint across Americas, Europe, South Africa,
>>> Asia Pacific and India.
>>> Presence in the US from the past 17 years, with resources working in
>>> over 24 states. Our US innovation labs are in San Jose, CA and we also have
>>> offices in NJ, MI, AR.
>>> We have plenty of successful use cases across diversified verticals
>>> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail,
>>> Hi-Tech.
>>> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain,
>>> Big Data, Product Engineering (we own a technology agnostic DevOps
>>> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
>>> We are backed by a parent company with over $50 billion market cap and
>>> over 26,000 employees world-wide.
>>>
>>> Regards
>>> Raju NS
>>>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/CAGHZBzzY-Rx86JdSQouF%2B6y__rnFkiFDVJrP%3DDvQOsp4kNYpvQ%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/CANFgYc4_VH%2BLLNtpxH4o7ZNOkd8Q_s_40mC1r7nHWKBPNa3LoQ%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/CAGHZBzwrWfNwX1nqD9FFyCzwwJv%2BB6KguXgceWWs-OUNLgQeEQ%40mail.gmail.com.


Re:

2019-09-18 Thread Anirudh Jain
Example: YouModelName.objects.all().order_by('created_at')


This will sort all the objects in your model on the basis of date of
creation on that object.

On Wed, 18 Sep 2019, 12:16 Shakil Ahmmed,  wrote:

>
> How to select all field but group by one field
> --
>
> 
> Shakil Ahmmed
> about.me/shakilahmmed
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "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%2BEpJfzNPZ_vRqyHan92VsDY9MAjsxogKVh4FEBdwXWLd%3DHXtQ%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/CAC3mK7frp_NWYmtJ1mUjrC3vTr6nb1%3DcoHWQiD48f7jnHbFhzQ%40mail.gmail.com.


Re:

2019-09-18 Thread Shakil Ahmmed
I want to select all field in a model but Grouy By One field.. Suppose i
have country,people , and onther field in a model i want to  group by
country but select all field

On Wed, Sep 18, 2019, 6:05 PM Anirudh Jain 
wrote:

> Example: YouModelName.objects.all().order_by('created_at')
>
>
> This will sort all the objects in your model on the basis of date of
> creation on that object.
>
> On Wed, 18 Sep 2019, 12:16 Shakil Ahmmed,  wrote:
>
>>
>> How to select all field but group by one field
>> --
>>
>> 
>> Shakil Ahmmed
>> about.me/shakilahmmed
>> 
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "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%2BEpJfzNPZ_vRqyHan92VsDY9MAjsxogKVh4FEBdwXWLd%3DHXtQ%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/CAC3mK7frp_NWYmtJ1mUjrC3vTr6nb1%3DcoHWQiD48f7jnHbFhzQ%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/CA%2BEpJfx8i%2BYCDD16NUn1wjDW4bsdhFgySbtHYUChCR1ArbBEBQ%40mail.gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Jithendra Kumar
Hi  Raju,
  I am interested in this position. i will work from india i am
comfortable in the remote location.



Regards,
Jithendra Kumar U ,
PYTHON, PHP & UI Developer
9666 544 180, 6300 639 675


On Wed, Sep 18, 2019 at 2:06 AM Raju N Somanna  wrote:

> Hi All
>
> I've an immediate need for Backend Developers (*Python/Django ORM* - New
> York City) with my client in NYC. As the title suggests my team is looking
> for Python/Django specialist, someone who is good experience on ORM.
>
> Please do let me know if you have any from your contacts/references who
> might be interested in this opportunity.
>
> *PS: ABOUT US*
> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in
> revenues, 8000+ resources footprint across Americas, Europe, South Africa,
> Asia Pacific and India.
> Presence in the US from the past 17 years, with resources working in over
> 24 states. Our US innovation labs are in San Jose, CA and we also have
> offices in NJ, MI, AR.
> We have plenty of successful use cases across diversified verticals
> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail,
> Hi-Tech.
> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain,
> Big Data, Product Engineering (we own a technology agnostic DevOps
> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
> We are backed by a parent company with over $50 billion market cap and
> over 26,000 employees world-wide.
>
> Regards
> Raju NS
>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/CAFj3zBL3E2rJ32gOn0PbFg4tN47dbajnnuAisoW8dB%3DZhxcMKg%40mail.gmail.com.


Re:

2019-09-18 Thread Anirudh Jain
a = YouModelName.objects.all().values_list()
b= a.order_by('created_at')

On Wed, 18 Sep 2019, 17:44 Shakil Ahmmed,  wrote:

> I want to select all field in a model but Grouy By One field.. Suppose i
> have country,people , and onther field in a model i want to  group by
> country but select all field
>
> On Wed, Sep 18, 2019, 6:05 PM Anirudh Jain 
> wrote:
>
>> Example: YouModelName.objects.all().order_by('created_at')
>>
>>
>> This will sort all the objects in your model on the basis of date of
>> creation on that object.
>>
>> On Wed, 18 Sep 2019, 12:16 Shakil Ahmmed,  wrote:
>>
>>>
>>> How to select all field but group by one field
>>> --
>>>
>>> 
>>> Shakil Ahmmed
>>> about.me/shakilahmmed
>>> 
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "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%2BEpJfzNPZ_vRqyHan92VsDY9MAjsxogKVh4FEBdwXWLd%3DHXtQ%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/CAC3mK7frp_NWYmtJ1mUjrC3vTr6nb1%3DcoHWQiD48f7jnHbFhzQ%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/CA%2BEpJfx8i%2BYCDD16NUn1wjDW4bsdhFgySbtHYUChCR1ArbBEBQ%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/CAC3mK7fJyqrvFZUU4xUe%2BDdCtWBqCUD%3DPvFbVNN2Pcv1iPb6Gw%40mail.gmail.com.


Re:

2019-09-18 Thread Anirudh Jain
Or you can use filter() instead of all()

On Wed, 18 Sep 2019, 17:46 Anirudh Jain,  wrote:

> a = YouModelName.objects.all().values_list()
> b= a.order_by('created_at')
>
> On Wed, 18 Sep 2019, 17:44 Shakil Ahmmed,  wrote:
>
>> I want to select all field in a model but Grouy By One field.. Suppose i
>> have country,people , and onther field in a model i want to  group by
>> country but select all field
>>
>> On Wed, Sep 18, 2019, 6:05 PM Anirudh Jain 
>> wrote:
>>
>>> Example: YouModelName.objects.all().order_by('created_at')
>>>
>>>
>>> This will sort all the objects in your model on the basis of date of
>>> creation on that object.
>>>
>>> On Wed, 18 Sep 2019, 12:16 Shakil Ahmmed, 
>>> wrote:
>>>

 How to select all field but group by one field
 --

 
 Shakil Ahmmed
 about.me/shakilahmmed
 

 --
 You received this message because you are subscribed to the Google
 Groups "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%2BEpJfzNPZ_vRqyHan92VsDY9MAjsxogKVh4FEBdwXWLd%3DHXtQ%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/CAC3mK7frp_NWYmtJ1mUjrC3vTr6nb1%3DcoHWQiD48f7jnHbFhzQ%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/CA%2BEpJfx8i%2BYCDD16NUn1wjDW4bsdhFgySbtHYUChCR1ArbBEBQ%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/CAC3mK7eQwA8jq%3D9TUrZ19rd%2BAiWAYyhPKG7F7Qg-9-RjVQckJw%40mail.gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Abishek Goda
It's nice that a lot of you want to apply for this position, but please do
unicast it to the OP. That way it is more likely he'd see your email, esp
if he uses the digest format.

Abishek

On Wed, Sep 18, 2019 at 8:18 PM Jithendra Kumar  wrote:

> Hi  Raju,
>   I am interested in this position. i will work from india i am
> comfortable in the remote location.
>
>
>
> Regards,
> Jithendra Kumar U ,
> PYTHON, PHP & UI Developer
> 9666 544 180, 6300 639 675
>
>
> On Wed, Sep 18, 2019 at 2:06 AM Raju N Somanna 
> wrote:
>
>> Hi All
>>
>> I've an immediate need for Backend Developers (*Python/Django ORM* - New
>> York City) with my client in NYC. As the title suggests my team is looking
>> for Python/Django specialist, someone who is good experience on ORM.
>>
>> Please do let me know if you have any from your contacts/references who
>> might be interested in this opportunity.
>>
>> *PS: ABOUT US*
>> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in
>> revenues, 8000+ resources footprint across Americas, Europe, South Africa,
>> Asia Pacific and India.
>> Presence in the US from the past 17 years, with resources working in over
>> 24 states. Our US innovation labs are in San Jose, CA and we also have
>> offices in NJ, MI, AR.
>> We have plenty of successful use cases across diversified verticals
>> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail,
>> Hi-Tech.
>> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain,
>> Big Data, Product Engineering (we own a technology agnostic DevOps
>> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
>> We are backed by a parent company with over $50 billion market cap and
>> over 26,000 employees world-wide.
>>
>> Regards
>> Raju NS
>>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/CAFj3zBL3E2rJ32gOn0PbFg4tN47dbajnnuAisoW8dB%3DZhxcMKg%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/CAPm8%3Dxqkw2Qq4QttPtqqJZ02q4QVF4-B1dZC1k9J2RZU_-tMVg%40mail.gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Shashank Srivastava
interested
regards
Shashank Srivastava
+91 9120029756

On Wed, Sep 18, 2019 at 5:54 PM Abishek Goda  wrote:

> It's nice that a lot of you want to apply for this position, but please do
> unicast it to the OP. That way it is more likely he'd see your email, esp
> if he uses the digest format.
>
> Abishek
>
> On Wed, Sep 18, 2019 at 8:18 PM Jithendra Kumar  wrote:
>
>> Hi  Raju,
>>   I am interested in this position. i will work from india i am
>> comfortable in the remote location.
>>
>>
>>
>> Regards,
>> Jithendra Kumar U ,
>> PYTHON, PHP & UI Developer
>> 9666 544 180, 6300 639 675
>>
>>
>> On Wed, Sep 18, 2019 at 2:06 AM Raju N Somanna 
>> wrote:
>>
>>> Hi All
>>>
>>> I've an immediate need for Backend Developers (*Python/Django ORM* -
>>> New York City) with my client in NYC. As the title suggests my team is
>>> looking for Python/Django specialist, someone who is good experience on
>>> ORM.
>>>
>>> Please do let me know if you have any from your contacts/references who
>>> might be interested in this opportunity.
>>>
>>> *PS: ABOUT US*
>>> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in
>>> revenues, 8000+ resources footprint across Americas, Europe, South Africa,
>>> Asia Pacific and India.
>>> Presence in the US from the past 17 years, with resources working in
>>> over 24 states. Our US innovation labs are in San Jose, CA and we also have
>>> offices in NJ, MI, AR.
>>> We have plenty of successful use cases across diversified verticals
>>> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail,
>>> Hi-Tech.
>>> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain,
>>> Big Data, Product Engineering (we own a technology agnostic DevOps
>>> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
>>> We are backed by a parent company with over $50 billion market cap and
>>> over 26,000 employees world-wide.
>>>
>>> Regards
>>> Raju NS
>>>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/CAFj3zBL3E2rJ32gOn0PbFg4tN47dbajnnuAisoW8dB%3DZhxcMKg%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/CAPm8%3Dxqkw2Qq4QttPtqqJZ02q4QVF4-B1dZC1k9J2RZU_-tMVg%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/CAMzSup2c9XzikS4H5%3DzTb_tuoWbm9y8mKS-Q%3DasP3bvPcnSGVg%40mail.gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Tosin Ayoola
Can I apply as remote django developer?

On Sep 17, 2019 21:35, "Raju N Somanna"  wrote:

> Hi All
>
> I've an immediate need for Backend Developers (*Python/Django ORM* - New
> York City) with my client in NYC. As the title suggests my team is looking
> for Python/Django specialist, someone who is good experience on ORM.
>
> Please do let me know if you have any from your contacts/references who
> might be interested in this opportunity.
>
> *PS: ABOUT US*
> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in
> revenues, 8000+ resources footprint across Americas, Europe, South Africa,
> Asia Pacific and India.
> Presence in the US from the past 17 years, with resources working in over
> 24 states. Our US innovation labs are in San Jose, CA and we also have
> offices in NJ, MI, AR.
> We have plenty of successful use cases across diversified verticals
> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail,
> Hi-Tech.
> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain,
> Big Data, Product Engineering (we own a technology agnostic DevOps
> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
> We are backed by a parent company with over $50 billion market cap and
> over 26,000 employees world-wide.
>
> Regards
> Raju NS
>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/CAHLKn73pR7kAjYQ8moCeMTsUTm%2Bn%2BD0T37_-divH5fXgy1HGSg%40mail.gmail.com.


queryser variable from template to a view

2019-09-18 Thread Luca Bertolotti
Hello i need to pass a query set from template to a view:



in which way i have to define the urls file

path('test//***what to write+++', views.test, name='test'),

-- 
You received this message because you are subscribed to the Google Groups 
"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/2ad42877-766c-49b9-af51-e67007af80f9%40googlegroups.com.


Re: how to use sql select query with pyodbc and django ?

2019-09-18 Thread Cornelis Poppema
I am not using pyodbc, but I imagine you should %s instead of ? as 
parameter marker. mysql-python actually uses python interpolation to build 
the query instead of simply replacing the ? signs, so pyodbc might do the 
same. If that's the case, it makes sense the error says there are 0 
parameter markers. For reference, check the example from the docs: 
https://docs.djangoproject.com/en/2.2/topics/db/sql/#passing-parameters-into-raw

>>> lname = 'Doe'>>> Person.objects.raw('SELECT * FROM myapp_person WHERE 
>>> last_name = %s', [lname])



On Wednesday, 18 September 2019 08:36:59 UTC+2, leb dev wrote:
>
> i have a django code that connect to sql server database and i am trying 
> to select values using *like *but once i try it it crash and the system 
> display the below error:
>
> ('The SQL contains 0 parameter markers, but 1 parameters were supplied', 
> 'HY000')
>
>
> views.py
>
> 
>
>
> from django.shortcuts import render
> import pyodbc
> # from .models import Artist
> # Create your views here.
>
>
> def connect(request):
>  
> conn = pyodbc.connect(
> 'Driver={ODBC Driver 17 for SQL Server};'
> 'Server=DESKTOP-LPD1575\\SQLEXPRESS;'
> 'Database=testDB;'
> 'UID=test;'
> 'PWD=*;'
>
> )
> query = 'jhon'
> cursor = conn.cursor()
>  
> c = cursor.execute('SELECT * FROM Artist where artistName like 
> "%?%"',query)
> print(c)
> return render (request,'connect.html',{"c":c})
>
>
>
> connect.html
> ==
> 
> 
> id
> FolderNumber
> Folderdate
>
> 
> {% for row in c %}
>  
> {{ row.0 }}
> {{ row.1 }}
> {{ row.2 }}
> 
> 
> {% endfor %}
> 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/7c6435ab-0a86-4b4e-9af2-093d713c0502%40googlegroups.com.


Re: queryser variable from template to a view

2019-09-18 Thread Jani Tiainen
Hi.

 to the rescue!

Also it is recommended to use {% url %} tag to construct urls not to
hardcode them and once were there Django convention is to end urls to slash.

ke 18. syysk. 2019 klo 15.53 Luca Bertolotti 
kirjoitti:

> Hello i need to pass a query set from template to a view:
>
> 
>
> in which way i have to define the urls file
>
> path('test//***what to write+++', views.test, name='test'),
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/2ad42877-766c-49b9-af51-e67007af80f9%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/CAHn91odFE%2Bk07BwQzr8sBjwe1e9wevM2SutVzMs2uhxvKkTsjw%40mail.gmail.com.


Re:

2019-09-18 Thread Jani Tiainen
Hi.

Technically that is impossible.

Group by is used to make sql aggregate to know aggregation criteria.

Let's take simple example:

Let's have table with columns name, job and salary.

Rows in table would be:

Jani,programmer,100
Ahmmed,programmer,100

Now lets calculate average salary of programmer:

select job, avg(salary) from table group by job

Now selecting name there doesn't make sense. If you would like actually
represent names with average  salary you can do that by joining temporary
table. So query would look like this:

select *,b.avg from table a join (select job, avg(salary) as "avg" from
table) b join a.job = b.job

This should be possible with pure django as well.


ke 18. syysk. 2019 klo 9.46 Shakil Ahmmed 
kirjoitti:

>
> How to select all field but group by one field
> --
>
> 
> Shakil Ahmmed
> about.me/shakilahmmed
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "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%2BEpJfzNPZ_vRqyHan92VsDY9MAjsxogKVh4FEBdwXWLd%3DHXtQ%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/CAHn91oerN_kMNvi%3DDJQXr9_oSWRncNO%2BmkbkbE7Naies%3DfTD_Q%40mail.gmail.com.


django.core.exceptions.ImproperlyConfigured DJANGO_SETTINGS_MODULE

2019-09-18 Thread Brad S


I am trying to get a new server up and running and I am make a n00b error 
somewhere.


django.core.exceptions.ImproperlyConfigured: Requested setting MIDDLEWARE, but 
settings are not configured. You must either define the environment variable 
DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
unable to load app 0 (mountpoint='') (callable not found or import error)


$ cat nerds/settings.py 
"""
Django settings for nerds project.

Generated by 'django-admin startproject' using Django 2.2.5.

For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""

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.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ui2+3#j-67et^&rx1z^76$b^h4pw3c7qbxdc5rj0xuqcq)=0=2'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ["nerds.tech","www.nerds.tech"]


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'support.apps.SupportConfig',
]

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 = 'nerds.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'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 = 'nerds.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'nerds.db'),
}
}


# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators

AUTH_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.2/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'EST'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.2/howto/static-files/

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
#DJANGO_SETTINGS_MODULE="nerds.settings"



$ cat ../uwsgi.ini 
[uwsgi]
module = wsgi:application
#module = wsgi
master = true
chdir = /home/www/nerds.tech/nerds
wsgi-file = /home/www/nerds.tech/nerds/nerds/wsgi.py
#wsgi-file = nerds/nerds/wsgi.py
uid = www-data
gid = www-data
vacuum = true
chmod-socket = 660
socket = /tmp/uwsgi.sock
#plugins = python
die-on-term = true
virtualenv = /home/www/nerds.tech/venv
#pythonpath = /home/www/nerds.tech/venv/lib/python3.5/dist-packages
pythonpath = /home/www/nerds.tech/venv/lib/python3.5/site-packages
pythonpath = /home/www/nerds.tech/venv/lib/python3.5
#pythonpath = ./nerds
pythonpath = /home/www/nerds.tech/nerds
module = django.core.handlers.wsgi:WSGIHandler()
logto = /var/log/nginx/uwsgi.log






$ cat nerds/wsgi.py 
"""
WSGI config for nerds project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""

import os
from django.core.wsgi import get_wsgi_application

#os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nerds.settings')

os.environ['DJANGO_SETTINGS_MODULE'] = 'nerds.settings'


#os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nerds.settings')

application = get_wsgi_application()

-- 
You received this message because you are subscribed to the Google Groups 
"Django u

Re: queryser variable from template to a view

2019-09-18 Thread Luca Bertolotti
Hello
if i pass 
and in the view i do this

def exmple(request,myvar):
  sort = myvar.order_by()
i get an error because myvar is a string instead i near a query set

Luca

Il giorno mercoledì 18 settembre 2019 15:56:19 UTC+2, Jani Tiainen ha 
scritto:
>
> Hi.
>
>  to the rescue!
>
> Also it is recommended to use {% url %} tag to construct urls not to 
> hardcode them and once were there Django convention is to end urls to slash.
>
> ke 18. syysk. 2019 klo 15.53 Luca Bertolotti  > kirjoitti:
>
>> Hello i need to pass a query set from template to a view:
>>
>> 
>>
>> in which way i have to define the urls file
>>
>> path('test//***what to write+++', views.test, name='test'),
>>
>> -- 
>> You received this message because you are 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/2ad42877-766c-49b9-af51-e67007af80f9%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/22af4b9c-839d-4d8a-ab73-94c2f6c72466%40googlegroups.com.


media file upload

2019-09-18 Thread Luca Bertolotti
Hello i can't upload the file, i'm in a debug mode:

the urls.is:

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static


urlpatterns = [
path('', include('polls.urls')), 
path('admin/', admin.site.urls),


]
if settings.DEBUG is True:
urlpatterns += static(settings.MEDIA_URL, 
document_root=settings.MEDIA_ROOT)

The model is:

class Disegni(models.Model):
iddisegni = models.AutoField(primary_key=True)
descrizione = models.CharField(max_length=45, blank=True, null=True)
revisione = models.CharField(max_length=45, blank=True, null=True)
file = models.FileField(upload_to='disegni/', blank=True, null=True)

class Meta:
managed = False
db_table = 'disegni'

the forms is:
class DisegniForm(forms.ModelForm):

class Meta:
model = Disegni
fields = ('iddisegni', 'descrizione', 'revisione', 'file')
labels = {'descrizione':'Descrizione', 'revisione':'Revisione', 
'file':'File'}


The settings.py is:

STATIC_URL = '/static/'
MEDIA_URL = '/media/'
STATIC_ROOT = "E:/dngo/mysite/polls/static"
MEDIA_ROOT = "E:/dngo/mysite/polls/media"

the template is generated 

The template is just : 

{% load static %}



{% csrf_token %}
{{ form.as_p }}
Salva
   


I never get errors but the file is not uploaded
Where is my mistake?

-- 
You received this message because you are subscribed to the Google Groups 
"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/a8713cc3-2a4c-42ba-8c54-976e1a4b8090%40googlegroups.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Raju N Somanna
Hi All

I see some good responses to my yesterday’s post….however 



*Please Note: This opportunity is in United States-New York City & requires 
resource to be onsite (No remote). I’m looking for resources with valid US 
work authorization. *Appreciate if you could communicate the same within 
your contacts.
 
Regards
Raju NS

On Wednesday, September 18, 2019 at 2:06:32 AM UTC+5:30, Raju N Somanna 
wrote:
>
> Hi All
>
> I've an immediate need for Backend Developers (*Python/Django ORM* - New 
> York City) with my client in NYC. As the title suggests my team is looking 
> for Python/Django specialist, someone who is good experience on ORM. 
>
> Please do let me know if you have any from your contacts/references who 
> might be interested in this opportunity. 
>
> *PS: ABOUT US*
> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in 
> revenues, 8000+ resources footprint across Americas, Europe, South Africa, 
> Asia Pacific and India. 
> Presence in the US from the past 17 years, with resources working in over 
> 24 states. Our US innovation labs are in San Jose, CA and we also have 
> offices in NJ, MI, AR. 
> We have plenty of successful use cases across diversified verticals 
> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail, 
> Hi-Tech.
> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain, 
> Big Data, Product Engineering (we own a technology agnostic DevOps 
> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
> We are backed by a parent company with over $50 billion market cap and 
> over 26,000 employees world-wide.
>
> Regards
> Raju NS
>  raju...@itcinfotech.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/bbcbcf24-f42b-4503-9eff-91f09946727f%40googlegroups.com.


Re: media file upload

2019-09-18 Thread mohammed habib
Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so that the 
file data is included in when the form is submitted

https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean

Sent from my iPhone

> On 18 Sep 2019, at 17:38, Luca Bertolotti  wrote:
> 
> Hello i can't upload the file, i'm in a debug mode:
> 
> the urls.is:
> 
> from django.contrib import admin
> from django.urls import path, include
> from django.conf import settings
> from django.conf.urls.static import static
> 
> 
> urlpatterns = [
> path('', include('polls.urls')), 
> path('admin/', admin.site.urls),
> 
> 
> ]
> if settings.DEBUG is True:
> urlpatterns += static(settings.MEDIA_URL, 
> document_root=settings.MEDIA_ROOT)
> 
> The model is:
> 
> class Disegni(models.Model):
> iddisegni = models.AutoField(primary_key=True)
> descrizione = models.CharField(max_length=45, blank=True, null=True)
> revisione = models.CharField(max_length=45, blank=True, null=True)
> file = models.FileField(upload_to='disegni/', blank=True, null=True)
> 
> class Meta:
> managed = False
> db_table = 'disegni'
> 
> the forms is:
> class DisegniForm(forms.ModelForm):
> 
> class Meta:
> model = Disegni
> fields = ('iddisegni', 'descrizione', 'revisione', 'file')
> labels = {'descrizione':'Descrizione', 'revisione':'Revisione', 
> 'file':'File'}
> 
> 
> The settings.py is:
> 
> STATIC_URL = '/static/'
> MEDIA_URL = '/media/'
> STATIC_ROOT = "E:/dngo/mysite/polls/static"
> MEDIA_ROOT = "E:/dngo/mysite/polls/media"
> 
> the template is generated 
> 
> The template is just : 
> 
> {% load static %}
> 
> 
> 
> {% csrf_token %}
> {{ form.as_p }}
> Salva
>
> 
> 
> I never get errors but the file is not uploaded
> Where is my mistake?
> -- 
> You received this message because you are subscribed to the Google Groups 
> "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/a8713cc3-2a4c-42ba-8c54-976e1a4b8090%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/08BB5D00-BF13-4D0F-83EA-BCBAB929AB1C%40gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Shirley Nelson
Ok I am available.

On Tue, Sep 17, 2019, 4:35 PM Raju N Somanna  wrote:

> Hi All
>
> I've an immediate need for Backend Developers (*Python/Django ORM* - New
> York City) with my client in NYC. As the title suggests my team is looking
> for Python/Django specialist, someone who is good experience on ORM.
>
> Please do let me know if you have any from your contacts/references who
> might be interested in this opportunity.
>
> *PS: ABOUT US*
> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in
> revenues, 8000+ resources footprint across Americas, Europe, South Africa,
> Asia Pacific and India.
> Presence in the US from the past 17 years, with resources working in over
> 24 states. Our US innovation labs are in San Jose, CA and we also have
> offices in NJ, MI, AR.
> We have plenty of successful use cases across diversified verticals
> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail,
> Hi-Tech.
> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain,
> Big Data, Product Engineering (we own a technology agnostic DevOps
> product), App Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
> We are backed by a parent company with over $50 billion market cap and
> over 26,000 employees world-wide.
>
> Regards
> Raju NS
>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/CA%2BN15oY2_oCcdcO4QWO7OVkSa_dP6%2BHr2K1Et-sw82wubPg8qw%40mail.gmail.com.


Re: queryser variable from template to a view

2019-09-18 Thread Jani Tiainen
Well that is the side-effect of capturers they convert value to desired
format.

You can find documentation about pre-defined converters and how to register
your own at
https://docs.djangoproject.com/en/2.2/topics/http/urls/#path-converters


ke 18. syysk. 2019 klo 19.33 Luca Bertolotti 
kirjoitti:

> Hello
> if i pass 
> and in the view i do this
>
> def exmple(request,myvar):
>   sort = myvar.order_by()
> i get an error because myvar is a string instead i near a query set
>
> Luca
>
> Il giorno mercoledì 18 settembre 2019 15:56:19 UTC+2, Jani Tiainen ha
> scritto:
>>
>> Hi.
>>
>>  to the rescue!
>>
>> Also it is recommended to use {% url %} tag to construct urls not to
>> hardcode them and once were there Django convention is to end urls to slash.
>>
>> ke 18. syysk. 2019 klo 15.53 Luca Bertolotti 
>> kirjoitti:
>>
>>> Hello i need to pass a query set from template to a view:
>>>
>>> 
>>>
>>> in which way i have to define the urls file
>>>
>>> path('test//***what to write+++', views.test, name='test'),
>>>
>>> --
>>> You received this message because you are 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/2ad42877-766c-49b9-af51-e67007af80f9%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/22af4b9c-839d-4d8a-ab73-94c2f6c72466%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/CAHn91ocKUjJHzggSGsSzmDMwLpvmxCPzV1DZYfRb%2BhLhpg8vAQ%40mail.gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Karen Tracey
Please everyone keep in mind that this mailing list has tens of thousands
of subscribers. Anyone interested in this job posting should contact the
poster directly, not post on this list.

-- 
You received this message because you are subscribed to the Google Groups 
"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/CACS9racuFQ7it4v4st%2BTzaF9yDsKXY%2BcmfNT0LHOz90mtuOumQ%40mail.gmail.com.


Re: Raju | ITC Infotech - Looking for Backend Developers (Python/Django ORM - New York City )

2019-09-18 Thread Ryan Gedwill
Hi, I am interested in the position.

I am available to work in US, but would need to relocate as I am located in 
California. 

Ryan Gedwill

> On Sep 17, 2019, at 1:21 PM, Raju N Somanna  wrote:
> 
> Hi All
> 
> I've an immediate need for Backend Developers (Python/Django ORM - New York 
> City) with my client in NYC. As the title suggests my team is looking for 
> Python/Django specialist, someone who is good experience on ORM. 
> 
> Please do let me know if you have any from your contacts/references who might 
> be interested in this opportunity. 
> 
> PS: ABOUT US
> ITC Infotech is a Global IT Consulting Organization with $200 mil+ in 
> revenues, 8000+ resources footprint across Americas, Europe, South Africa, 
> Asia Pacific and India. 
> Presence in the US from the past 17 years, with resources working in over 24 
> states. Our US innovation labs are in San Jose, CA and we also have offices 
> in NJ, MI, AR. 
> We have plenty of successful use cases across diversified verticals 
> including: Banking & Financial Services, Healthcare, Mfg, CPG-Retail, Hi-Tech.
> Our technology footprint encompasses: IoT, ML, AI, AR, RPA, Blockchain, Big 
> Data, Product Engineering (we own a technology agnostic DevOps product), App 
> Dev, Infra, PTC - PLM, ERP, BI, DW, Data Science…
> We are backed by a parent company with over $50 billion market cap and over 
> 26,000 employees world-wide.
> 
> Regards
> Raju NS
>  raju...@itcinfotech.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/4a35e21e-fef7-46b9-bdc5-72767c3e3196%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/BC892533-28F2-4E35-8F8E-B01F770CC359%40gmail.com.


Django cms and templates

2019-09-18 Thread Perceval Maturure
Dear all

I have a django project done with Django 2.1 and successfully made an apphook 
to the cms page bt the problem is that the template file does not display model 
data unless if I remove the syntax { %extends base.html %} at the top of the 
template html file
What could be causing this?
Please help

Sent from my iPhone

-- 
You received this message because you are subscribed to the Google Groups 
"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/4CE4415B-DDC4-4074-8F8C-630D98641EE5%40gmail.com.


Nested Model

2019-09-18 Thread Davin Pore
Seeking for your kind assistance on how to get the value of this using 
nested model on django restapi.

[image: image.png]
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/5ec8a13b-9429-48e5-9fc7-442347bb2268%40googlegroups.com.


How to retrieve data from MS SQL using wildcard with LIKE

2019-09-18 Thread leb dev
I have a django project that is connected to  MS SQL using **pyodbc**.

I am able to connect  and retrieve data.

But the problem is when i tried to filter the data on multiple fields using 
**WHERE & LIKE** the system crash crash and display the below error.

> 'tuple' object has no attribute 'format'

views.py


from django.shortcuts import render
import pyodbc


def connect(request):

conn = pyodbc.connect(
'Driver={ODBC Driver 17 for SQL Server};'
'Server=DESKTOP-LPD1575\\SQLEXPRESS;'
'Database=testDB;'
'UID=test;'
'PWD=test;'

)
query = 'n'
queryid = 3
cursor = conn.cursor()
   
c = cursor.execute('SELECT * FROM Artist where artistName like  ? 
or id = ?',('%{0}%','{1}').format(query,queryid))
   
print(c)
return render (request,'connect.html',{"c":c})

connect.html
==



id
FolderNumber
Folderdate
   

{% for row in c %}
 
{{ row.0 }}
{{ row.1 }}
{{ row.2 }}


{% endfor %}


-- 
You received this message because you are subscribed to the Google Groups 
"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/0913c12c-942b-472f-bc77-33f4b576235a%40googlegroups.com.


Re: media file upload

2019-09-18 Thread Luca Bertolotti
Thanks

Luca

Il giorno mercoledì 18 settembre 2019 19:29:00 UTC+2, mohammed habib ha 
scritto:
>
> Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so 
> that the file data is included in when the form is submitted
>
>
> https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean
>
> Sent from my iPhone
>
> On 18 Sep 2019, at 17:38, Luca Bertolotti  > wrote:
>
> Hello i can't upload the file, i'm in a debug mode:
>
> the urls.is:
>
> from django.contrib import admin
> from django.urls import path, include
> from django.conf import settings
> from django.conf.urls.static import static
>
>
> urlpatterns = [
> path('', include('polls.urls')), 
> path('admin/', admin.site.urls),
> 
> 
> ]
> if settings.DEBUG is True:
> urlpatterns += static(settings.MEDIA_URL, 
> document_root=settings.MEDIA_ROOT)
>
> The model is:
>
> class Disegni(models.Model):
> iddisegni = models.AutoField(primary_key=True)
> descrizione = models.CharField(max_length=45, blank=True, null=True)
> revisione = models.CharField(max_length=45, blank=True, null=True)
> file = models.FileField(upload_to='disegni/', blank=True, null=True)
>
> class Meta:
> managed = False
> db_table = 'disegni'
>
> the forms is:
> class DisegniForm(forms.ModelForm):
> 
> class Meta:
> model = Disegni
> fields = ('iddisegni', 'descrizione', 'revisione', 'file')
> labels = {'descrizione':'Descrizione', 'revisione':'Revisione', 
> 'file':'File'}
>
>
> The settings.py is:
>
> STATIC_URL = '/static/'
> MEDIA_URL = '/media/'
> STATIC_ROOT = "E:/dngo/mysite/polls/static"
> MEDIA_ROOT = "E:/dngo/mysite/polls/media"
>
> the template is generated 
>
> The template is just : 
>
> {% load static %}
> 
> 
> 
> {% csrf_token %}
> {{ form.as_p }}
> Salva
>
>
>
> I never get errors but the file is not uploaded
> Where is my mistake?
>
> -- 
> You received this message because you are 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/a8713cc3-2a4c-42ba-8c54-976e1a4b8090%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/10944f55-6262-4743-889d-821f4cea1567%40googlegroups.com.


Re: media file upload

2019-09-18 Thread Luca Bertolotti
thanks

Il giorno mercoledì 18 settembre 2019 19:29:00 UTC+2, mohammed habib ha 
scritto:
>
> Make sure to add ‘enctype="multipart/form-data"’ to your form tag, so 
> that the file data is included in when the form is submitted
>
>
> https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean
>
> Sent from my iPhone
>
> On 18 Sep 2019, at 17:38, Luca Bertolotti  > wrote:
>
> Hello i can't upload the file, i'm in a debug mode:
>
> the urls.is:
>
> from django.contrib import admin
> from django.urls import path, include
> from django.conf import settings
> from django.conf.urls.static import static
>
>
> urlpatterns = [
> path('', include('polls.urls')), 
> path('admin/', admin.site.urls),
> 
> 
> ]
> if settings.DEBUG is True:
> urlpatterns += static(settings.MEDIA_URL, 
> document_root=settings.MEDIA_ROOT)
>
> The model is:
>
> class Disegni(models.Model):
> iddisegni = models.AutoField(primary_key=True)
> descrizione = models.CharField(max_length=45, blank=True, null=True)
> revisione = models.CharField(max_length=45, blank=True, null=True)
> file = models.FileField(upload_to='disegni/', blank=True, null=True)
>
> class Meta:
> managed = False
> db_table = 'disegni'
>
> the forms is:
> class DisegniForm(forms.ModelForm):
> 
> class Meta:
> model = Disegni
> fields = ('iddisegni', 'descrizione', 'revisione', 'file')
> labels = {'descrizione':'Descrizione', 'revisione':'Revisione', 
> 'file':'File'}
>
>
> The settings.py is:
>
> STATIC_URL = '/static/'
> MEDIA_URL = '/media/'
> STATIC_ROOT = "E:/dngo/mysite/polls/static"
> MEDIA_ROOT = "E:/dngo/mysite/polls/media"
>
> the template is generated 
>
> The template is just : 
>
> {% load static %}
> 
> 
> 
> {% csrf_token %}
> {{ form.as_p }}
> Salva
>
>
>
> I never get errors but the file is not uploaded
> Where is my mistake?
>
> -- 
> You received this message because you are 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/a8713cc3-2a4c-42ba-8c54-976e1a4b8090%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/e0aa54ab-f8eb-4690-a656-c2aac39eec5a%40googlegroups.com.


Re: Nested Model

2019-09-18 Thread Ayser shuhaib
Hello Davin,

The image is not opening

On Thu, 19 Sep 2019 at 08:35, Davin Pore  wrote:

> Seeking for your kind assistance on how to get the value of this using
> nested model on django restapi.
>
> [image: image.png]
> 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/5ec8a13b-9429-48e5-9fc7-442347bb2268%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/CAE0AZGKSav%2Bs8FyOLCP3iNh-OomojVnU5XY4-gyKv4B2z3c83A%40mail.gmail.com.