Setting up private temperature sensor system?

2023-01-26 Thread Richard E. Cooke
Where I want to see my temperature sensor data does not have an internet connection. So I need to set up my own system using LHT65N sensors and LPS8N gateway(s). Reading some older user manuals, I noticed at one time they included The Things Network stack in firmware! Thats cool! Is that a

System check Framework error checking Admin Fieldsets in 2.1

2018-09-04 Thread Richard E. Cooke
This Field set definition: fieldsets = ( ('Job Work Sheet', { 'fields': ( ('number', 'job_history', 'hw_customer',), ('status', 'contracted_out',), ('adn_parts_required', 'atn_required', 'atn_tech',

System check Framework error checking Admin Fieldsets in 2.1

2018-08-31 Thread Richard E. Cooke
This Field set definition: fieldsets = ( ('Job Work Sheet', { 'fields': ( ('number', 'job_history', 'hw_customer',), ('status', 'contracted_out',), ('adn_parts_required', 'atn_required', 'atn_tech',

Re: Django 1.5.1 and clearsessions

2013-08-07 Thread Richard E. Cooke
Works fine for me. Must be a path issue. On Wednesday, August 7, 2013 9:41:37 AM UTC-4, Derrick Jackson wrote: > > Hmm... > > When I attempt to run django-admin.py clearsessions while using django > 1.5.1 I am told that clearsessions is an unknown command. Has anyone > successfully used

How do I find out how many AdminSites exist?

2013-08-07 Thread Richard E. Cooke
I want to use Grappelli and Django-extensions with my Admin site. But I also need to use modelAdmin.queryset to restrict my records. Both Grappelli and Django-extensions Auto Complete Lookups use the model's base queryset. I want to put in a request to change the code, which is easy - so long

Re: How do I change a global setting from inside middleware?

2013-06-23 Thread Richard E. Cooke
actice for this kind of problems. > For example: > > def admin_title(request): > """ > Adds media-related context variables to the context. > """ > user_company_name = request.user.company_name > return {'grappelli_admin

How do I change a global setting from inside middleware?

2013-06-23 Thread Richard E. Cooke
I'm using Grappelli to spruce up my Admin interface. I would like to customize the site name (and web page tittle). I have this in my project settings.py file: # http://django-grappelli.readthedocs.org/en/latest/customization.html GRAPPELLI_ADMIN_TITLE = "The Default Company" And in my middle

Re: How to access request/session information from model.clean?

2013-06-23 Thread Richard E. Cooke
Thanks Jason! I hunted through your links, and while I was setting up a test I stumbled upon this in the Django 1.5 Admin docs: - https://docs.djangoproject.com/en/1.5/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model and this: -

How to access request/session information from model.clean?

2013-06-21 Thread Richard E. Cooke
I'm trying to pass the request object, which includes the session object, to a chunk of Django 1.5 code that is tied to the model (model.clean). When running the Admin app, it does not have access to the request object. So I tried stashing it in RAM using thread.local(), only to get a crash

Re: Multi Client Django System

2013-05-22 Thread Richard E. Cooke
Frank! You appear to have figured out what I spent most of today trying to figure out: How to get access to the current logged in user from INSIDE a custom data manager! Can you clarify something in your code? In your custom manager you define "by_user", which takes "user" as an input. But

Re: I need help doing a linked lookup in admin

2013-04-29 Thread Richard E. Cooke
I'm getting closer! First I found this note in the Content Types docs that explains why what I was doing does NOT work: https://docs.djangoproject.com/en/1.4/ref/contrib/contenttypes/#django.contrib.contenttypes.generic.GenericForeignKey *Due to the way

I need help doing a linked lookup in admin

2013-04-26 Thread Richard E. Cooke
I used the *django-contacts *project as my starting point for a company contact database. Its really cool, it keeps "addresses", "phone numbers", etc in seperate db table so you can associate as many as you need to each company or person record. It uses *django.contrib.contenttype*s for its

Does anybody have ADMIN rights to "djangosnippets.org"?

2009-11-13 Thread Richard E. Cooke
I'm trying to get an ID on this system and its stuck trying to e-mail me an "activation" e-mail! I'm using SPF on my server to reduce spam (very effective) but the underlying server they are using is not configured properly. The error message is: Nov 13 17:53:45 mail4.local.scom.ca

Re: Can I change the restriction on "username" without breaking anything?

2009-11-13 Thread Richard E. Cooke
I get nervous when all the examples and code snippets I find are several year old. This code snippet: http://www.djangosnippets.org/snippets/74/ works in principal, but relies on a regular expression test that is no longer defined n Django. I changed it to use a regex I use in server-side mail

Re: Can I change the restriction on "username" without breaking anything?

2009-11-13 Thread Richard E. Cooke
Thanks David! I was wondering about doing the same thing! I had not thought of your idea of soft-switching the login name from username to email. Interesting idea. I was toying with making my own class + auth backenend so I could change the DB layout to drop email. But I could see that having

Re: Can I change the restriction on "username" without breaking anything?

2009-11-12 Thread Richard E. Cooke
Thanks. Sorry. I have got to stop posting when I'm tired... For punishment, I read the Wikipedia article on the "@" character: http://en.wikipedia.org/wiki/@ No, I did not do a google search because I ass-umed the truly relevant info would be in this list. really. The first Google hit is a

Can I change the restriction on "username" without breaking anything?

2009-11-11 Thread Richard E. Cooke
My client wants to use e-mail addresses for user names. the contrib.auth application does not have a restriction in its model. But the form code has put a regex on the field that disallows the ampersand (@). What would be the easiest way to override that form field definition so its global?

Re: accessing multiple dbs?

2009-07-17 Thread Richard E. Cooke
Thanks for the replies! Happily I have managed to avoid the issue. We will just make one Django site per database. Using a web page to post all the different sites, thus making it "look" like its accessing multiple dbs.. Cheap shot I know, but I'm very lazy. Plus I figure by the time I

Re: accessing multiple dbs?

2009-07-15 Thread Richard E. Cooke
OK. Before I get flamed! I neglected to search THIS group before I posted. So, I see some chatter about being able to instansiate a second DB connector. Great. Now, how about where the best examples of that are? And what impact, if any, does this have on the rest of Django? My boss is

accessing multiple dbs?

2009-07-15 Thread Richard E. Cooke
The answer is not jumping out at me, so I'm going to post it here in case its a simple answer. I want to access an existing DB on a remote server using Postgres. My boss is not crazy about having Django "polluting" this existing - large - db with its internal guts. But I don't see how to