Re: collectstatic files chown'ed by root

2022-02-14 Thread Mike Dewhirst
On 14/02/2022 10:14 pm, 'Tim' via Django users wrote: Hi all, I'm deploying Django 4 via docker-compose. For security reasons, the Dockerfile creates a non-root user before running the entrypoint.sh script (which does migrations, collectstatic and starts the server with gunicorn). All app file

Re: The SECRET_KEY setting must not be empty - os.environ.get('SECRET_KEY')

2022-03-01 Thread Mike Dewhirst
On 2/03/2022 9:00 am, Dev femibadmus wrote: Do u create the variable SECRET_KEY if no copy ur secret_key e.g "hdFgBv&$..." and create variable SECRET_KEY in ur env which could be or is ur hosting platform and give the value as ur secret_key On Sun, Feb 27, 2022, 21:19 Valdinia - Office wrote:

Re: How Important Is Writing Unit Tests For Django Applications?

2022-03-12 Thread Mike Dewhirst
On 13/03/2022 5:00 am, Daniel Coker wrote: I understand the importance of unit testing. However, if we are going to write integration tests (testing the views), this test will step through all of the modules that we would otherwise unit test. So, I'm wondering, it it really necessary to write

Tweak admin 'Action' to avoid Cannot call delete() after .distinct()

2022-03-20 Thread Mike Dewhirst
I am using tweaked querysets to populate the Admin and fully understand why this error occurs. I am using Actions to perform bulk operations on selected records so I do need the Action selector widget. How can I remove the 'Delete selected...' option? Thanks Mike TypeError at /admin/chem

TypeError: Cannot call delete() after .distinct() in the Admin

2022-04-07 Thread Mike Dewhirst
How can I remove the 'Delete' option from Django Admin actions? 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 signature and be sure it came from me. Just ask

Re: TypeError: Cannot call delete() after .distinct() in the Admin

2022-04-07 Thread Mike Dewhirst
Sorry - just found it in the docs M On 7/04/2022 5:05 pm, Mike Dewhirst wrote: How can I remove the 'Delete' option from Django Admin actions? Many thanks Mike -- Signed email is an absolute defence against phishing. This email has been signed with my private key. If you import

RE: Calculated Fields

2022-04-10 Thread Mike Dewhirst
--(Unsigned mail from my phone) Original message From: tech george Date: 11/4/22 03:50 (GMT+10:00) To: django-users@googlegroups.com Subject: Calculated Fields Hello,I am trying to calculate fields directly from a model but no luck. I want to get total_price from quantity, re

Re: Calculated Fields

2022-04-10 Thread Mike Dewhirst
Apr 2022, 01:56 Mike Dewhirst, wrote: -- (Unsigned mail from my phone) Original message From: tech george Date: 11/4/22 03:50 (GMT+10:00) To: django-users@googlegroups.com Subject: Calculated Fields Hello, I am trying to calculate

Possible Django Admin or auth bug or Mozilla bug

2022-04-13 Thread Mike Dewhirst
I don't know how long this has been happening for me. Happens on Windows 10 in Mozilla Firefox but not Chrome.  In the Admin User screen where there are two boxes of Groups labelled 'Available groups' and 'Chosen groups' with controls to move groups between boxes, everything seems to work perf

Re: Possible Django Admin or auth bug or Mozilla bug

2022-04-13 Thread Mike Dewhirst
;. Therefore it could be an error in Django; maybe for some reason that JavaScript doesn't always run correctly on Firefox. If I were you I'd file a Django bug anyway. Regards, Antonis On 13/04/2022 10.00, Mike Dewhirst wrote: I don't know how long this has been happening

Re: Possible Django Admin or auth bug or Mozilla bug

2022-04-13 Thread Mike Dewhirst
On 14/04/2022 11:36 am, Mike Dewhirst wrote: Thanks Antonis OK - the problem has two workarounds. One is to use Chrome. Two is https://code.djangoproject.com/ticket/33386 which suggests including some javascript to disable Firefox autocomplete ... $('form').attr('autocomplet

Re: Possible Django Admin or auth bug or Mozilla bug

2022-04-14 Thread Mike Dewhirst
are trying to accomplish (except if extrastyle comes earlier than extrajs). On 14/04/2022 06.37, Mike Dewhirst wrote: On 14/04/2022 11:36 am, Mike Dewhirst wrote: Thanks Antonis OK - the

Re: Python Question re Executing a Script (Mike)

2022-05-01 Thread Mike Dewhirst
ecause I'm using Windows 11 or could be because I now have a newer version of Python. With this additional information, do you have any ideas what I should do to get the Python script running in the same way I had it running before? Thank you! Brent *From:* Mike Dewhirst *Sent:* Satur

Re: Using External HTML files in Django

2022-05-02 Thread Mike Dewhirst
On 3/05/2022 8:44 am, Hazho Human wrote: Why not serving that specific URL with Nginx or Apache? On Tue, 3 May 2022 at 03:15, Santhosh sridhar wrote: Hi, I have few html files which are not part of my django project templates directory. I want to render these html files as a

Bug using Admin with Stripe - but whose is it?

2022-05-06 Thread Mike Dewhirst
I'm obviously at fault but I'm not smart enough to figure it out. Any help is appreciated. The mechanism below exhibits no errors at the Stripe end. Stripe returns the necessary payment token. I have tried brutally stripping of the "/change/payment" and while it silences the error, the form ju

Re: Bug using Admin with Stripe - but whose is it?

2022-05-06 Thread Mike Dewhirst
OK - don't worry about this for the time being. The problem is obviously where I haven't yet looked. So I'm now going to simplify every bit of code/html/css following the successful acquisition of the Stripe token to see if it suddenly starts working. M On 6/05/2022 6:07 pm

Re: Migrating ManyToManyField to bigint?

2022-05-15 Thread Mike Dewhirst
On 14/05/2022 11:44 pm, Jeremy Lainé wrote: Hi! I'm currently looking at how to migrate all my models from AutoField to BigAutoField. For all the explicitly defined models the process seems pretty straightforward: * change DEFAULT_AUTO_FIELD to BigAutoField * generate migrations * appl

Re: Migrating ManyToManyField to bigint?

2022-05-16 Thread Mike Dewhirst
[2] https://code.djangoproject.com/ticket/32674On Sunday, May 15, 2022 at 10:26:18 AM UTC+2 Mike Dewhirst wrote: On 14/05/2022 11:44 pm, Jeremy Lainé wrote: Hi! I'm currently looking at how to migrate all my models from AutoField to BigAut

Re: PHP website | a way to refresh the page without reloading

2022-05-18 Thread Mike Dewhirst
On 19/05/2022 4:23 am, Dias André wrote: Good afternoon! I'm new to programming and I'm making a website in php, I would like to know if there is a way for my website to update without reloading the page and always going to the top of it. sry for the english When I was new to web programming

Please criticise use of global keyword in Admin

2022-05-18 Thread Mike Dewhirst
The code below appears to work perfectly but it worries me because I have never used the global keyword before. Is there a generous guru who will criticise the code constructively for me please? The use case is Admin review of payment gateway receipt records. Users in the manager group can h

Re: Please criticise use of global keyword in Admin

2022-05-19 Thread Mike Dewhirst
ght not be the best solution but will work way better:     def get_queryset(self, request):     qs = super().get_queryset(request)     request.receipt_fields = REC_FIELDS[:]     ... Regards, Antonis On 19/05/2022 05.33, Mike Dewhirst wrote: The code below appears to work perfectly but it worries me because I

Re: Please criticise use of global keyword in Admin

2022-05-19 Thread Mike Dewhirst
: return [ ( "Detail for this Invoice/Receipt", { 'fields': self.get_fields(request, obj) } ) ] On 20/05/2022 9:08 am, Mike Dewhirst wrote: On 19/05/2022 11:39 pm, Anto

How can I work around the Django 3.2.10 cve release

2022-05-19 Thread Mike Dewhirst
My billing (Stripe) mechanism is working right up until Django 3.2.9 - which is where I'm stumped at the moment. Django 3.2.10 https://docs.djangoproject.com/en/3.2/releases/3.2.10/ indicate a URL with a trailing newline can bypass upstream access control based on URL paths. Sadly, I am not a

Re: How can I work around the Django 3.2.10 cve release

2022-05-20 Thread Mike Dewhirst
' and I'm sure none of my urls end that way. Cheers mike On Thursday, May 19, 2022 at 11:14:25 PM UTC-4 Mike Dewhirst wrote: My billing (Stripe) mechanism is working right up until Django 3.2.9 - which is where I'm stumped at the moment. Django 3.2.10 https:/

Re: How can I work around the Django 3.2.10 cve release

2022-05-20 Thread Mike Dewhirst
se_exception=True)return Response(serializer.data)# self.perform_update(serializer)# return Response(serializer.data)iam hardly trying from few days please guys help me out On Saturday, May 21, 2022 at 6:35:30 AM UTC+5:30 Mike Dewhirst wrote: On 20/05/2022 11:21 pm, Jason wrote:

Re: How can I work around the Django 3.2.10 cve release

2022-05-21 Thread Mike Dewhirst
XI-D 25 Date: 21/5/22 18:02 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: How can I work around the Django 3.2.10 cve release Hey why don't you use django v4 for your projects? On Fri, 20 May, 2022, 08:43 Mike Dewhirst, wrote:My billing (Stripe) mechanism is working righ

Re: How can I work around the Django 3.2.10 cve release

2022-05-22 Thread Mike Dewhirst
iew"), would be `path("invoice/", billing_views.invoice_view, name="invoice_view") wonder if this works for you. also, this might be worth opening a bug ticket about, since this seems like a regression. On 21/05/2022 11:04 am, Mike Dewhirs

Re: How To expertise Django templates Language(DTL)

2022-05-23 Thread Mike Dewhirst
On 24/05/2022 4:30 am, waqar khan wrote: How To expertise Django templates Language(DTL) Kindy help me, i am intermediate DTL , any budy suggest link , you  tube video or books. This is likely your best bet ... https://docs.djangoproject.com/en/4.0/topics/templates/ -- You received this mes

Re: POS Printer

2022-05-31 Thread Mike Dewhirst
Paul I agree with @Dev. Nice. And generous. I'm saving this email into my 'keep'. Cheers Mike On 1/06/2022 3:22 am, Paul Kudla (SCOM.CA Internet Services Inc.) wrote: ok a few zillion requirements You need something that will generate a pdf file and then send it to a printer / email etc

Re: migrations problem in django

2022-06-01 Thread Mike Dewhirst
On 2/06/2022 3:00 am, Paras Kashyap wrote: TypeError: Field.__init__() got an unexpected keyword argument 'max_lenght' You have probably seen this already ... should be 'max_length' Please someone tell me how to fix this error, this error occurs when i try to make migrations -- You received

How to hash fields and detect changes in a record

2022-06-10 Thread Mike Dewhirst
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 analyses chemical properties and writes note records containing advice, each with a FK to the chemical. When value

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

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

2022-06-10 Thread Mike Dewhirst
27;ll 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

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-14 Thread Mike Dewhirst
On 14/06/2022 11:20 pm, Ryan Nowakowski wrote: Summing the ordinal of the characters won't catch transposition: >>> chars = 'ab' >>> sum([ord(c) for c in chars]) 195 >>> chars = 'ba' >>> sum([ord(c) for c in chars]) 195 Better to use a real hash algorithm if you're trying to detect changes. 

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 courses(basemodel):.

Re: Need help on reducing cognitive complexity

2022-07-20 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 nee

Model switching - how to avoid saving twice

2022-08-14 Thread Mike Dewhirst
Django 3.2 Admin I have a model with two 1:n models and need to convert one type of model into the other. I know this sounds mad but it is a specialised document management to-do system. It has Note models and Link models connected to the main model. When converting a Note into a Link the L

How to enable/disable a hyperlink based on the clock

2022-08-23 Thread Mike Dewhirst
I want to provide a link to join a regular Zoom webinar but enable/disable it just like a garden sprinkler. Enable at noon on Friday, disable fifteen minutes later. Repeat for next Friday. It feels like I need some sort of push. I'm not a js person. Perhaps I should be looking at htmx? Any

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

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 "Django

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 python

Sanity check please

2022-10-23 Thread Mike Dewhirst
In the Django Admin I have a model central to a bunch of FKs and M:Ms plus a lot of processing on saving. This is my solution which seems to work but frightens me a bit. class Chemical(models.Model):     # lots of fields     def save(self, *args, **kwargs):     self.process_stuff_based_o

Re: Update from 3.9 to 3.10.8 and uninstall 3.9

2022-10-24 Thread Mike Dewhirst
B N Date: 24/10/22 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

secret api keys

2022-10-26 Thread Mike Dewhirst
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 secrets out of your code and thus out of your

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

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

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 setti

ALLOWED_HOSTS error

2022-11-21 Thread Mike Dewhirst
My Django log is full of these errors ... ERROR /usr/local/lib/python3.10/dist-packages/django/core/handlers/exception.py TIME: 2022-09-28 00:13:17,204 MSG: exception.py:response_for_exception:99 Invalid HTTP_HOST header: '111.222.333.444'. You may need to add '111.222.333.444' to ALLOWED_HOS

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 of

Re: Django model design best practice guidance

2022-12-08 Thread Mike Dewhirst
On 9/12/2022 3:04 am, Joshua Corlin wrote: Ive not used this field before so if it is im having a hard time wrapping my head around how this would work in this use case. Many-to-many is simple to conceptualise if you realise it is not a field in the table you think it is. It is actually a se

Apache2 hates my Django deployment method

2022-12-10 Thread Mike Dewhirst
Server Version: Apache/2.4.52 (Ubuntu 2022.04) OpenSSL/3.0.2 mod_wsgi/4.9.0 Python/3.10 Server MPM: event Server Built: 2022-09-30T04:09:50 Apache *seems* to hang onto something and eventually crashes after I reload it after deploying a Python file. That is either scripted (delete site and re

Re: Apache2 hates my Django deployment method

2022-12-11 Thread Mike Dewhirst
uire a restart. On Saturday, December 10, 2022 at 9:34:42 PM UTC-5 Mike Dewhirst wrote: Server Version: Apache/2.4.52 (Ubuntu 2022.04) OpenSSL/3.0.2 mod_wsgi/4.9.0 Python/3.10 Server MPM: event Server Built: 2022-09-30T04:09:50 Apache *seems* to hang onto something and eventually

Re: Apache2 hates my Django deployment method

2022-12-11 Thread Mike Dewhirst
st. I don't think 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 Dew

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 c

Re: Apache and mod_wsgi with django

2023-01-01 Thread Mike Dewhirst
On 2/01/2023 1:44 pm, pankaj palmate wrote: Hi i am using Apache with mod_wsgi.i want to serve 5000 users at a time.how many processes and threads should I use in order to serve 5000 connections concurrently...in wsgi daemon process ? I can't answer the question because it is above my pay-gr

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, Master-Card...etc)

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:

Re: ModelAdmin

2023-01-04 Thread Mike Dewhirst
On 5/01/2023 5:43 am, Mario St-Gelais wrote: Hello group, first post here. Quick question.  Can capabilities of ModelAdmin such as list_filter or search_fields be used outside of the admin interface? Have you looked at htmx? https://www.simplecto.com/htmx-and-the-list_editable-in-django-admin

Re: ModelAdmin

2023-01-04 Thread Mike Dewhirst
sses can define list filters that appear in the right sidebar of the change list page of the admin. For more reference: https://docs.djangoproject.com/en/4.1/ref/contrib/admin/filters/ For this topic related join our WhatsApp group: https://bit.ly/3oJtfcf Regards, Satyajit On Thu, Jan 5, 2023

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 i

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

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 transaction

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

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 Pyt

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 ca

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 d

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

2023-07-25 Thread Mike Dewhirst
On 25/07/2023 10:47 pm, M Cain wrote: User application permits registration for upcoming events.  User wants the registration page to be open on 4th Saturday of every month at 9am ET as the events are very popular with limited capacity and made available on first come first serve basis. Djang

Case-insensitive non-deterministic collation

2023-08-05 Thread Mike Dewhirst
The following warning triggered a bit of research which looks like a significant amount of study will be required to find the collation needed ... django.contrib.postgres.fields.CICharField is deprecated. Support for it (except in historical migrations) will be removed in Django 5.1.    

Re: Case-insensitive non-deterministic collation

2023-08-06 Thread Mike Dewhirst
://ryucoder.in On Sat, Aug 5, 2023 at 1:35 PM Mike Dewhirst wrote: The following warning triggered a bit of research which looks like a significant amount of study will be required to find the collation needed ... django.contrib.postgres.fields.CICharField is deprecated. Support

Re: Case-insensitive non-deterministic collation

2023-08-06 Thread Mike Dewhirst
dels.CharField(max_length=50, db_collation='case_insensitive') class Meta: ordering = ['name'] def __str__(self): return self.name Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Sun, Aug 6, 2023 at 12:32 PM Mike Dewhirst wrote: On

Re: Case-insensitive non-deterministic collation

2023-08-08 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: Newbie django/python with C++ background wants enums

2012-02-01 Thread Mike Dewhirst
On 2/02/2012 12:13pm, Nikolas Stevenson-Molnar wrote: TO_USE= ( ('Y', 'Yes'), ('N', 'No'), ) class X(models.Model): txt= models.CharField(db_index=True,null=True, blank=True,max_length=30) use_txt= models.CharField(blank=False,max_length=1,default='D',choices=TO_USE) an

Re: create users from /etc/passwd?

2012-02-02 Thread Mike Dewhirst
On 3/02/2012 7:00am, Tim wrote: Thanks for all this great information. Thorsten, I do have hope that 'pam' will solve the problem, but if I get nowhere with that, Furbee's links and info will help me go further; I just didn't want the user to have to sign on twice when I don't really care about a

Re: problem installing PIL

2012-02-02 Thread Mike Dewhirst
This might help ... http://stackoverflow.com/questions/2088304/installing-pil-python-imaging-library-in-win7-64-bits-python-2-6-4 On 3/02/2012 10:40am, NENAD CIKIC wrote: I came across this problem (the problem is that i can not install PIL on my windows 7 64 bit machine) when I have tried to

auth groups puzzle

2012-02-02 Thread Mike Dewhirst
I want to use the built-in auth_groups permissions system in a many-to-many sense but can't quite figure it out for my use case. Any help will be appreciated. The use case is: users have different types of access (r/o, r/w or admin) to different companies. Any single user can have r/o access t

Re: auth groups puzzle

2012-02-02 Thread Mike Dewhirst
I'm going to simplify the use case and live with users being in the same group for all companies. This is only a prototype. If a demand arises in production I'll worry about it then. Sorry to bother you Mike On 3/02/2012 4:58pm, Mike Dewhirst wrote: I want to use the built-in a

Re: auth groups puzzle

2012-02-04 Thread Mike Dewhirst
lt-in permissions system. Instead, I created a DB structure that links users to companies and stores the r/w status for each. On Feb 3, 12:58 am, Mike Dewhirst wrote: I want to use the built-in auth_groups permissions system in a many-to-many sense but can't quite figure it out for my use case

Re: same code runs on two machines and barfs on the third

2012-02-07 Thread Mike Dewhirst
On 7/02/2012 6:14pm, kenneth gonsalves wrote: On Tue, 2012-02-07 at 08:06 +0100, Babatunde Akinyanmi wrote: Perhaps you made a change to a model and forgot to syncdb on your Fedora 15 machine. When you have eliminated all the possibilities what remains must be the problem :) The trick

Re: What Can I use?

2012-02-11 Thread Mike Dewhirst
On 11/02/2012 9:38pm, coded kid wrote: Hey guys, anyone know about a django package I can use for comment in django site? The one I see is Django-comment but it's not maintained anymore. What other one do you know about? Thanks. Is there something wrong with django.contrib.comments ??? It is b

Re: Database image from models

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 7:18am, galgal wrote: Is there any free app to generate database image schema from all models from all apps? I need image with tables and relations shown. This may help ... http://live.gnome.org/Dia/Python Thanks for help. -- You received this message because you are subscri

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 4:39pm, Stanwin Siow wrote: Hi there, i'm getting this error when trying to get the default admin page up. invalid syntax (admin.py, line 1) Could you post the contents of the offending file (admin.py) here? Any ideas where to rectify this? Thanks in advance Best Regards

Re: Admin error

2012-02-14 Thread Mike Dewhirst
, Stanwin Siow On Feb 15, 2012, at 1:46 PM, Mike Dewhirst wrote: On 15/02/2012 4:39pm, Stanwin Siow wrote: Hi there, i'm getting this error when trying to get the default admin page up. invalid syntax (admin.py, line 1) Could you post the contents of the offending file (admin.py)

Re: Admin error

2012-02-14 Thread Mike Dewhirst
o.contrib.admin',* *# Uncomment the next line to enable admin documentation:* *'django.contrib.admindocs',* 'registration', 'r2.topic', 'r2.opinion', 'r2', 'r2.statistics', 'paypal.standard.ipn', ) besides the tutorial basical

Re: Admin error

2012-02-14 Thread Mike Dewhirst
On 15/02/2012 5:41pm, Mike Dewhirst wrote: invalid syntax (admin.py, line 1) Your original error indicated there is an admin.py but with an error on line 1 or a missing admin.py which you have confirmed. That is the problem. To get your models to appear in the admin app you need an

Re: Admin error

2012-02-15 Thread Mike Dewhirst
p;biw=745&bih=910&ix=sea&ion=1 Mike Best Regards, Stanwin Siow On Feb 15, 2012, at 3:12 PM, Mike Dewhirst wrote: On 15/02/2012 5:41pm, Mike Dewhirst wrote: invalid syntax (admin.py, line 1) Your original error indicated there is an admin.py but with an error on line 1 or

Re: New app crashes the project on server

2012-02-25 Thread Mike Dewhirst
On 26/02/2012 10:10am, shartha wrote: ImportError at / No module named moh Do you have a file called __init__.py in the directory? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegr

Re: New app crashes the project on server

2012-02-25 Thread Mike Dewhirst
rver') command.validate() import django.conf import django.utils django.utils.translation.activate(django.conf.settings.LANGUAGE_CODE) import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() # end of myproject.wsgi - - - - - - - - - - - - - - - - - - - -

Re: Importing data using loaddata from exported data using dumpdata

2012-03-03 Thread Mike Dewhirst
have a look at file and see if it looks ok. I find I have to dump a model at a time and load them back in a sensible sequence. Connected by MOTOBLUR™ -Original message- From: Vincent Bastos To: django-users@googlegroups.com Sent: Sun, 04 Mar 2012, 08:40:07 AEDT Subject: Importing data

admin css

2012-03-04 Thread Mike Dewhirst
I would like to adjust the admin app's base.css. Nothing outrageous. I just want to change all the #999 color values to something a little bit darker so screen text is slightly easier to see. I could write a python script to do that but it feels wrong. I tried locating somewhere in my project

Re: admin css

2012-03-05 Thread Mike Dewhirst
e relevant section from contrib.admin's base.css like so ... .help, p.help { font-size: 10px !important; color: #44; } ... and bingo I can read the help text much more easily. Cheers Mike On 6/03/2012 3:37am, Lee Hinde wrote: On Sun, Mar 4, 2012 at 8:32 PM, Mike Dewhirst wrote: I wo

Re: NullBooleanField default to unknown

2012-03-16 Thread Mike Dewhirst
On 17/03/2012 11:02am, Ben wrote: I have a NullBooleanField that I would like to show up in my admin interface as radio buttons with unknown selected by default. # I have the following simplified files ## models.py ## class Value(models.Model): presence = models.NullBooleanField(default=Fa

Re: NullBooleanField default to unknown

2012-03-18 Thread Mike Dewhirst
probably your best bet. Mike On 18/03/2012 8:10am, Ben Racine wrote: yes. On Mar 16, 2012 8:07 PM, "Mike Dewhirst" <mailto:mi...@dewhirst.com.au>> wrote: On 17/03/2012 11:02am, Ben wrote: I have a NullBooleanField that I would like to show up in my admin

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
On 27/03/2012 9:16am, larry.mart...@gmail.com wrote: On Mar 25, 3:29 pm, Larry Martell wrote: I have a client that has an app built with django. On every page of their app is a link to their admin site. They tell me the admin site is generated entirely by django, and they've never customized it

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
On 27/03/2012 10:16am, Larry Martell wrote: On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst wrote: On 27/03/2012 9:16am, larry.mart...@gmail.com wrote: On Mar 25, 3:29 pm, Larry Martellwrote: I have a client that has an app built with django. On every page of their app is a link to their

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
- - - - - - - - - - - - - - - - - - - - - - - - - ... and you can see where I tested a link inside {% block branding %} and I can confirm it works. Hth Mike On 27/03/2012 12:46pm, Larry Martell wrote: On Mon, Mar 26, 2012 at 7:25 PM, Mike Dewhirst wrote: On 27/03/2012 10:16am, Larry Mart

Re: Adding link to admin page

2012-03-26 Thread Mike Dewhirst
I should have mentioned that {% extends "admin/base.html" %} is actually extending the django admin/base.html in site-packages because there is no such file in my SRC_ROOT/templates/admin directory. Mike On 27/03/2012 2:19pm, Mike Dewhirst wrote: Larry Here is a working setup

<    1   2   3   4   5   6   7   8   9   10   >