Re: Lazy evaluation of django custom context processor in base.html

2019-06-10 Thread BIJAL MANIAR
ay to pass this value to templates without hitting database query on every hit. Thanks, Bijal On Monday, April 15, 2019 at 6:35:15 PM UTC+5:30, BIJAL MANIAR wrote: > > > Hi, > > Have created a custom context processor to retrieve extra user attribute > from custom UserData

Re: Lazy evaluation of django custom context processor in base.html

2019-04-17 Thread BIJAL MANIAR
Hi, Can anyone help on this. I want to pass value of "USERROLE" across all the django templates through "base.html". How to efficiently call custom context processor as it queries database for every page load. Thanks, Bijal On Monday, April 15, 2019 at 6:35:15 PM UT

Lazy evaluation of django custom context processor in base.html

2019-04-15 Thread BIJAL MANIAR
Hi, Have created a custom context processor to retrieve extra user attribute from custom UserData model. Passing this variable in "base.html" template calls the custom context processor function on every request to render html page. Since it is a database query, how to efficiently call custom

Rename column headers with python DictWriter

2019-03-15 Thread BIJAL MANIAR
Hi, Using Python DictWriter can we rename the column names? Need to rename headers in CSV file so that output looks like. Basically need to rename database fieldnames like emp_name, emp_role to Name,Designation: *Name, Designation* ABC, IT DEF, Admin I am using Python DictWriter in django

Re: Django ORM queryset substring on a column

2019-01-04 Thread BIJAL MANIAR
Hello, Can anyone please help with this. Thanks, Bijal On Thursday, January 3, 2019 at 6:47:43 PM UTC+5:30, BIJAL MANIAR wrote: > > > Hello, > > Consider below column in mysql table Employee. I need to write django orm > query for below mysql query. > emp_number > 4-

Django ORM queryset substring on a column

2019-01-03 Thread BIJAL MANIAR
Hello, Consider below column in mysql table Employee. I need to write django orm query for below mysql query. emp_number 4-DEF-A111 3-MNO-333 2-DEF-222 1-ABC-111 Mysql query which splits by '-' and matches against last index. SELECT * from Employee WHERE substring_index(emp_number, '-', -1) =

Integrating Okta SAML2 with existing django web application

2018-05-07 Thread BIJAL MANIAR
Hi, I want to integrate an existing django web application with Okta identity provider. I could find a couple of packages: https://github.com/fangli/django-saml2-auth https://github.com/MindPointGroup/django-saml2-pro-auth Have started to use django-saml2-auth. Can we also configure advanced

Re: Convert Excel code to Python

2018-01-09 Thread BIJAL MANIAR
it was? Thanks, Bijal On Tuesday, January 9, 2018 at 6:45:55 PM UTC+5:30, BIJAL MANIAR wrote: > > > Hi, > > There is an old application in Excel where macros are coded in VBScript > and there is both frontend (forms) and backend in Excel. Need to replicate > it as a web applic

Convert Excel code to Python

2018-01-09 Thread BIJAL MANIAR
Hi, There is an old application in Excel where macros are coded in VBScript and there is both frontend (forms) and backend in Excel. Need to replicate it as a web application (Python, Django, React). From scratch, have to build it in python. I have checked vb2py library is there for code

Re: Enable https for a production django application

2017-12-04 Thread BIJAL MANIAR
r Apache config. > > On 4.12.2017 10.03, BIJAL MANIAR wrote: > > > Hello, > We need to enforce an https connection for production django application > running with apache and mod-wsgi. Can anyone please help me with what it > will take to implement this. > > Thanks, > Bij

Enable https for a production django application

2017-12-04 Thread BIJAL MANIAR
Hello, We need to enforce an https connection for production django application running with apache and mod-wsgi. Can anyone please help me with what it will take to implement this. Thanks, Bijal -- You received this message because you are subscribed to the Google Groups "Django users"

Weird issue in outputting CSV files for downloading in django

2017-09-25 Thread BIJAL MANIAR
Hi, I want my view to respond with a file for downloading, so that the browser pops up the download/file save dialog. I am using the 'Content-Disposition' header to specify the name of the file. When I use the django development server, it works perfectly fine in all browsers When I run it on

Re: How to install mod_wsgi after upgrading to python3.5 from python2.7

2017-09-15 Thread BIJAL MANIAR
--with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/bin/python3 On Friday, September 15, 2017 at 3:24:46 PM UTC+5:30, James Schneider wrote: > > > > On Sep 15, 2017 2:04 AM, "BIJAL MANIAR" <bij...@gmail.com > > wrote: > > > Hi, > I had a pr

How to install mod_wsgi after upgrading to python3.5 from python2.7

2017-09-15 Thread BIJAL MANIAR
Hi, I had a production application running with Python2.7 and Django1.11 through Apache and mod_wsgi. Now I have upgraded to Python3.5 and created virtual env. pip install mod_wsgi is giving below error. (p3_venv) bash-4.1# pip install mod_wsgi Collecting mod_wsgi Downloading

Python 2 versus 3

2017-09-04 Thread BIJAL MANIAR
Hi, I have current django application with django 1.11 and python 2.7. Python 2.7 has support till 2020-01-01 and 3.5 has support till 2020-09-13. I've been asked to upgrade to Python 3.5. My question is why is there a need to upgrade from 2.7 to 3.5 as EOL support for both of them is nearly

Re: Deploy production django applications with Python2.7 and Python3.5 on same Apache web server

2017-08-29 Thread BIJAL MANIAR
;C:/virtualenvs/ecst_venv_D111P36A22M51\lib\os.py", line 409 yield from walk(new_path, topdown, onerror, followlinks) ^ SyntaxError: invalid syntax Can anyone please confirm if there is an alternative to using different apache instances. Thanks, Bijal On Monday, August 28, 2017 at 4:50:5

Re: Deploy production django applications with Python2.7 and Python3.5 on same Apache web server

2017-08-28 Thread BIJAL MANIAR
I don't think you really need to use a different setup, just some > configuration in your httpd.conf file. > > Otherwise you could also use uwsgi - which can handle that sort of thing > easily. > > Regards, > > Andréas > > 2017-08-28 13:20 GMT+02:00 BIJAL MANIAR

Deploy production django applications with Python2.7 and Python3.5 on same Apache web server

2017-08-28 Thread BIJAL MANIAR
Hi, I have existing setup of django app within virtual env (Python 2.7, Django 1.11), running on Apache2.2 on production environment. On the same server, I want to setup one more django app within virtual env (Python 3.5, Django 1.11). How can we have two django apps with two different

Align radio buttons horizontally in django 1.11

2017-04-19 Thread BIJAL MANIAR
Hi, I'm trying to upgrade existing application from 1.4 to 1.11. Below snippet of code to align radio buttons horizontally is working fine with django 1.4 from django.utils.safestring import mark_safe class HorizontalRadioRenderer(forms.RadioSelect.renderer): def render(self): return

Upgrade from django 1.4 to django 1.11

2017-03-07 Thread BIJAL MANIAR
Hi, Currently we have an application built using django 1.4. As the latest LTS release is 1.11, we are planning to upgrade it to 1.11. Which of the below 3 alternatives is a better option for django version upgrade. 1. Should we take it one release at a time? ie, Make the jump from 1.4 to