First Try...

My first attempt at blogging...

some trying along the way...

To be honest not much done since last time i wrote something in here.

But while not much has been produced in terms of implementation or design, some things have been tried to learn and feel more confortable with the development stuff i am trying to do.

First things i have been trying/testing is the fact that in this simple blog i would like to have a way to start a new entry in the blog, but keep it as a draft somewhere. A "place" i could revisit and edit a bit more, or add more text, or simply rewrite the all thing.
And after doing the changes needed, modifications to the text flow and alike, publish it.

i did then some testing in the work computer, added a new table for keeping the draft entries, and some simple code on the blog code to add a draft button onto the new entry page, and simply add the entry as is to the draft entries tables.
And it worked with a few problems along the day, the first one was to add a draft button to the page new entry templace.
After that, or at the same time, creating the table to hold the draft entries. Again a simple table with entry title and entry text with a simple primary key to keey order on things.
Then finally glueing it all together with the python code. Here a bit of intial challenge was to get the columns right in the SQLalchemy language, and the last thing most visible in terms of errors, was the fact i wanted to have a primary key, based on a sequence so not null and not repeating values, but forgot how to define it in PostgreSQL.
By looking into the other primary keys and the way the index or sequence was defined and how it incremented, repeated more or less the same steps and it worked.

While working on the code for the blog, i notice that navigating the code and searching for the correct funtions/views to modify and work with them, was not the easiest way anymore because of how the view code has grown.
So a final thing i started investigating was how to change the "views.py" that holds all the views code and splitting it in different files with the idea of having one file per view or per template or similar.
After looking around on the usual google search i came accross:

My views.py File Is Quickly Becoming Large. Should I Refactor It?

Using the experience shared and how he did it, i tried it in the skeleton of the myVideos code, and started the first step by moving, as described, the views.py into a views directory and using the __init__.py to import it.
But there was something that i didnt fully understand which was the statement "from views import *" that didnt fully work, but after changing it to "from .views import *" if worked fine.