Re: logging admin accesses

2023-12-19 Thread Larry Martell
I got this working. I had to add history = HistoricalRecords(m2m_fields=[products]) to the models with the M2M relationships. Did not see that in the docs anywhere. On Tue, Dec 19, 2023 at 2:17 PM Larry Martell wrote: > After creating the models for the m2m tables the changes to t

Re: logging admin accesses

2023-12-19 Thread Larry Martell
On Mon, Dec 18, 2023 at 7:23 PM Mike Dewhirst wrote: > > On 19/12/2023 9:51 am, Larry Martell wrote: > > Hmmm, in my case I do not see any models for those in any of my models.py > files. Where would I expect to find them? > > > You have to write them yourself. Yeah, tha

Re: logging admin accesses

2023-12-18 Thread Larry Martell
Larry Martell wrote: > > No, I have not see django-simple-history - thanks for the pointer - will > check it out. > > On Fri, Dec 15, 2023 at 9:02 PM Mike Dewhirst wrote: >> >> Just thinking about it again ... you could look at the Admin source to see >> how i

Re: logging admin accesses

2023-12-18 Thread Larry Martell
nd might reward very aggressive specification. > > Cheers > > Mike > > > > -- > (Unsigned mail from my phone) > > > > Original message > From: Larry Martell > Date: 16/12/23 01:47 (GMT+10:00) > To: django-users@googlegroups.com > Subject: Re: l

Re: logging admin accesses

2023-12-18 Thread Larry Martell
ables for only the critical information and > automate data collection for others in a plain text field for archival. > > It can be quite open ended and might reward very aggressive specification. > > Cheers > > Mike > > > > -- > (Unsigned mail from my phone) > >

Re: Help with DRF error

2023-12-16 Thread Larry Martell
On Sat, Dec 16, 2023 at 1:10 PM Reddy Tintaya wrote: > Can't you just use > workitem = serializers.PrimaryKeyRelatedField( > queryset=WorkItem.objects.all()) > instead of workitem_id? > No because workitem_id is what is sent in the request. > > On Sat, Dec 16, 2

Help with DRF error

2023-12-16 Thread Larry Martell
I have a DRF API. It is throwing an error that I have not been able to fix. Here is my view and serializer: class CreateNotations(CreateAPIView): permission_classes = [IsAuthenticated] serializer_class = NotationListSerializer def post(self, request, *args, **kwargs): return

Re: logging admin accesses

2023-12-15 Thread Larry Martell
--+-+-+ Shows an add, but not what was added. So my questions are: -how can I get it to show the details of what was added or changed -why are updates to UserInfo and UserExtendProduct shown, but updates to UserRole are not?

Re: logging admin accesses

2023-12-14 Thread Larry Martell
On Thu, Dec 14, 2023 at 5:49 PM Mike Dewhirst wrote: > Top posting because of phone email client. > > Have you seen the Admin history? Might be already logged for you. > Is that programically accessible? I want to record it in the database. > Original message ---

logging admin accesses

2023-12-14 Thread Larry Martell
Is there a way to capture all admin changes (add, change, delete). I have some middleware that gets called on any admin add, change, or delete, but I have not figured out a way to capture specifically what was done, something like: model, PK, action, e.g. user, 12, change, first name changed

Re: auth_user' doesn't exist

2023-12-02 Thread Larry Martell
On Sat, Dec 2, 2023 at 9:00 AM Nurlanbek Musaev wrote: > hello everyone > I get an error when I do makemigrations. I tried many things. It didn't > happen > django.db.utils.ProgrammingError: (1146, "Table 'prodb1.auth_user' doesn't > exist") Have you run the initial migrations that would have

Re: Management command scheduling options

2023-10-25 Thread Larry Martell
On Wed, Oct 25, 2023 at 5:35 AM Mike Dewhirst wrote: > > Ahmedrufai > > I looked at APScheduler and like Celery it is too much of a sledgehammer for > my tiny problem. > > I ended up using cron to launch the command each day. It works perfectly. > > My task now is to find a way to automate

uwsgi

2023-06-04 Thread Larry Martell
I normally deploy my django apps using nginx and uwsgi. I recently found that the uwsgi mailing list is defunct, and I read this on the uwsgi github page: Note: The project is in maintenance mode (only bugfixes and updates for new languages apis). Do not expect quick answers on github issues.

Connection reset by peer on file upload if JWT expires

2023-06-02 Thread Larry Martell
We have a django app and it supports a file upload request. The entire upload comprises multiple requests. We are authenticating with JWT and we have logic to handle a 401 and in that case use the refresh token to get a new access token and resend the failed request. However if the token expires

Re: Django date time picker

2023-05-29 Thread Larry Martell
On Mon, May 29, 2023 at 1:14 PM Thomas Mutavi wrote: > > Hello, how can i implement a form with several date fields which have date > and time picker in django? You can use the jQuery UI datetimepicker. -- You received this message because you are subscribed to the Google Groups "Django

Re: Unable to write to database

2023-05-22 Thread Larry Martell
On Sun, May 21, 2023 at 10:54 AM William Nash (Bill) wrote: > > I'm new to django and I'm trying to learn as I program a small website for my > scuba diving business. I'm running into a error that when I try to add a > diver the database does not update. When I goto >

List validator

2023-02-27 Thread Larry Martell
I have this defined in my serializer: case_status = serializers.ListField( child=serializers.CharField( allow_blank=True, max_length=512, allow_null=True, required=False, default="''", ), source='casestatus',

Re: Server Error 500 Nginx when DEBUG=False

2023-01-29 Thread Larry Martell
On Sun, Jan 29, 2023 at 9:14 AM ALBERT ASHABA AHEEBWA < ashabaaheebwaalb...@gmail.com> wrote: > So I was able to successfully host my first ever Django app on linode. > After the excitement had won off, I started testing the routes, everything > was running fine except for two routes. > > SERVER

filtering queryset in CreateAPIView view

2022-12-28 Thread Larry Martell
I have a CreateAPIView view with this code in the serializer: class AssignWorkItemSerializer(serializers.Serializer, WorkitemSerializerMixin): assigneeIds = serializers.ListSerializer( child=serializers.PrimaryKeyRelatedField(

Re: getting unique id

2022-11-28 Thread Larry Martell
On Wed, Nov 23, 2022 at 3:11 PM Larry Martell wrote: > > On Wed, Nov 23, 2022 at 3:01 PM Thomas Lockhart > wrote: > > > > Why not use the existing Django AutoField? > > Because I have multiple rows with the same batch_id, and also I would > like the batch_ids to b

Re: AttributeError: module 'django.db.models' has no attribute 'PointField'

2022-11-27 Thread Larry Martell
On Sun, Nov 27, 2022 at 2:40 PM Ilyas Modni wrote: > > AttributeError: module 'django.db.models' has no attribute 'PointField' Are you importing: from django.contrib.gis.db import models -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: getting unique id

2022-11-23 Thread Larry Martell
wn row. > > On Nov 23, 2022, at 8:56 AM, Larry Martell wrote: > > > > I have an app that needs to get a unique ID. Many threads run at the > > same time that need one. I would like the IDs to be sequential. When I > > need a unique ID I do this: > > > >

Re: getting unique id

2022-11-23 Thread Larry Martell
> On Wed, 23 Nov 2022, 16:57 Larry Martell, wrote: >> >> I have an app that needs to get a unique ID. Many threads run at the >> same time that need one. I would like the IDs to be sequential. When I >> need a unique ID I do this: >> >

getting unique id

2022-11-23 Thread Larry Martell
I have an app that needs to get a unique ID. Many threads run at the same time that need one. I would like the IDs to be sequential. When I need a unique ID I do this: with transaction.atomic(): max_batch_id = JobStatus.objects.select_for_update(nowait=False).aggregate(Max('batch_id'))

Lost connection to MySQL server during query

2022-06-17 Thread Larry Martell
I have a standalone python script (i.e. not part of a web app) that makes use of the ORM. I call djago.setup(), make some queries, then call a function that can take 8 hours or more to run. When the function returns I want to make more queries, but they fail with 'Lost connection to MySQL server

Re: variable inside a template

2022-06-16 Thread Larry Martell
On Thu, Jun 16, 2022 at 4:09 AM luca72.b...@gmail.com wrote: > > Hello i have a list like: > mylist = ['1,png','2.png',3.jpj'] > in the template i do as follow: > {% for o in mylist %} > > {% if "png" in o %} > {{ o }} > > {% else %} > {{o}}

Re: simple command line ./manage.py shell puzzle

2022-04-21 Thread Larry Martell
On Thu, Apr 21, 2022 at 2:53 PM cseb...@gmail.com wrote: > > The script should quietly exist without error. > > I actually have a longer script that is the real workhorse. > I just made this tiny one to showcase the issue. > > I can past > > import datetime ; [datetime for e in [1, 2]] > > into a

Re: simple command line ./manage.py shell puzzle

2022-04-21 Thread Larry Martell
On Thu, Apr 21, 2022 at 1:06 PM cseb...@gmail.com wrote: > > Why does this fail?... > > % echo "import datetime ; [datetime for e in [1, 2]]" > test > > % ./manage.py shell < test > > Traceback (most recent call last): > File "./manage.py", line 8, in >

Re: How to protect Python Source Code

2021-02-25 Thread Larry Martell
On Thu, Feb 25, 2021 at 11:10 AM Kommula Kavitha wrote: > > Hi Team, > > We have application developed using Python. Want to know how to protect > source code? There is pyinstaller (http://www.pyinstaller.org/). I tried to use it 4 or 5 years ago and it could not handle all the dependencies I

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-29 Thread Larry Martell
On Sat, Jan 23, 2021 at 7:41 PM Ryan Nowakowski wrote: > > On Sat, Jan 23, 2021 at 11:05:14AM -0800, Larry Martell wrote: > > On Sat, Jan 23, 2021 at 8:14 AM Ryan Nowakowski wrote: > > > > > > A couple of places to look: > > > > > > 1. Differ

Re: Static Folder not loading

2021-01-28 Thread Larry Martell
On Thu, Jan 28, 2021 at 10:16 AM hari49pf wrote: > > Hi, > > I am trying to load static file to my project its not loading, > I have changed the path of static in settting.py still its not loading static > file. > tryed to check the file is loading by using > manage.py findstatic test.css > PLZ

Re: How can I use my Company SSO(Single sign On ) for login into my django application ??

2021-01-27 Thread Larry Martell
On Wed, Jan 27, 2021 at 6:02 AM Kumar Gaurav wrote: > > Hii , > > My users come to my django application after authenticated from company SSO. > Now , I don't want to create my own authentication model. I just want to > login the users who come to my page from the requests storing the details. >

Re: Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-23 Thread Larry Martell
of python and all python packages. There are some minor revision differences in a bunch of OS level packages. Could that be a factor? > > On January 22, 2021 2:51:30 PM CST, Larry Martell > wrote: >> >> I have an app deployed in many places and it uses Django Microso

Django Microsoft Authentication Backend not succeeding on new deployments

2021-01-22 Thread Larry Martell
I have an app deployed in many places and it uses Django Microsoft Authentication Backend. Starting yesterday when we deploy the app the auth is now not working. We get back Failed to authenticate you for an unknown reason. Please try again later. We can see in the azure logs that the login was

Re: Admin help class CSS

2020-12-11 Thread Larry Martell
If you have a pure CSS question, this list can be very helpful: https://www.css-discuss.org/mailman/listinfo/css-d/ On Fri, Dec 11, 2020 at 4:56 PM Mike Dewhirst wrote: > > Joash > > By all means. If I wasn't entirely clear, I am using html inside model.field > help_text - which works nicely

Re: forloop.counter

2020-10-15 Thread Larry Martell
On Thu, Oct 15, 2020 at 7:32 AM luca72.b...@gmail.com wrote: > > i have this : > {% if forloop.counter < {{ variable }} %} > i have this error: > > Could not parse the remainder: '{{' from '{{' > > how i can solve it? You don't need {{ }} inside of a {% %} -- You received this message because

Re: CSS problems

2020-09-16 Thread Larry Martell
On Wed, Sep 16, 2020 at 10:04 AM ‫אורי‬‎ wrote:‬ > > Hi, > > My website, https://en.speedy.net/, the date of birth input is bordered red > with Firefox, and I can't find why the border is red? I checked and there is > nothing red in the CSS and it's not red with Chrome or Edge. Any idea why the

Re: Django dynamic time settings in DB

2020-07-26 Thread Larry Martell
On Sun, Jul 26, 2020 at 1:50 PM adiath...@gmail.com wrote: > > How can you continuously update your DB time field in django without post > request. Use websockets and channels. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Invalid syntax on line 16 of manage.py

2020-07-20 Thread Larry Martell
On Mon, Jul 20, 2020 at 5:57 AM Douglas Ii wrote: > > While following the tutorial for creating your first Django app, I run into a > problem when entering the command line "python manage.py runserver" into my > terminal. I am using a mac and I get the Error message: > > > File "manage.py",

Re: how to fetch data into a template (table)

2020-06-22 Thread Larry Martell
On Sat, Jun 20, 2020 at 11:41 AM Faith Mwai wrote: > > Am having a challenge of displaying data into my template table, the function > is; > > def customers(request): > if request.method == 'POST': > accountno = request.POST['accountno'] > id= request.POST['id'] >

Re: urgent

2020-06-19 Thread Larry Martell
On Fri, Jun 19, 2020 at 2:32 PM Awais Ahmad wrote: > > i'm facing this problem and i can't fix it any body please help me or tell me > about this error It should be static not staticfiles. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django IIS windows

2020-06-04 Thread Larry Martell
On Thu, Jun 4, 2020 at 10:05 PM Giovanni Silva wrote: > Hello. > > I need help to set up my Django Project in my IIS server. > > Does anyone has a tutorial or a link to help me to configure it? > I did this once and it was incredibly painful. If there is any way you can deploy on Linux do so.

Re: Please help me out?

2020-05-31 Thread Larry Martell
On Sat, May 30, 2020 at 11:30 PM meera gangani wrote: > > I want to generate trello-board in my django application > Can anyone tell me the How to do this? > Trello-board is like( to-do and future enhancements and doing ) where there > are 3-4 columns Take a look at

Re: How to display pie chart using Django

2020-05-07 Thread Larry Martell
On Thu, May 7, 2020 at 6:39 AM ratnadeep ray wrote: > > Hi all, > > I just started to work on Django and hence have limited knowledge about it. > > Now I need to design an app to display a pie chart based on some sample data. > Can anybody please help me to do so? Is there any sample app

Re: Watch "Ever Thought How This Games Like PUBG | CALL OF DUTY | Are developed" on YouTube

2020-05-02 Thread Larry Martell
On Sat, May 2, 2020 at 11:30 AM Kasper Laudrup wrote: > > Hi Raj, > > On 02/05/2020 14.10, Anonymous Patel wrote: > > https://youtu.be/kkNXbVFiqjc > > > > How is this in any way related to Django? This guy has spammed many many groups with this same posting. -- You received this message

django_microsoft_auth

2020-04-20 Thread Larry Martell
Anyone here have any experience with django_microsoft_auth? I have some issues and questions. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Azure AD SSO from django

2020-03-04 Thread Larry Martell
I would the users of my django app to be able to use SSO using their Azure AD creds. To me SSO means if they have already logged in to something using their ADA creds then when they go to my django app they get in without having to enter any creds. I found a few packages that support logging in

Re: Channels, daphne, and asgiref, oh my!

2020-02-24 Thread Larry Martell
;GET / HTTP/1.1", upstream: "http://0.0.0.0:8090/;, host: "xx.xx.xx.xx" Any ideas on what I should have in my config file for this to work? On Mon, Feb 24, 2020 at 4:19 PM Larry Martell wrote: > Thanks Andrew. Upgrading to py 3.7 did the trick. Now struggling to > get

Re: Channels, daphne, and asgiref, oh my!

2020-02-24 Thread Larry Martell
an Fazrihady wrote: >> >> I have these working module combinations, but my Python is 3.6.9: >> asgiref==2.2.0 >> channels==2.0.2 >> channels_redis==2.3.0 >> daphne==2.1.0 >> Django==2.2.4 >> django-redis==4.10.0 >> redis==3.3.6 >> Twist

Channels, daphne, and asgiref, oh my!

2020-02-21 Thread Larry Martell
I am in a bit of version hell. Not fun on a Friday afternoon. Django 2.0.4, python 3.5.2 Trying to get channels, websockets, daphne, and asgiref working. When I installed the latest channels it did not work with my version of mysqlclient and some googling led me to install 2.0 of channels. That

Re: Could not parse the remainder: '='dashboard'' from 'section='dashboard''

2019-11-22 Thread Larry Martell
== -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit

Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
Ha! How about perl? ;-) On Tue, Sep 24, 2019 at 8:33 AM Nick Sarbicki wrote: > > I'm not convinced anyone could pay me enough to go back to Python 1... > > > On Tue, Sep 24, 2019 at 1:32 PM Larry Martell wrote: >> >> You can get anyone to do anything for enough money.

Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
t; -- > Regards > Deep L Sukhwani > > > On Tue, 24 Sep 2019 at 17:53, Larry Martell wrote: >> >> Anaconda, Enthought, ActiveState, Red Hat and maybe others as well. >> Also large companies can do their own support. >> >> On Tue, Sep 24, 2019 at 8:11 A

Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
companies will maintain there own version of > Python programming language which will continue to be maintained as long as > they have paid users for Python 2? I seriously doubt that. Or may be I am > understanding it all wrong. > > > -- > Regards > Deep L Sukhwani > >

Re: convert python 3 to python2

2019-09-24 Thread Larry Martell
On Tue, Sep 24, 2019 at 4:15 AM Andréas Kühne wrote: > > Official access isn't denied - and python 2 will probably be available. The > problem is that you don't get any security fixes or any updates at all. That > in itself is a major problem. If someone is saying that you need to use > python

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

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

Re: Converting django app to iPhone app

2019-04-22 Thread Larry Martell
ost 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: >> >> Yes, it only render

Re: Converting django app to iPhone app

2019-04-22 Thread Larry Martell
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 Mon, 22 Apr

Re: Converting django app to iPhone app

2019-04-22 Thread Larry Martell
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 share your ex

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: 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

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

No module named context_processors

2019-01-02 Thread Larry Martell
I am having an odd interment problem. I have an app which is deployed at 30 different sites. At one site only, and only intermittently, user will get the error 'No module named context_processors'. It may happen on a page that was previously accessed with no error and upon refreshing the same

Re: Django on IIS

2018-12-19 Thread Larry Martell
s the command line version of point 2 above. > > IIS also a has a tendency to read a web.config XML in the IIS site root; from > which I think a lot of this can be set from. You can certainly set > environment variable there (such as PYTHONPATH , or DJANGO_SETTINGS_MODULE ). &

Re: Django on IIS

2018-12-18 Thread Larry Martell
Get-WindowsFeature shows that web-cgi is installed but not iis-cgi. Are these the same? On Tue, Dec 18, 2018 at 12:07 PM Larry Martell wrote: > > Thanks. I ran that command, and I checked the settings and CGi is > installed and enabled. I have the CGI icon in the IIS config page, b

Re: Django on IIS

2018-12-18 Thread Larry Martell
ecifically > you are probably missing CGI. > The PS line to install that seems to be:- > > Enable-WindowsOptionalFeature -Online -FeatureName IIS-CGI > > > Hope this helps a little. > > > On Tue, 2018-12-18 at 10:40 -0500, Larry Martell wrote: > > I am following the

Re: Django on IIS

2018-12-18 Thread Larry Martell
All I can > > say is that it is possible. > > I once had to implement a web service on a Windows server and eventually > installed Apache. That worked brilliantly although it wasn't a heavy > duty application. Django works well on Windows so Apache is a fallback > if IIS doesn

Django on IIS

2018-12-17 Thread Larry Martell
Anyone have any experience setting up a Django app to work with IIS? I have inherited what I was told is a working system, but it's not working. Before I post details of my issues and questions I wanted to see if anyone here has successfully got a Django app to run with IIS. -- You received this

Re: Password reset from address

2018-12-17 Thread Larry Martell
ssword reset in the django.contrib.auth package. You > can add the form_email by creating a class that inherits the > PasswordResetView and sets the from_email property on that view. > > Regards, > > Andréas > > > Den fre 14 dec. 2018 kl 19:02 skrev Larry Martell : >> &

Password reset from address

2018-12-14 Thread Larry Martell
Is there a way to set the from address used in the password reset email? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: How to update if user exist instead of create?

2018-09-18 Thread Larry Martell
On Tue, Sep 18, 2018 at 8:13 AM, Django Lover wrote: > How i can update model when Key exist else create a new one?? > > > My code is- > > **Form.py** > > class UserSettingForm(forms.ModelForm): > class Meta: >model = StUserSetting >fields = ( 'default_language',

Re: odd crash

2018-06-13 Thread Larry Martell
this error, not just get it intermittently. I still think there is another higher up error, and I tried to find it by setting a breakpoint and running the devel server, but with that the error never occurs. On Fri, Jun 8, 2018 at 4:16 PM, Larry Martell wrote: > I have an app that uses 1.9. It will w

odd crash

2018-06-08 Thread Larry Martell
I have an app that uses 1.9. It will work fine for weeks and weeks, and then out of the blue a page that has just worked will crash with this: Request Method: GET Request URL: Django Version: 1.9 Python Version: 2.7.5 Installed Applications: ['django.contrib.admin', 'django.contrib.auth',

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

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

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: >> >>

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

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

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 <suab...@gmail.com> 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 <larry.ma

Re: export sql query to excel

2018-04-16 Thread Larry Martell
abiut <suab...@gmail.com> 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 1

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

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')

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

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

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

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':

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

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,

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

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

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

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

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

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

Re: Big data

2017-09-29 Thread Larry Martell
hanged a couple of settings (like > work_mem) and improved > > On Fri, Sep 29, 2017 at 4:48 AM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> I am taking about using hbase as a db for Django. My use case is that a >> have a Django app and the data in mysql has

Re: Big data

2017-09-28 Thread Larry Martell
p 28, 2017 at 9:34 PM, Larry Martell <larry.mart...@gmail.com> > wrote: > >> Has anyone ever used any big data solutions, such as hbase, with django? >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Big data

2017-09-28 Thread Larry Martell
Has anyone ever used any big data solutions, such as hbase, with django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: best practices for location of start up code

2017-09-25 Thread Larry Martell
ments. Turns out what we need to do should not be part of the server init, so we moved it somewhere else. > On 2017-09-23 21:50, Larry Martell wrote: >> On Sat, Sep 23, 2017 at 2:39 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >>> On Sat, Sep 23, 2017 at 1:34 PM, James

Re: best practices for location of start up code

2017-09-23 Thread Larry Martell
On Sat, Sep 23, 2017 at 2:39 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Sat, Sep 23, 2017 at 1:34 PM, James Schneider > <jrschneide...@gmail.com> wrote: >> >> >> On Sep 22, 2017 2:58 PM, "Larry Martell" <larry.mart...@gmail.com>

  1   2   3   4   5   6   >