Re: Recruiting part time Django, python programmer for Bitcoin startup- remote work OK

2014-04-29 Thread Larry Martell
On Tue, Apr 29, 2014 at 4:13 PM, Aaron Zirker wrote: > Hello Django users group, > > My name is Aaron Zirker and I am the CEO and Founder at The Cryptocurrency > Analytics Company. We have created an automated Bitcoin trading platform and > recently received funding to further our front end develo

Re: is anybody in NYC?

2017-11-05 Thread Larry Martell
On Sun, Nov 5, 2017 at 5:01 PM, li qiongyao wrote: > is anybody in NYC? No, everyone left. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubsc

Re: [OT] Is Trump planning to break the Internet?

2017-12-10 Thread Larry Martell
On Sun, Dec 10, 2017 at 5:24 PM, Etienne Robillard wrote: > Hey all, > > On December 14, the FCC will vote to repeal net neutrality and possibly rig > the Internet. This means that major corporations could pay to have their > content delivered faster while independent websites traffic would be > t

Re: [OT] Is Trump planning to break the Internet?

2017-12-11 Thread Larry Martell
On Mon, Dec 11, 2017 at 9:24 AM, Matthew Pava wrote: >>> Please keep your political rhetoric and irresponsible scaremongering off >>> this list. > >>> All the net neutrality repeal will do is restore some of the permissionless >>> innovation that allowed the internet to blossom in the first plac

Re: [OT] Is Trump planning to break the Internet?

2017-12-12 Thread Larry Martell
I did not read what I wrote on neither foxnews.com nor on telecoms.com (the latter site I have never even heard of). On Tue, Dec 12, 2017 at 8:14 AM, mccc wrote: > I agree with Matthew's sentiment; > > also, I'd like to point out that the words you (Larry) posted are not your > own but are litera

Re: print option with django application

2017-12-19 Thread Larry Martell
On Tue, Dec 19, 2017 at 1:50 AM, Ketul Suthar wrote: > I want to print data from database when user click on print button. > > how can I achieve it ? > > Is there any in-built module in djnago for printing data ? You cannot force the user to print. What I do in these situations is generate a pfd

Re: Calculate Response Time

2017-12-22 Thread Larry Martell
I had a need for this as well, and here is what I did. I split each request up into 4 parts: Query Time, Process Time, Render Time, and Network Latency. On the server I have a class all my request handlers subclass and inherit from. That class has a method for getting the data from the db and a met

reading binary from django.core.files.uploadedfile.TemporaryUploadedFile

2018-01-17 Thread Larry Martell
I have a django app that runs on both linux and windows. One request that it processes contains PNG files encoded as an octet-stream on the client. The server gets an object of type django.core.files.uploadedfile.TemporaryUploadedFile and it does this to save the files on disk: with open(fn, 'wb')

Re: Two command-line questions. How do I get a list of model names? How do I match a user-inputted string with a model name?

2018-01-18 Thread Larry Martell
import django.apps django.apps.apps.get_models() On Wed, Jan 17, 2018 at 8:31 PM, Tom Tanner wrote: > I've got the following in `management/commands/my_command.py`: > > from django.core.management.base import BaseCommand, CommandError > from django.conf import settings > > import os.p

Re: Syntax Error when trying to migrate to Postgresql

2018-02-14 Thread Larry Martell
On Wed, Feb 14, 2018 at 5:32 PM, Joe wrote: > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.postgresql', > 'NAME': ‘postgres’, > 'USER': ‘postgres’, > 'PASSWORD': ‘*’, > 'HOST': ‘localhost’, > 'PORT': ‘8000’, > } > } Looks l

Re: writing to my django website via a separate application

2018-03-26 Thread Larry Martell
On Mon, Mar 26, 2018 at 5:26 PM, Damon Branch wrote: > Hi, > I'm developing a website which contains a database. I then need to be able > to update that database from a separate python application like a desktop or > mobile app. > I am new to Django and fairly new to Python (few months). > After r

Re: Setting Django

2018-03-27 Thread Larry Martell
On Tue, Mar 27, 2018 at 9:37 PM, Benoit EVRARD wrote: > Hello, I'm new to this Django Framework. By the way, is it a Framework? I > have no time to read all of the posts and tutos. Django seems to interpret > python's coding am I right? You have no time to read the tutorials, but we are supposed

Prevent site from requiring new login

2018-04-03 Thread Larry Martell
I have a site that, once a user logs in I would like them to never get logged out. I have set SESSION_COOKIE_AGE = sys.maxint but still, after some amount of time (I don't know exactly how long, but it's around 12 hours) the users get a login page. Is there a way to accomplish this? -- You receiv

Re: export sql query to excel

2018-04-16 Thread Larry Martell
I use xlsxwriter and I do it like this: output = io.BytesIO() workbook = xlsxwriter.Workbook(output, {'in_memory': True}) # write file output.seek(0) response = HttpResponse(output.read(), content_type='application/ms-excel') response['Content-Dispos

Re: Need Help With integrating Python Scripts with Django Frame Work

2018-04-16 Thread Larry Martell
Use ajax, e.g.: https://stackoverflow.com/questions/30456958/python-script-called-by-ajax-executed-by-django-server On Mon, Apr 16, 2018 at 3:48 PM, Balu Nanduri wrote: > Hi, > I am working on a project where I have to communicate with Tableau > server and generate pptx with the images d

Re: export sql query to excel

2018-04-16 Thread Larry Martell
26 PM, sum abiut wrote: > Thanks Larry, > I haven't actually try xlsxwriter before so i find some difficulties > understanding your code. Do you mind explaining the code, i will definitely > have a read on the documentation. > > cheers > > > On Tue, Apr 17, 2018 at 1:

Re: export sql query to excel

2018-04-16 Thread Larry Martell
The same way you pass parameters to any view. On Mon, Apr 16, 2018 at 8:50 PM, sum abiut wrote: > Thanks Larry, > How to i pass my query parameter to the xlsxwriter. > > Cheers > > > > On Tue, Apr 17, 2018 at 1:42 AM, Larry Martell > wrote: >> >>

Re: Adding stored procedures

2018-04-19 Thread Larry Martell
There are django-mssql and django_pyodbc but I was never able to get either of those to work for me. I ended up using odbc - I couldn't use the ORM, but I still was able to connect to the MSSQL DB from my django app using raw queries. On Wed, Apr 18, 2018 at 8:55 AM, Matthew Pava wrote: > Hi Chri

Re: if statement for development/production mode in templates?

2018-04-23 Thread Larry Martell
On Mon, Apr 23, 2018 at 9:34 AM, Alexander Joseph wrote: > Hello, is there a way to make an if statement that is based on whether you > are running in development mode or production mode? Or based on which > settings file you are using? > > My app allows users to login with their office365 account

Re: if statement for development/production mode in templates?

2018-04-23 Thread Larry Martell
Somewhere in the code is a place where data is passed to the template. Did you write the app? On Mon, Apr 23, 2018 at 9:55 AM, Alexander Joseph wrote: > I dont know what that means > > On Monday, April 23, 2018 at 7:49:25 AM UTC-6, larry@gmail.com wrote: >> >> On Mon, Apr 23, 2018 at 9:34 AM,

Re: Python Sqlalchemy filter by date range

2018-04-24 Thread Larry Martell
I think you are looking for the range function https://docs.djangoproject.com/en/dev/ref/models/querysets/#range On Mon, Apr 23, 2018 at 11:54 PM sum abiut wrote: > I have two date picker fields that i want the users to select from date to > end date. and i want to display data between the two

Re: Implementing a 'please wait' page

2018-06-01 Thread Larry Martell
On Thu, May 31, 2018 at 7:35 PM, Mohammed Noor wrote: > Hello Guys, > > I currently have a process running on my django application which takes about > 10-15 minutes to complete. > > Currently, the user clicks on a 'submit' button and this process starts. The > web page remains in a hung state f

Using django login functionality in a non django app

2016-04-25 Thread Larry Martell
We have an existing django app with login, change password, and forgot password functionality. Then we have this other app built with the falcon framework. The client side of that is C++/Qt. That app has no login functionality - you bring it up and you're in. We would like to somehow use the login

Re: Using django login functionality in a non django app

2016-04-25 Thread Larry Martell
. If not, you are screwed anyway (from > security point of view), because even if your app pops up a login screen, > there can (and will) be ways to get around it. > > Best, > Gergely > > On Apr 25, 2016 22:37, "Larry Martell" wrote: >> >> We have an exi

Re: Using django login functionality in a non django app

2016-04-26 Thread Larry Martell
f authentication to use and what to store is up to your > decision: HTTP Basic (store user/password), HTTP session (store the session > cookie) or token (store the token) based auths are the most common examples. > > Best, > Gergely > > On Apr 26, 2016 00:09, "Larry Martell&

Re: Using django login functionality in a non django app

2016-04-26 Thread Larry Martell
hem to a web page. I > don’t see the need for user admin functions, though. > > > Gergely Polonkai > about.me/gergely.polonkai > > 2016-04-26 13:10 GMT+02:00 Larry Martell : >> >> Well, the issue with simply implementing auth, is that we'd need to >>

Re: Using django login functionality in a non django app

2016-04-27 Thread Larry Martell
view for these tasks. However, we are moving out from Django > field here, as this is getting more and more a falcon/UX-related question. > > > Gergely Polonkai > about.me/gergely.polonkai > > 2016-04-26 14:19 GMT+02:00 Larry Martell : >> >> I need to support creat

Re: Using django login functionality in a non django app

2016-05-03 Thread Larry Martell
eturn True. What am I missing here? On Wed, Apr 27, 2016 at 11:53 AM, Gergely Polonkai wrote: > > I would create a separate view for this, like /falcon_login/, which could > give you a plain text result. But that’s totally up to you. > > > Gergely Polonkai > about.me/gergely.po

Re: Connecting to an established MS SQL database

2016-05-06 Thread Larry Martell
On Thu, May 5, 2016 at 3:26 PM, David McDonald wrote: > Hello, I am very new to Django and have an idea for an application at work. > > We have an already established MS SQL database, that I have a read only user > for. > > Is there any way I can connect to this database and retrieve data from it,

get all columns as a list

2016-05-19 Thread Larry Martell
This is probably very simple, but I just can't figure out how to do it. I want to get all the columns in some rows as a list. I know I could use values_list and flat=True and list all the columns, but is that the only way? I want to do something like this: rows = FOO.objects.filter(bar='baz') a

Re: get all columns as a list

2016-05-20 Thread Larry Martell
On Fri, May 20, 2016 at 2:23 AM, Erik Cederstrand wrote: > >> Den 20. maj 2016 kl. 00.12 skrev Larry Martell : >> >> This is probably very simple, but I just can't figure out how to do it. >> >> I want to get all the columns in some rows as a list. I know I

Re: get all columns as a list

2016-05-20 Thread Larry Martell
1/1305139 > [2] https://docs.djangoproject.com/en/1.9/topics/serialization/ > > On May 20, 2016 00:13, "Larry Martell" wrote: >> >> This is probably very simple, but I just can't figure out how to do it. >> >> I want to get all the columns in some rows as a list. I know I

Re: get all columns as a list

2016-05-23 Thread Larry Martell
why you need this, do you care to >> > share the use case? >> >> When new data comes in I want to compare it to the most recently added >> row and only add a new row if it differs. >> >> >> > [1] http://stackoverflow.com/a/29088221/1305139 >> >

Re: get all columns as a list

2016-05-23 Thread Larry Martell
seems it can. As pointed out by Erik in another post, an >> >> empty values_list() returns all the columns, which is what I want. >> >> >> >> > On the other hand, I started wondering why you need this, do you care >> >> > to >> >> >

overriding date format

2016-05-24 Thread Larry Martell
I have 1 page in my app where I want to override the app's date format. I tried assigning to settings.DATE_FORMAT in the view but that had no effect. I know I can format the date in the template, but without making a lot of changes, I don't know what fields are dates. I thought perhaps the date fil

Re: overriding date format

2016-05-25 Thread Larry Martell
On Wed, May 25, 2016 at 3:58 AM, James Schneider wrote: > > On May 24, 2016 3:32 PM, "Larry Martell" wrote: >> >> I have 1 page in my app where I want to override the app's date >> format. I tried assigning to settings.DATE_FORMAT in the view but that >

Re: get all columns as a list

2016-05-25 Thread Larry Martell
I am the OP. I was implementing what my customer asked for. But you make a good point that they might want the latest data not the oldest. I will suggest that to them. Thanks. On Wed, May 25, 2016 at 9:29 AM, Derek wrote: > We are both speaking as non-users of the OP's system. ;) > > I agree that

Re: get all columns as a list

2016-05-27 Thread Larry Martell
Just FYI, they did not want that change. They did not feel it added any value. But in reality, they probably just didn't want me spending time on it so I could do other things. On Wed, May 25, 2016 at 9:35 AM, Larry Martell wrote: > I am the OP. I was implementing what my customer asked

setting custom header before redirect

2016-05-31 Thread Larry Martell
I need to set a custom header before I do a redirect. My code does this: resp = redirect(uri) resp['X-Capdata-Auth'] = 'authorized' return resp But when I look at the traffic with tcpdump, I do not see that header value. What am I doing wrong here? -- You received this message becau

Re: setting custom header before redirect

2016-05-31 Thread Larry Martell
On Tue, May 31, 2016 at 7:53 AM, Larry Martell wrote: > I need to set a custom header before I do a redirect. My code does this: > > resp = redirect(uri) > resp['X-Capdata-Auth'] = 'authorized' > return resp > > But when I look at the traff

Re: Django inside Docker

2016-06-03 Thread Larry Martell
You could try posting on the docker forum: https://forums.docker.com On Fri, Jun 3, 2016 at 4:49 PM, Davi Diório Mendes wrote: > Hi everyone, > > I was developing with django localy, in my laptop, and my manager asked to > project run inside a docker. > > I did and now django can't find my templa

django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Larry Martell
I have successfully deployed django1.6 with uwsgi and nginx on RHEL6 but I cannot seem to get it working on RHEL7. I get Internal Server Error in the browser, and this in the uwsgi log: --- no python application found, check your startup logs for errors --- [pid: 10582|app: -1|req: -1/2] xx.xx.xx

Re: django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Larry Martell
I figured this out - the problem turned out to be that the RHEL 7 machine had django 1.6.0 whereas the RHEL 6 machine had 1.6.10. Once I installed 1.6.10 on the 7 machine all was well. On Mon, Jun 6, 2016 at 12:50 PM, Larry Martell wrote: > I have successfully deployed django1.6 with uwsgi

Re: django1.6 with uwsgi and nginx on RHEL 7

2016-06-06 Thread Larry Martell
see > https://virtualenv.pypa.io/en/stable/ > > > On Mon, Jun 6, 2016 at 11:45 PM, Larry Martell > wrote: >> >> I figured this out - the problem turned out to be that the RHEL 7 >> machine had django 1.6.0 whereas the RHEL 6 machine had 1.6.10. Once I >> installed

Display of user model extension in admin

2016-06-13 Thread Larry Martell
I have extended the user model to another table I called UserInfo, and I added it to the add user admin page. So now when I go to add a user I see this on the page: User Info User Info: #1 If I edit a user that exists I see: User Info User Info: UserInfo object How can I remove that second lin

Re: Display of user model extension in admin

2016-06-14 Thread Larry Martell
On Mon, Jun 13, 2016 at 4:12 PM, Larry Martell wrote: > I have extended the user model to another table I called UserInfo, and > I added it to the add user admin page. > > So now when I go to add a user I see this on the page: > > User Info > User Info: #1 > > If I ed

Re: Display of user model extension in admin

2016-06-14 Thread Larry Martell
On Tue, Jun 14, 2016 at 10:52 AM, Larry Martell wrote: > On Mon, Jun 13, 2016 at 4:12 PM, Larry Martell > wrote: >> I have extended the user model to another table I called UserInfo, and >> I added it to the add user admin page. >> >> So now when I go to add

error logging in after updating to 1.9

2016-06-28 Thread Larry Martell
I had a 1.6 app and I updated to 1.9. Now when I try to login it fails and I see this in the logs. This works in 1.6. Any ideas what the issue is? [28/Jun/2016 17:43:51] DEBUG [django.template:923] Exception while resolving variable 'STATIC_URL' in template 'registration/login.html'. Traceback (mo

running devel server in docker container

2016-06-28 Thread Larry Martell
I am trying to run the devel server in a docker container. On the physical machine I don't have port 8000 available and I usually use 8006 for the devel server. Outside of the docker container I can connect to 8006. Inside the container I tried both: manage.py runserver 0.0.0.0:8006 and just mana

Re: running devel server in docker container

2016-06-28 Thread Larry Martell
On Tue, Jun 28, 2016 at 5:11 PM, Michal Petrucha wrote: > On Tue, Jun 28, 2016 at 05:01:20PM -0400, Larry Martell wrote: >> I am trying to run the devel server in a docker container. On the >> physical machine I don't have port 8000 available and I usually use >>

Re: error logging in after updating to 1.9

2016-06-30 Thread Larry Martell
It seems like in 1.6 template code like this: {% if error %} ... {% endif %} Was OK. But in 1.9 if error is not defined it throws an exception. So in 1.9 what is the proper way to check to see if a variable is defined or not? On Tue, Jun 28, 2016 at 4:03 PM, Larry Martell wrote: > I had a

django in docker

2016-07-05 Thread Larry Martell
I am trying to run nginx/uwsgi/django in a docker container. If I mount the dir with my django project in the container when I create the container it works fine. But I want to make the image self-contained and not dependent on the local file system. So I changed the Dockerfile to copy the dir cont

Re: django in docker

2016-07-06 Thread Larry Martell
han making everything world-readable, I usually create a user > and chown all the directories to that user. > > Can you post your Dockerfile? > > On Wed, Jul 6, 2016 at 5:28 AM, Larry Martell wrote: >> I am trying to run nginx/uwsgi/django in a docker container. If I >> mount

Re: running devel server in docker container

2016-07-07 Thread Larry Martell
On Tue, Jun 28, 2016 at 5:19 PM, Larry Martell wrote: > On Tue, Jun 28, 2016 at 5:11 PM, Michal Petrucha > wrote: >> On Tue, Jun 28, 2016 at 05:01:20PM -0400, Larry Martell wrote: >>> I am trying to run the devel server in a docker container. On the >>> physical

content type headers from multipart

2016-07-19 Thread Larry Martell
I have a django endpoint that gets a multipart and I want look at the content type headers in each part. When I look at request.META['CONTENT_TYPE'] I get: 'multipart/form-data; boundary="boundary_.oOo._OTEwMTc3NzM5ODMxMjQxNzkyMTI5OTY3NDQwOQ=="' Googling this I found https://github.com/django/dja

selectively requiring login

2016-08-01 Thread Larry Martell
I have a view that is accessed both from the browser and from a non-browser app. The request from the non browser app come from a remote app where the user has already had to login (or they would never get to the point where they could cause the request to be sent). Is there a way to make login req

Re: selectively requiring login

2016-08-01 Thread Larry Martell
ving a token to the app when it login. > > 2016-08-01 18:17 GMT+02:00 Larry Martell : >> I have a view that is accessed both from the browser and from a >> non-browser app. The request from the non browser app come from a >> remote app where the user has already had to login

selectively requiring login

2016-08-01 Thread Larry Martell
On Mon, Aug 1, 2016 at 3:03 PM, James Schneider wrote: > > > On Mon, Aug 1, 2016 at 11:33 AM, Michal Petrucha > wrote: >> >> On Mon, Aug 01, 2016 at 12:17:38PM -0400, Larry Martell wrote: >> > I have a view that is accessed both from the browser and from a >&

Re: selectively requiring login

2016-08-01 Thread Larry Martell
the user-agent. If that's > the case, log the user in and let the request hit the @login_required > decorator. > > If you don't simply reuse the session cookie, I would spend some time, > listening with wireshark and messing with a browser, checking that I > am not

associating save link with button

2016-08-08 Thread Larry Martell
Not really a django question but I'm hoping someone can help me here. I have a django app but the html is not displayed in a browser - render_to_string is called and the html is returned in a response to custom app that displays the page. On the page I have a button that sends a request back to th

Re: associating save link with button

2016-08-09 Thread Larry Martell
I figured this out. I just had to add 'download' to the tag: Export On Tue, Aug 9, 2016 at 3:04 AM, M Hashmi wrote: > Please paste code. > > > On Monday, August 8, 2016 at 12:18:45 PM UTC-7, larry@gmail.com wrote: >> >> Not really a django question but I'm hoping someone can help me here.

receiving PNG file in django

2016-08-19 Thread Larry Martell
I have a falcon server that I am trying to port to django. One of the falcon endpoints processes a request that contains a PNG file sent with content_type = 'application/octet-stream'. It writes the data to a file maintaining the correct PNG structure. The falcon code does this: form = cgi.FieldS

Re: receiving PNG file in django

2016-08-22 Thread Larry Martell
gt; and https://docs.djangoproject.com/en/1.10/ref/files/uploads/#uploaded-files > > This is the same as using cgi.FieldStorage to parse files from a submitted > multipart/form-data. You can then call .read() on the UploadedFile object, > or better yet use .chunks() to copy to your final destin

Re: receiving PNG file in django

2016-08-22 Thread Larry Martell
st up so that the rest of the middlewares and the view won't be > upset. > > Good luck, and I hope someone gives you a better answer. > > Bill > > On Fri, Aug 19, 2016 at 4:17 PM, Larry Martell > wrote: >> >> I have a falcon server that I am trying to port to djang

Re: receiving PNG file in django

2016-08-22 Thread Larry Martell
On Mon, Aug 22, 2016 at 11:00 AM, Michal Petrucha wrote: > On Mon, Aug 22, 2016 at 10:11:49AM -0400, Larry Martell wrote: >> When I get the request, request.FILES is empty. Yet the content type >> is multipart/form-data and the method is POST: >> >> (Pdb) print

Re: receiving PNG file in django

2016-08-22 Thread Larry Martell
On Mon, Aug 22, 2016 at 11:14 AM, Michal Petrucha wrote: > On Mon, Aug 22, 2016 at 11:10:38AM -0400, Larry Martell wrote: >> On Mon, Aug 22, 2016 at 11:00 AM, Michal Petrucha >> wrote: >> > On Mon, Aug 22, 2016 at 10:11:49AM -0400, Larry Martell wrote: >> >> W

Re: receiving PNG file in django

2016-08-22 Thread Larry Martell
hacks > and as such are things you do in a darkened room and keep secret. Note that > you want to recognize when it's one of these uploads before applying the > chosen hack(s). One man's hack is another man's elegant solution ;-) > On Mon, Aug 22, 2016 at 10:53 AM, Lar

Re: External access

2016-11-07 Thread Larry Martell
On Mon, Nov 7, 2016 at 8:48 AM, bob gailer wrote: > I am running a the django server, listening at port 8000. I can access the > server using localhost. When I try using my external ip address I get "The > server at 24.211.133.163 is taking too long to respond." I have port 8000 > forwarded to my

Re: External access

2016-11-07 Thread Larry Martell
On Mon, Nov 7, 2016 at 1:15 PM, bob gailer wrote: > On 11/7/2016 8:50 AM, Larry Martell wrote: >> >> On Mon, Nov 7, 2016 at 8:48 AM, bob gailer wrote: >>> >>> I am running a the django server, listening at port 8000. I can access >>> the >>> s

separating group editing permission from custom group extension permission

2016-11-07 Thread Larry Martell
I have extended the group model and added a custom field and permission. I want to be able to give a user permission to edit this new field, but not have permission to edit any of the other group attributes. But if I do not grant the 'can change group' permission they cannot get to the group admin

strategies for adding a custom group permission

2016-11-08 Thread Larry Martell
I posed a question yesterday asking how to separate the group editing permissions from the permission to edit a new custom group permission that I added. I did not get any replies to that and in researching it I am thinking perhaps that is not possible. So I want to pose the question differently -

Re: strategies for adding a custom group permission

2016-11-09 Thread Larry Martell
On Wed, Nov 9, 2016 at 8:32 AM, Melvyn Sopacua wrote: > On Tuesday 08 November 2016 09:55:51 Larry Martell wrote: > >> I need to add a configurable data filter that will be used in my app >> and I want that filter to be specifiable at the django group level. I >> want

Intermittent 'template not found' errors

2016-12-09 Thread Larry Martell
I have an app that is deployed at 15 sites and has been running for 6 years. All these deployments are with django 1.5, python 2.6, CentOS6, and apache, and they all work perfectly. I just deployed the app at a new site, but this one is django 1.9, python 2.7, CentOS7, and nginx/uwsgi. Only at this

Re: IIS configuration for python Django project

2019-03-22 Thread Larry Martell
On Fri, Mar 22, 2019 at 8:28 AM patel hastik wrote: > > Hello, everyone > > I created python Django web Application I want to configure with IIS on the > window OS. I try many things and research about this I found video and > document and I follow all the step mention in the document but I am g

Re: Showing old data

2019-04-02 Thread Larry Martell
On Mon, Apr 1, 2019 at 11:12 PM Swetank Subham Roy wrote: > > Hello folks, > I have created a hosted a django web app on apache2 using mod_wsgi, the > content should automatically refresh everyday. But it is not getting > refreshed automatically. I need to manually restart or reload the apache i

Converting django app to iPhone app

2019-04-22 Thread Larry Martell
Has anyone here every taken a django web app and converted it to an iPhone app? If so, can you share your experiences here please? 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

Re: Converting django app to iPhone app

2019-04-22 Thread Larry Martell
ing how to build a frontend on the > platform. Django doesn't really get in the way at all at that point. > > > On Mon, 22 Apr 2019, 14:19 Larry Martell, wrote: >> >> Has anyone here every taken a django web app and converted it to an >> iPhone app? If so, can you sha

Re: Converting django app to iPhone app

2019-04-22 Thread Larry Martell
ly renders HTML templates then you may want > to consider adding an API on top of that. But the backend definitely does not > need to be rewritten, only slightly expanded upon (using python). > > Outside of that you only need to focus on the frontend, usually with swift. > > On Mo

Re: Converting django app to iPhone app

2019-04-22 Thread Larry Martell
's almost all about > getting the frontend to make the correct requests and deserialising the data. > Authentication often serves as a tripping point as well but there's n > solutions to the problem. > > On Mon, 22 Apr 2019, 17:28 Larry Martell, wrote: >> >>

Re: How to ask questions on Django

2019-04-28 Thread Larry Martell
http://www.catb.org/~esr/faqs/smart-questions.html On Sun, Apr 28, 2019 at 12:01 PM John Bagiliko < john.bagil...@aims-senegal.org> wrote: > Hi all, > > I am a passionate Python Developer. I love Django. I have seen most of the > questions that are posed here and have tried to help. I usually fa

Re: Creating pdf in python

2019-06-27 Thread Larry Martell
On Thu, Jun 27, 2019 at 10:45 AM Django Dojo wrote: > > Hello everyone, > > I have a pdf template and I need different Individuals(s) to fill out > different sections of the document on the web using online form(s). Is there > an Django package that will allow me to do this? > > Ex: end user wil

Re: No module named NullHandler!!

2017-01-30 Thread Larry Martell
On Mon, Jan 30, 2017 at 2:31 PM, Adriana Lucía Céspedes wrote: > I really hope you could help me with this error: > > > Unable to configure handler 'null': Cannot resolve > 'django.utils.log.NullHandler': No module named NullHandler > > I am using Django 1.10 on Ubuntu 14.04 with python 2.7 > > >

Making email required

2017-01-31 Thread Larry Martell
I want to make the email field required in the user admin add and change pages. Following some posts I read on stackoverflow I did this: class MyUserCreationForm(UserCreationForm): def __init__(self, *args, **kwargs): super(MyUserCreationForm, self).__init__(*args, **kwargs) #

Re: Making email required

2017-02-01 Thread Larry Martell
On Wed, Feb 1, 2017 at 5:32 AM, wrote: > You can define a single form to use for creating and updating users like > this: > > class CustomUserChangeForm(UserChangeForm): > class Meta: > > > model = User > > > fields = ('email', 'password', 'first_name', 'last_name', 'photo', > 'is_active', 'is

combining ORM and raw SQL in same query

2017-02-20 Thread Larry Martell
Is there any way to use both the ORM and raw SQL in the same query? I have an existing app that uses the ORM and now I have a need to add SQL like this to the select: (CASE WHEN TRIM(IFNULL(roiname, '')) IN ('', 'None') THEN CONCAT_WS('.', roi_type_id, roi_id) WHEN CONCAT_WS('.', roi_type_id,

Re: combining ORM and raw SQL in same query

2017-02-20 Thread Larry Martell
Thanks! On Mon, Feb 20, 2017 at 10:52 AM, m1chael wrote: > i did something like this recently using .extra / select > > https://docs.djangoproject.com/en/1.10/ref/models/querysets/#extra > > > > On Mon, Feb 20, 2017 at 10:49 AM, Larry Martell > wrote: >> >>

Re: combining ORM and raw SQL in same query

2017-02-21 Thread Larry Martell
Original Message- > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On > Behalf Of Larry Martell > Sent: Monday, February 20, 2017 3:00 PM > To: django-users@googlegroups.com > Subject: Re: combining ORM and raw SQL in same query > > Thanks! > &

group by 3 fields

2017-02-25 Thread Larry Martell
I have a query set and I need to do the SQL equivalent of GROUP BY col1, col2, col3 I have read many SO posts about using aggregate and count but I have not been able to get this to work using 3 columns. Anyone know how to do this? -- You received this message because you are subscribed to the

Re: group by 3 fields

2017-02-26 Thread Larry Martell
Order by is not the same as group by. Group by does aggregation On Sun, Feb 26, 2017 at 5:30 AM chris rose wrote: > there is a model meta option called ordering. you can specify a list of > fields to order by > > docs found at: > https://docs.djangoproject.com/en/1.10/ref/models/options/#orderin

Re: group by 3 fields

2017-02-26 Thread Larry Martell
On Sun, Feb 26, 2017 at 6:55 AM, Daniel Roseman wrote: > On Sunday, 26 February 2017 11:11:39 UTC, larry@gmail.com wrote: >> >> Order by is not the same as group by. Group by does aggregation >> > > You should explain what you want to achieve. Grouping is pointless on its > own. In any case, w

Re: group by 3 fields

2017-02-26 Thread Larry Martell
On Sun, Feb 26, 2017 at 5:05 PM, wrote: > > > On Sunday, February 26, 2017 at 12:55:17 PM UTC+1, Daniel Roseman wrote: >> >> >> You should explain what you want to achieve. Grouping is pointless on its >> own. In any case, when working with an ORM like Django's it is generally not >> helpful to t

Re: group by 3 fields

2017-03-01 Thread Larry Martell
On Mon, Feb 27, 2017 at 3:41 AM, wrote: > > > On Monday, February 27, 2017 at 3:52:38 AM UTC+1, larry@gmail.com wrote: >> >> [SQL] That is a language I >> have worked in for over 20 years, and when I see a querying need that >> is how I think, and then I see how can I do that with the ORM. >

Re: group by 3 fields

2017-03-01 Thread Larry Martell
On Wed, Mar 1, 2017 at 8:01 AM, wrote: > >> >> As is so often the case, the requirements changed. Now what I had to >> do, if I was doing it in SQL would have been: >> >> (CASE >> WHEN TRIM(IFNULL(roiname, '')) IN ('', 'None') THEN CONCAT_WS('.', >> CONVERT(roi_type_id, CHAR), roi_id) >> WHEN C

Re: Chart library for django

2017-03-06 Thread Larry Martell
On Mon, Mar 6, 2017 at 1:10 AM, Luvpreet Singh wrote: > > Hi everyone, > > I am looking for some solution to display django database queryset to django > admin over graphs. > I had used highcharts to do that earlier, but to use highcharts, I have to > write too much scripts and functions. > > Is

Re: Migrations

2017-03-15 Thread Larry Martell
On Fri, Mar 10, 2017 at 3:17 PM, Matthew Pava wrote: > Does anyone else get a migraine when working migrations? I have 2 django systems I support. The first has 2 deployments, both in house, and one is generally a week or so behind the other. For this system migrations generally work fine, howeve

Re: php

2017-05-05 Thread Larry Martell
On Fri, May 5, 2017 at 3:28 PM, James Schneider wrote: > > Can we add php code in our django framework to make it better > > > No. > > Nothing can be made better by adding PHP to it. LOL! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Re: julian date to normal date conversion

2017-06-05 Thread Larry Martell
On Mon, Jun 5, 2017 at 6:10 PM, sum abiut wrote: > i am using python,and django as my web framework. I use sqlalchemy to > connect to MSSQL data that is running Epicor database. Epicor is using > julian date. How to you convert julian date to normal date It's called Gregorian, not normal. You c

Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread Larry Martell
On Tue, Jun 13, 2017 at 7:54 AM, Stodge wrote: > I have a model with a many to many relationship. I need to know when a > record is added to or removed from the many to many. > > Is this possible? Thanks Perhaps you can use a database trigger. -- You received this message because you are subscr

Re: Keep logged in accross Sites

2017-07-05 Thread Larry Martell
On Wed, Jul 5, 2017 at 7:25 AM, Pablo Camino Bueno wrote: > Hi Constantine, > > Do you know how to implement this? I'd need to login the user in a domain > that is not the one the view was reached from. > > Could it be building a custom authentication backend that somehow logs the > user in all th

serving over either 80 or 443

2017-07-19 Thread Larry Martell
This is probably not strictly a Django question, but I'm hoping someone here has had to solve this before. We have a django app that is sometimes deployed in an environment with SSL and talks over port 443, and other times is deployed in a non-SSL environment and talks over port 80. In our templa

<    1   2   3   4   5   6   >