Django Admin Shortcuts

2024-05-24 Thread Mike Schem
Hey all, I’m seeking some support and feedback on my PR. I’ve added keyboard shortcuts to the Django admin for the save actions. We use it at my company, and it’s pretty helpful for power users. I’d love to hear what the community thinks. https://github.com/django/django/pull/17599 Mike Schem

Re: Increasing iteration count for the PBKDF2 password hasher

2024-05-23 Thread Mike Dewhirst
On 23/05/2024 6:12 pm, Shaheed Haque wrote: Hi, As happens from time-to-time, I see the 5.1 alpha recently announced has increased the iteration count for the PBKDF2 password hasher (from 720k to 870k), and the putative release notes for 5.2 mention a further increase (to 1M). I assume

Re: Does migrate --fake updates django_migrations?

2024-03-23 Thread Mike Dewhirst
s not (yet) been listed in the Django migrations table. Hth Mike 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

Re: Django web site is not opened though runserver us running

2024-03-06 Thread Mike Dewhirst
On 7/03/2024 3:02 pm, ram.mu...@gmail.com wrote: Hi, Hoping someone can provide some clue on this? I think you'll find most people are reluctant to click on unsolicited web links no matter how innocent they appear to be. Perhaps you can describe the problem, tell us what you have tried and

RE: How to send email from django without authenticate smtp server

2024-03-05 Thread Mike Dewhirst
Why don't you use TLS so your connection with the server is encrypted? Port 25 is a bit ancient.--(Unsigned mail from my phone) Original message From: Praveen Chaudhary Date: 5/3/24 04:50 (GMT+10:00) To: django-users@googlegroups.com Subject: How to send email from django

RE: How to send email from django without authenticate smtp server

2024-03-05 Thread Mike Dewhirst
Why don't you use TLS so your connection with the server is encrypted? Port 25 is a bit ancient.--(Unsigned mail from my phone) Original message From: Praveen Chaudhary Date: 5/3/24 04:50 (GMT+10:00) To: django-users@googlegroups.com Subject: How to send email from django

Re: Data model design questio: graph in database

2024-02-26 Thread Mike Dewhirst
On 26/02/2024 8:00 pm, Sébastien Hinderer wrote: I will thus need to find a way to disable in the admin interface the possibility to work directly on the Vertex and Edge classes, but I expect the documentation will tell me how to achieve this. In fact you need to enable the classes you want -

Re: Data model design questio: graph in database

2024-02-25 Thread Mike Dewhirst
if edge.which_class() == "type 1"] edges_type_2 = [edge for edge in all_edges if edge.which_class() == "type 2"] On the other hand, if you want to keep all edges in the same database table it might be better/simpler to add a field 'type' to the table as you were originally think

Re: Data model design questio: graph in database

2024-02-25 Thread Mike Dewhirst
expect. I find such an approach very comforting.CheersMike--(Unsigned mail from my phone) Original message From: Sébastien Hinderer Date: 25/2/24 21:46 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: Data model design questio: graph in database Dear Mike,I

Re: Data model design questio: graph in database

2024-02-24 Thread Mike Dewhirst
there and execute calls to which_class() for each instance involved. That might be enough to get you started. Cheers Mike Many thanks in advance, Seb. -- We recommend signal.org Signed email is an absolute defence against phishing. This email has been signed with my private

Re: HttpResponse works but HttpResponseRedirect does not

2024-01-02 Thread Mike Dewhirst
quot;output.csv"' return responseLe mar. 2 janv. 2024 à 05:45, Mike Dewhirst a écrit : I wonder if someone can point out my mistake? The following code happily downloads a constructed text file ...     csv = make_csv(context['result'])     # This do

HttpResponse works but HttpResponseRedirect does not

2024-01-01 Thread Mike Dewhirst
Content-Type': 'text/plain',     # Set the content-disposition header to prompt user download     'Content-Disposition': f'attachment; filename="{fname}.csv"'     },     ) Many thanks for any help Cheers Mike -- Signed email is an absolute defence against phishi

Re: logging admin accesses

2023-12-19 Thread Mike Dewhirst
I was saying Django's inspectdb will write them for you.M--(Unsigned mail from my phone) Original message From: Larry Martell Date: 20/12/23 00:51 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses On Mon, Dec 18, 2023 at 7:23 PM Mike Dewhirst

Re: logging admin accesses

2023-12-18 Thread Mike Dewhirst
els ... just having the model declarations should not require a migration. Haven't checked that myself. On Mon, Dec 18, 2023 at 5:26 PM Mike Dewhirst wrote: Those many-to-many relations most certainly can have models and all of mine always do. It is more explicit to do so but m

Re: logging admin accesses

2023-12-18 Thread Mike Dewhirst
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 it is working now and perhaps find a way to include the mis

Re: logging admin accesses

2023-12-15 Thread Mike Dewhirst
) Original message From: Mike Dewhirst Date: 16/12/23 12:38 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses You seem to be asking for a full history 'system'. I think the Admin history exists to show a bit of history with a link to go back to the change

Re: logging admin accesses

2023-12-15 Thread Mike Dewhirst
) To: django-users@googlegroups.com Subject: Re: logging admin accesses 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.Thanks, this is useful, but it does not seem to be logging

RE: logging admin accesses

2023-12-14 Thread Mike Dewhirst
Top posting because of phone email client.Have you seen the Admin history? Might be already logged for you.Mike--(Unsigned mail from my phone) Original message From: Larry Martell Date: 15/12/23 06:44 (GMT+10:00) To: django-users@googlegroups.com Subject: logging admin

Re: htmx progress indicator problem - might be caching

2023-12-02 Thread Mike Dewhirst
On 2/12/2023 5:42 pm, Mike Dewhirst wrote: I'm now thinking/wondering if a htmx timed execution - say every one or two seconds - might call a view which monitors a singleton being updated by the main view kicked off by the form's submit button. Well that almost worked! I can update

Re: Select Boxes and Database

2023-12-02 Thread Mike Dewhirst
.__init__(), we have to send divqs again     form.set_division_queryset(divqs)     if form.is_valid():     ... Cheers Mike Cheers Dave -- Dave Merrick TutorInvercargill http://tutorinvercargill.co.nz Daves Web Designs Website https://tutorinvercargill.co.nz/daves

Re: htmx progress indicator problem - might be caching

2023-12-01 Thread Mike Dewhirst
a progress bar. I think Celery might be overkill until needed for scaling up. I do accept that Celery is the obvious solution and used everywhere. I just need to exhaust potentially simpler methods. Many thanks Thomas for persisting. Cheers Mike to create tasks for each item. That'll allow your

Re: htmx progress indicator problem - might be caching

2023-11-29 Thread Mike Dewhirst
n parallel with the submit button click. Many thanks for taking an interest. Cheers Mike On Tuesday, November 28, 2023 at 2:26:20 AM UTC Mike Dewhirst wrote: I'm trying but failing to get htmx to deliver a progress indication. The task is creating records in the database for each i

htmx progress indicator problem - might be caching

2023-11-27 Thread Mike Dewhirst
this ticking over? Thanks for any hints. Cheers Mike -- 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...@googl

Re: Management command scheduling options

2023-10-25 Thread Mike Dewhirst
On 25/10/2023 11:49 pm, Adam Stein wrote: On Wed, 2023-10-25 at 08:24 -0400, Larry Martell wrote: 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

Re: Management command scheduling options

2023-10-25 Thread Mike Dewhirst
On 25/10/2023 11:24 pm, Larry Martell wrote: 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

Re: Management command scheduling options

2023-10-25 Thread Mike Dewhirst
server.CheersMike--(Unsigned mail from my phone) Original message From: Ahmedrufai Otuoze Date: 24/10/23 00:11 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: Management command scheduling options Hi Mike,I've implemented something similar to what you mentioned

Re: Management command scheduling options

2023-10-23 Thread Mike Dewhirst
on a new server? Mike You could also use something like https://apscheduler.readthedocs.io/en/3.x/ if you wanna something OS independent. El lun, 23 oct 2023 a las 7:08, Mike Dewhirst () escribió: Django docs suggest cron or Windows scheduler for running management commands. I

Management command scheduling options

2023-10-23 Thread Mike Dewhirst
project I can hook into and test the date? The task is somewhat database intensive and needs to run quarterly for some users, monthly for most and weekly for others depending on their preferences. Ideas anyone? Thanks Mike -- Signed email is an absolute defence against phishing. This email has

RE: Strange bug with Firefox

2023-10-14 Thread Mike Dewhirst
I've seen that behaviour too. The solution is to use Chrome if you want to view source. I assume Mozilla's caching design is somewhat aggressive and ignores the URL's view source prefix. Mike--(Unsigned mail from my phone) Original message From: 'Simon Connah' via Django users

RE: Postgres connection error

2023-10-08 Thread Mike Dewhirst
There is a step missing somewhere if migrations has incorrect permissions.If Django is correctly installed - as it seems to be - then your settings must be deficient somewhere. The first migration ought to create Django's own tables etc even if you haven't written any of your own models.I would

Reference data while testing - interesting

2023-10-05 Thread Mike Dewhirst
so I'm asking here if anyone has a solution. Many thanks Cheers Mike - - - - - [1] Given the specific requirements of your testing scenario, where you need to access read-only reference data from a production database while emptying the regular testing database between tests, you can achieve

Re: Reference data while testing

2023-10-03 Thread Mike Dewhirst
: On Mon, Oct 2, 2023 at 11:30 PM Mike Dewhirst wrote: This is probably in the docs so please drop me a link if you can. My project has fifteen or more tables of reference data which determine how the software behaves and therefore is critical to unit testing. Fixtures

Reference data while testing

2023-10-02 Thread Mike Dewhirst
This is probably in the docs so please drop me a link if you can.My project has fifteen or more tables of reference data which determine how the software behaves and therefore is critical to unit testing.Fixtures are unworkable and I  need to respond to the actual reference data.How can i do

RE: Splitting views.py and urls.py into a directory rather than single files

2023-09-18 Thread Mike Dewhirst
I like the following method because it lets me start a project with a single file of views per app and then later when it grows, split it into named files in a 'views' directory - without needing to adjust other code which imports them.1. Create a views directory in the app dir2. Create

Re: What to learn after Django, Node.js or React?1

2023-09-10 Thread Mike Dewhirst
On 10/09/2023 4:40 pm, abu yahya Diab wrote: Hi guys, I'm a django developer(junior), do you advice me to learn Node.js, or React to be full Stack developer. Neither. At least not before you have looked at HTMX Thanks. Abdulrahman -- You received this message because you are subscribed to

Re: table bank_app_bank has no column named DOB

2023-08-21 Thread Mike Simkins
Did you regenerate and rerun the migrations ?? python manage.py makemigrations python manage.py migrate > On 21 Aug 2023, at 09:46, meenu loranz wrote: > > Thank you for your response...i changed DOB to dob...but still showing me the > error... > OperationalError at /add/ table

Re: Road Map for a newbie

2023-08-18 Thread Mike Dewhirst
plates. I disagree mike with his tip to take django documentation because this manual is very nice when you search for a specific thing. But for learning as beginner this is not right approach. I give you know my tip: learn short how you writes function based listview/deleteview/createview and

Re: Case-insensitive non-deterministic collation

2023-08-17 Thread Mike Dewhirst
On 18/08/2023 12:34 pm, Vitor Freitas wrote: Hi Mike, On Tue, Aug 15, 2023 at 4:30 AM Mike Dewhirst wrote: Found a great article by Adam Johnson written in February ... https://adamj.eu/tech/2023/02/23/migrate-django-postgresql-ci-fields-case-insensitive-collation

Re: Road Map for a newbie

2023-08-17 Thread Mike Dewhirst
On 17/08/2023 7:24 pm, Tesfaye Yimam wrote: Hello all, This is my second day of learning Django. I am comfortable with python (the basics and the OOP). I wanted to have some guidance from this community to learn Djanog by taking small steps in a consistent way. Any one who has a road-map,

Re: Timezone issue in when storing in DB

2023-08-15 Thread Mike Dewhirst
On 16/08/2023 12:35 pm, Madhusudhan Reddy wrote: Hi All, I am trying to store the date with the timezone. for example, my servers are in Mumbai, when my servers are trying to get the time of America/Detroit. it is not able to get proper time pytz is deprecated. You should consider using

Re: AWS Polly w/ strictly Django and Javascript

2023-08-15 Thread Mike Dewhirst
On 15/08/2023 7:26 am, Lightning Bit wrote: Hello, how could one go about integrating AWS Polly voices onto a website utilizing only Django, HTML, CSS, and Javascript? I do not want to use "node.js" or "react". Look closely at htmx.org -- You received this message because you are

Re: Case-insensitive non-deterministic collation

2023-08-15 Thread Mike Dewhirst
Found a great article by Adam Johnson written in February ... https://adamj.eu/tech/2023/02/23/migrate-django-postgresql-ci-fields-case-insensitive-collation/ Covers all the bases. Thank you Adam Cheers Mike On 7/08/2023 12:28 pm, Mike Dewhirst wrote: On 6/08/2023 9:17 pm, Chetan Ganji

Re: Case-insensitive non-deterministic collation

2023-08-09 Thread Mike Dewhirst
My tests stopped working so I have decided to abandon case-insensitive fields and do it all manually. Thanks everyone. Cheers Mike On Monday, August 7, 2023 at 12:29:28 PM UTC+10 Mike Dewhirst wrote: > On 6/08/2023 9:17 pm, Chetan Ganji wrote: > > Thanks Chetan > > I have

Re: Case-insensitive non-deterministic collation

2023-08-06 Thread Mike Dewhirst
that is how most of my databases are already established. If that passes my tests I might move on to other things. From what I can see, PostgreSQL are likely to deprecate citext as inelegant. That would be why Django has deprecated it. Thanks again. Mike Check this out. https://gist.github.com

Re: Case-insensitive non-deterministic collation

2023-08-06 Thread Mike Dewhirst
On 5/08/2023 7:58 pm, Chetan Ganji wrote: Hi Mike RE: The primary use case is to establish case-insensitivity when checking names - including usernames, company names and abbreviations/acronyms. I dont know anything about db_collation. Me neither Below 4 lookups should solve most common

Case-insensitive non-deterministic collation

2023-08-05 Thread Mike Dewhirst
LIMIT = -1     IS_TEMPLATE = False; Many thanks for any help Cheers Mike -- 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...@googl

Re: Need to trigger action on 4th Saturday of the month

2023-07-25 Thread Mike Dewhirst
;sat_4" once per month. There are options to nullify month-end and year-end which you would need to employ to prevent them from spoiling "sat_4" if it fell on a month-end or year-end. pip install baklabel https://github.com/mdewhirst/baklabel Cheers Mike Thank you in advance for

Re: how to convert to Django 3 or 4

2023-06-02 Thread Mike Dewhirst
On 3/06/2023 11:57 am, john fabiani wrote: aware there is no longer the "patterns" urlpatterns = [     ... ] It is just a list nowadays. -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically

Re: how to convert to Django 3 or 4

2023-06-02 Thread Mike Dewhirst
On 3/06/2023 7:20 am, john fabiani wrote: Hi everyone, I am tasked with updating/upgrading a very old Django web site - I believe it is 1.7.  I need convert and need what is required. Thanks in advance. I need to convert the following: Because all your urls are regular expressions, you

Re: Run Python Code on Front-End

2023-05-22 Thread Mike Dewhirst
On 23/05/2023 10:22 am, Muhammad Juwaini Abdul Rahman wrote: How can one run Python code from the backend that triggers on the front-end upon clicking a button on a certain page? Have a close look at htmx. It doesn't run Python but will replace any targeted HTML element with output from

Re: Is programming in Django intellectually satisfactory

2023-04-26 Thread Mike Dewhirst
On 26/04/2023 10:18 am, Julius Chesoni wrote:  Hi guys, I find programming in the abstract very interesting and full of intellectual benefits similar to those acquired from Mathematics. However, when it comes to programming languages I find the practice of programming very tiresome since there

University chemical management system

2023-03-31 Thread Mike Dewhirst
Does anyone know of an existing Django based chemical inventory management system for a large university? Thanks Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature

Re: how i use django in blockchain.

2023-03-23 Thread Mike Dewhirst
On 23/03/2023 6:02 pm, Shubham Lahane wrote: im currently working on my BE project. my project topic is 'secure EFIR using Blockchain'. actually im working on wesbite that is decentralized in nature. once user fill the FIR form, in backend smart contracts will run and i want to show

RE: Need help

2023-02-21 Thread Mike Dewhirst
https://explore.transifex.com/django/django-docs/Might helpM--(Unsigned mail from my phone) Original message From: Emmanuel Wilfried Ilboudo Date: 22/2/23 13:08 (GMT+10:00) To: Django users Subject: Need help Hi all !!! I would like to have the Django documentation in

Re: deleting a user model that extends abstractuser

2023-02-03 Thread Mike Dewhirst
On 4/02/2023 7:58 am, d07 wrote: I am trying to delete a user object that belongs to a User class that extends AbstractUser. The extending class looks something like this: class User(AbstractUser):     name = CharField("Name", blank=True, max_length=255)     def __str__(self):         return

Re: Uptime all the time

2023-01-22 Thread Mike Dewhirst
On 23/01/2023 5:12 am, j harvey wrote: I am looking for ideas on how to keep my app running all the time, even when uploading data that will replace the current data. Some of these tables will have a million rows or more. Ideas? Almost a question for the PostgreSQL users list - assuming that

Re: ModelAdmin

2023-01-04 Thread Mike Dewhirst
of business. I think Whatsapp, Slack etc are all very appropriate places for private conversations. Not so much for a user mutual-support mailing list like this one.  Thanks for understanding Cheers Mike On 5/01/2023 3:31 pm, Satyajit Barik wrote: Yes. It does. ModelAdmin classes can define

Re: ModelAdmin

2023-01-04 Thread Mike Dewhirst
link in html using the entity and just replace href="/search" with hx_trigger="/hx_search", for example, so that the existing css works and it looks like an ordinary link. Cheers mike I want a view that would allow non logged users to search a site through checkboxe

Re: Card-Payment Integration.

2023-01-02 Thread Mike Dewhirst
On 3/01/2023 3:12 pm, Harshwardhan Waghela wrote: Other Then Stripe ? Speak to your favourite bank and see what they offer. That's what I did before going to Stripe. Otherwise google for local gateway providers. On Monday, 2 January 2023 at 18:05:34 UTC+5:30 Mike Dewhirst wrote: I

RE: Card-Payment Integration.

2023-01-02 Thread Mike Dewhirst
I use Stripe. It works well.Mike--(Unsigned mail from my phone) Original message From: Harshwardhan Waghela Date: 2/1/23 22:40 (GMT+10:00) To: Django users Subject: Card-Payment Integration. Can Anyone Can Suggest me of Card-Payment Integration(means Visa,

Re: Apache and mod_wsgi with django

2023-01-01 Thread Mike Dewhirst
you will be able to gather most of that info before asking for help. Cheers Mike -- 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-user

RE: Django deployment on local host

2022-12-14 Thread Mike Dewhirst
The essential difference between local and remote is how you access the website.You need all the same resources including web server, database server etc but you might need a local DNS so local users can find the server by name.You can always test using hosts files on the test machines so they

Re: Apache2 hates my Django deployment method

2022-12-11 Thread Mike Dewhirst
hink I have the brainspace to identify the actual cause. My best strategy (I think) is to restart on redeployment and wait for for Apache to self-heal. If it is Apache's fault. Thanks for jumping in Cheers Mike On Sunday, December 11, 2022 at 5:45:40 PM UTC-5 Mike Dewhirst wrote: On 12/1

Re: Apache2 hates my Django deployment method

2022-12-11 Thread Mike Dewhirst
] and [core:error] before restarting if I have done a reload. I guess I'll give up reloading. Thanks for responding Cheers Mike Templates are picked up because they're not evaluated and compiled, rather they're processed dynamically so any changes there do not require a restart

Apache2 hates my Django deployment method

2022-12-10 Thread Mike Dewhirst
and solve that. The only solution I have is to restart Apache. I have to think this is happening in other projects so I'm wondering if anyone has solved this? Thanks for any feedback Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import

Re: Django model design best practice guidance

2022-12-08 Thread Mike Dewhirst
there are documented solutions. Cheers Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask and I'll send it to you. Your email softwar

Re: ALLOWED_HOSTS error

2022-11-21 Thread Mike Dewhirst
On 22/11/2022 11:54 am, Lakshyaraj Dash wrote: Put only domain names in allowed hosts Thank you - that makes me feel better. Can you tell me why the error is appearing? Is it some sort of hacking attempt? On Tue, Nov 22, 2022, 06:22 Mike Dewhirst wrote: My Django log is full

ALLOWED_HOSTS error

2022-11-21 Thread Mike Dewhirst
should be in ALLOWED_HOSTS. My inclination is it shouldn't be there. What is the correct way to deal with this? Many thanks Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my

RE: Possible bug in runserver

2022-11-11 Thread Mike Dewhirst
Try using the inline argument --settings when executing runserver--(Unsigned mail from my phone) Original message From: Matteo Sani Date: 12/11/22 05:38 (GMT+10:00) To: Django users Subject: Possible bug in runserver Hello, I wanted to run Django runserver with custom

RE: Can't Load Django Dev Sever

2022-11-10 Thread Mike Dewhirst
Try visiting http://localhost:8000 insteadNo guarantees and I'm not going to test it myself ;-)--(Unsigned mail from my phone) Original message From: James Date: 11/11/22 16:13 (GMT+10:00) To: Django users Subject: Can't Load Django Dev Sever Hello,I can't connect to my

Re: Move apps to different folders or to a root folder

2022-11-06 Thread Mike Dewhirst
On 7/11/2022 2:40 am, Nick Chang wrote: Hello community, I am trying to organize my Django project's structure as the number of apps is growing. So I am attempting to move an app in the sub-folder that contains its model definitions. The app used to be named `.foo

Re: secret api keys

2022-10-26 Thread Mike Dewhirst
On 27/10/2022 3:32 pm, Mike Dewhirst wrote: Not a dumb question but frequently asked. There are two approaches - one is to export your secrets as environment vars and read them from there. The other is to keep them in disk files and read them as required. In both cases the idea is to keep

secret api keys

2022-10-26 Thread Mike Dewhirst
repo. I prefer the latter approach. Cheers Mike Original message From: john fabiani Date: 27/10/22 02:09 (GMT+10:00) To: django-users@googlegroups.com Subject: secret api keys Hi, Maybe a dumb question but if I add secret keys in my settings.py file (or should it be placed

Re: Django call_command from Admin

2022-10-25 Thread Mike Oliver
Aziz, I had a similar need and I created my own middleware that checked the request path and did the call when I got a match. See https://docs.djangoproject.com/en/4.1/ref/middleware/ *Mike Oliver** Founder**, Open 4 Business Online* Tel: +1(951)260-0793 | Mobile:**NEW* 639479927462 US Toll

Re: Update from 3.9 to 3.10.8 and uninstall 3.9

2022-10-24 Thread Mike Dewhirst
19:27 (GMT+10:00) To: Mike Dewhirst Subject: Re: Update from 3.9 to 3.10.8 and uninstall 3.9 Thank you, that was quick.. My problem is/are the technical terms such as path and environment . It took me about 10 hours, (I am retired so have time), to upgrade to Spyder 5.3.3 because the input

Sanity check please

2022-10-23 Thread Mike Dewhirst
warnings, caveats Cheers Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask and I'll send it to you. Your email software can

Re: On button click need to call a python function...

2022-10-18 Thread Mike Dewhirst
On 18/10/2022 5:04 pm, Saswat Mahapatra wrote: Hi , I am new to django. On button click I need to call a python function which returns 2 values. If both the values are the same then I need to display the same image in 2 places on the web page or else a different image. How to call the

Re: save_model doesn't run on Django version 4

2022-09-13 Thread Mike Kilmer
One thing I'm not sure of it, how to tell if a particular Admin page is triggering a particular Admin instance. On Tuesday, September 13, 2022 at 11:27:54 AM UTC-5 Mike Kilmer wrote: > After having upgraded from Django 3 to 4 the save_model() method isn't > running, though the form it i

save_model doesn't run on Django version 4

2022-09-13 Thread Mike Kilmer
After having upgraded from Django 3 to 4 the save_model() method isn't running, though the form it imports does. ``` class MyCoolMapAdmin(SuperUserChangeOnlyMixIn, FilterByOwnerAdmin): form = MyCoolModelForm print("this prints on app initialization") def save_model(self,

Looking for a Django firm

2022-09-12 Thread Mike Dewhirst
Hi all - I'm looking for a Django outfit with an interest in chemistry or customers in the chemical industry in Australia. Possible opportunity. Best to respond off list and there will be an NDA. Cheers Mike -- You received this message because you are subscribed to the Google Groups

RE: What do you do with large project and forms?

2022-08-30 Thread Mike Dewhirst
1. Create a forms directory2. Create ../forms/__init__.py3. Move your forms.py into the forms directory4. In ./__init__.py write from .forms import (  FormThis,  FormThat,  EtcForm,)This gives you unchanged forms calling from wherever ... from appname.forms import etc5. When all that is working

Re: Can an app subclass a core django class to channge its behavior

2022-08-25 Thread Mike Oliver
ervisor.ChutheIOMiddleware", > ] > > Think you should try by shell to make sure you can call it, or importable > `from mysite.mymiddleware import DoseControllerMiddleware`. Shell very > helpful. > On Thu, Aug 25, 2022 at 11:09 AM Mike Oliver < > mike

Re: Can an app subclass a core django class to channge its behavior

2022-08-24 Thread Mike Oliver
.. ModuleNotFoundError: No module named 'mysite.mymiddleware' On Thursday, August 25, 2022 at 12:04:55 PM UTC+8 Mike Oliver wrote: > Well I have continued to search and now I see that CustomMiddleware will > do what I want, but I cannot find a current example and some of the > StackOverflow ans

Re: Can an app subclass a core django class to channge its behavior

2022-08-24 Thread Mike Oliver
uld you tell us more detail of process flow? > > On Wed, 24 Aug 2022 at 20:52 Mike Oliver < > mikeol...@open4businessonline.com> wrote: > >> Hello, >> >> I want to follow a microservices architecture and have some shared >> services I can include in

Can an app subclass a core django class to channge its behavior

2022-08-24 Thread Mike Oliver
Hello, I want to follow a microservices architecture and have some shared services I can include in a process flow instead of the 1:1 View:Model Suggestions? MO -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

How to enable/disable a hyperlink based on the clock

2022-08-23 Thread Mike Dewhirst
hints? Thanks mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask and I'll send it to you. Your email software can handle signing

Model switching - how to avoid saving twice

2022-08-15 Thread Mike Dewhirst
ready for conversion into links. Is it possible to do this saving only once? Thanks Mike class Chemical(models.Model):     ...     def save(self, *args, **kwargs):     super().save(*args, **kwargs)     self.convert_notes_to_links(line=line)     def convert_notes_to_links(self, line=None

Re: Need help on reducing cognitive complexity

2022-07-21 Thread Mike Dewhirst
On 21/07/2022 3:52 pm, Sencer Hamarat wrote: Hi everyone, I have a code block with high cognitive complexity below:     @staticmethod     def in_circle_check(obj_type, item, uuid, item_is_array=False): Partly because the args seem weird. Try writing a docstring which says what the method

RE: remove django polymorphism

2022-07-16 Thread Mike Dewhirst
--(Unsigned mail from my phone) Original message From: Joseph Amiri Date: 17/7/22 05:41 (GMT+10:00) To: Django users Subject: remove django polymorphism hey all.i have models like this :class basemodel(polymorphism):...class teachers(basemodel):...class

Re: Django tried these URL patterns

2022-06-17 Thread Mike Kilmer
Not sure why, but moving path("integrations/", include("integrations.urls")), above the "" slash seems to have solved the problem. On Friday, June 17, 2022 at 5:45:19 PM UTC-5 Mike Kilmer wrote: > This app is set up to create webhooks and receive requests,

Django tried these URL patterns

2022-06-17 Thread Mike Kilmer
This app is set up to create webhooks and receive requests, however the routing has broken and the requests are getting a 404. The path looks like this: http://127.0.0.1:8000/integrations/dc3509ac-1aa8-4c9a-a439-904342d885cd/order The Stack Track/Routing: Using the URLconf defined in

Re: CSRF issue in default login

2022-06-17 Thread Mike Kilmer
If you're interested in some piecemeal work, I could use some help. mike at mzoo.org. On Friday, June 17, 2022 at 3:10:16 PM UTC-5 181...@northsouth.edu wrote: > I have basic to intermediate knowledge on Django, but don't find any entry > level job to master my django knowledge in my c

Re: CSRF issue in default login

2022-06-17 Thread Mike Kilmer
STED_ORIGINS = ["https://yourdomain.com;, > "https://www.yourdomain.com;] > > I'd be curious to hear from others, because I'm *not *an expert in how to > best set up django for production. > > > On Fri, 17 Jun 2022 at 11:48, Mike Kilmer wrote: > >> Hi

Re: CSRF issue in default login

2022-06-17 Thread mike vickers
est set up django for production. On Fri, 17 Jun 2022 at 11:48, Mike Kilmer wrote: > Hi. > > I'm fairly new to Django. Here's what I need insight on: > > Local server, no issue. > > On production: CSRF 403 error on login. > > There's a cookie loaded o

CSRF issue in default login

2022-06-17 Thread Mike Kilmer
additional piece of information, I have allauth installed, but it doesn't seem to be correctly configured. It's login page is not loading. Additionally, the problem was there even when I removed allauth from Apps and Authentication Backends. Thanks much. –Mike -- You received this message

Re: how to deploy python django project using heroku

2022-06-16 Thread Mike Kilmer
Do you have your codebase tracked in a version tracking system like Github? If you do, then, from within Heroku, you can use the Github integration. On Thursday, June 16, 2022 at 11:01:52 AM UTC-5 maheshb...@gmail.com wrote: > please support me how deploy django project using git and heroku >

Re: How to hash fields and detect changes in a record

2022-06-14 Thread Mike Dewhirst
if any change is detected. Otherwise the note gets deleted. Cheers Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Just ask and I'll

Re: How to hash fields and detect changes in a record

2022-06-12 Thread Mike Dewhirst
--(Unsigned mail from my phone) Original message From: Ryan Nowakowski Date: 13/6/22 07:09 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: How to hash fields and detect changes in a record On Sat, Jun 11, 2022 at 12:13:16AM +1000, Mike Dewhirst wrote:> On 10

Re: How to hash fields and detect changes in a record

2022-06-10 Thread Mike Dewhirst
just convert all the chars in all the fields I'm interested in into integers and sum them into my "hash" field. Should be quick and easy! Cheers Mike On 11/06/2022 12:13 am, Mike Dewhirst wrote: On 10/06/2022 11:24 pm, Ryan Nowakowski wrote: On Fri, Jun 10, 2022 at 05:52:48PM +

Re: How to hash fields and detect changes in a record

2022-06-10 Thread Mike Dewhirst
On 10/06/2022 11:24 pm, Ryan Nowakowski wrote: On Fri, Jun 10, 2022 at 05:52:48PM +1000, Mike Dewhirst wrote: The use case is auto-deletion of out-of-date records if they have not changed. That might sound weird but it is the solution I have come to for a particular problem. My software

  1   2   3   4   5   6   7   8   9   10   >