Monday, February 22, 2016

w7d1 - So many pieces

So this page took all morning.  In my local test environment, the links all work.

I have a lot to learn about bootstrap and flex boxes.  At present, the best I can say is that I'm (loosely) using the bootstrap column model and some homebrew css...and I didn't get my buttons to the center of the page by using a ton of <br>.  So there's that.

In the afternoon, I worked on adjusting my models as I learned more about field types and the ability to let users leave a field in a form blank by setting "blank=True" as an argument when defining a model.

Then, I updated the admin file to allow me to create records the easy way via the admin panel, and I made some test subjects to populate my site with.

This evening was setting up a bit of formatting to keep individual pages looking uniform (via a base.html extension for each page).  Then, I started wading into building queries to populate different pages.

Just the "local cats" page, for example:

1. get location from the "location page" and send it via form to the "/local_cats" page.  The query I want to use translates to "get all cat sightings within 1000 meters of the user's location".  I could do that easily in sql, but I'm only just working out the django version since the basic filter function doesn't do numeric comparisons.

Perhaps we'll see tomorrow if my cunning plan will work.

No comments:

Post a Comment