Skip to main content

Posts

Showing posts with the label Django

Things I Learned: Google App Engine Django Platform Search Index Updates

Let's say you have a deployed Google App Engine application you've been using for years like the ham radio practice exams we're updating here. You decide to output data the app is obviously using all the time. For us, it was the table of help topic links for each exam question. You think you're going to output the data easily, and then: NeedIndexError: no matching index found. recommended index is and nothing. This happened here today, (obviously right?) I had to walk through a series of documentation steps and log messages, but the answer in the end was simple. First, the message above doesn't turn up in your app, it turn up in your log message explorer. For us, that's at  https://console.cloud.google.com/logs/query;cursorTimestamp=2023-07-03T15:57:44.595552Z?project=hamdaise Next, that's where you'll find an actually very handy error message with this at the bottom (your data model will be different unless you forked the ham radio exam repo .) That...

Things I Learned: Django to Postgresql setup

I'm playing with Django, a really snazzy template based, database backed web app engine, again this week. I originally encountered the tool when I started making Google App Engine applications years ago. One of the last extant apps from that era is my ham radio exam practice app. This week, while ramping up another project, I did something new, I connected Django to a PostgreSQL database . I'd always used MySQL in the past. There were  steps. They weren't particularly difficult, but I couldn't find much in the way of documentation, and when I did, following the steps in order didn't work for me. Here's what did: Install psycopg2 . (You may need to install psycopg instead depending on your version of Django. Django does a good job of telling you what it actually needs later in the process. Of course, make sure PostgresSQL is already up and running. You'll need to be able to access the postgres user who's default password is in fact postgres. Setup up th...