Friday, March 31, 2023

Thursday, March 30, 2023

Twenty-Five

 Django 25: details, destails. Working on putting together a form

and return in the actual blog (and not the admin section) for a password

change.

                                            

                                                                       




Wednesday, March 29, 2023

Time

 A groceries rebate for the less well-off in yesterday's budget

announcement. Yeah!!

So when is it coming???


The government's financial cycle needs to be respected. A budget is

a plan to raise and spend for the coming year. Four days of debate

are then necessary for its adoption. It is a general plan.


For departments to actually pay out promised amounts, there needs to be

an approbiations bill, with real numbers,  looked at in committee.

                                        

                                                    

That takes time...

https://www.ourcommons.ca/procedure/our-procedure/financialProcedures/c_g_financialprocedures-e.html

Tuesday, March 28, 2023

Twenty-four

 django 24 re-casts our edit profile page, with bootstrap:

The fields which we have added were those available form the admin page.

django forms render html, from models we inherit from. The whole is then

normalized by calling on Bootstrap.

                                                                   

                                                                         

                                                               
                                                                 



Nashville

 The Telegraph UK had an informative piece on the Nashville events,

this morning:

https://www.telegraph.co.uk/world-news/2023/03/28/nashville-school-shooting-ex-student-elaborately-planned-massacre/


                                             *     *     *

Visited the New York Times site; ended up leaving with a Palestinian recipe

I might try sometime...


                                                         




                                                                                  




Monday, March 27, 2023

Algae

 Turns out it's a marine ecosystem! Yep, that disturbing mass

of brown algae headed for Florida is not specifically a monstrosity

created by climate change, but something that has been active

in the Atalantic for a very long time. Below:

L’ennemi juré des touristes contre-attaque | La Presse


                                                 *     *     *

Curious about how greescreen editing works, I've been playing

with the greenscreen filter on ClipChamp video editor (which comes

with windows 11). In fact, I had to create greenscreen images for

use in the video: not really 'green', in effect, the first two are on red and the third

on blue. That is the whole challenge of greenscreen. The forefigure

one wants to add to the scenery has to have no 'green' on it at all, or else

the figure image will have gaping holes.


Below: the images on my assets panel, and the little videoclip so far.

This is all incredibly space consuming on the computer!!!

                                                  


                                                    


Sunday, March 26, 2023

Twenty-three

 Django23 adds athe possibility for a logged-in user to update

his or her profile:

                                                                 


                                                                     


                                                                        


I remain free to revert to the original...

Saturday, March 25, 2023

Snippet_Life

 Django 22. We can now  - for each post - define or edit a

snippet, giving a sense of the post content.

                                                

                                                       

                                                                          


It's all routine by now: we change the model, and make a migration. We create

a text widget in forms, and place it with html in home view....


                                                                       

                                                                

                                                                             

Biden_Visit

 source: La Presse

authors: Mélanie Marquis, Joël-Denis Bellavance

translation: BingTranslate/doxa-louise

Joe Biden's visit to Canada: A series of joint initiatives

U.S. President Joe Biden's official visit was an opportunity to announce a series of initiatives between Canada and the United States that are the result of several months of talks and negotiations. Here is an overview of the main measures.


Haitii 

Canada re-affirms its stance: there is no question of sending a security intervention force to stabilize the situation in Haiti. The government, however, will inject $100 million in additional aid "to provide better police support to the Haitian National Police" and impose sanctions on two members of the elite "who take advantage of violence and insecurity," Trudeau said at a press conference with Joe Biden. "I'm not disappointed," said the president of the United States, whose administration wanted Ottawa to take command of a multilateral force. However, he remains of the opinion that action is needed to put an end to the chaos. But "any decision surrounding the use of military force should, in our opinion, be taken in consultation with the United Nations and the Haitian government," insisted the tenant of the White House.


Chinese intervention

While the joint Ottawa-Washington communiqu̩ refers to China Рits "economic coercion, its anti-market policies, its human rights abuses" Рnothing has embodied its disruptive actions better than the presence of Michael Kovrig and Michael Spavor in the galleries of the House of Commons. "I am very happy to see both Michaels. They were reunited with their families safe and sound after more than 1000 days in detention [in China]," President Biden said in his speech to parliament. Ironically, the day before, in the same room, the two men were being talked about because of the allegations against MP Han Dong. Asked if he believed that, as reported by Global News, the elected official had suggested to the Chinese consul general in Toronto to delay the release of the Canadian hostages, Justin Trudeau dodged the question at the closing press conference. Asked to speak out if he felt the need, Joe Biden remained silent.


Focus on nuclear energy

The major transportation electrification project will have an impact on energy consumption. Canada and the United States are building on advances in nuclear technologies to meet increased demand for electricity, particularly small modular reactors. Both countries wish to promote their use elsewhere. "We intend to work closely with emerging nuclear markets to promote the increased use of advanced nuclear energy globally, while ensuring the highest standards of nuclear safety, security and non-proliferation," reads a joint statement from the U.S. Department of Energy and Canada's Department of Natural Resources.


Charging terminals

The planned mass production of zero-emission vehicles in both countries must be accompanied by a massive deployment of charging stations on both sides of the border. In this regard, Canada and the United States have agreed to harmonize charging standards and establish cross-border corridors for the supply of "alternative fuels". Significant sums of money are already planned. The US$7.5 billion in the U.S. Bipartisan Infrastructure Law is expected to be tapped. In Canada, the $1.2 billion already announced fund will be drawn on for the installation of a network of fast-charging stations for electric vehicles.


Critical minerals

Access to critical minerals for electric vehicle battery manufacturing is a top priority for the Trudeau government and the Biden administration. As a result, Canada and the United States commit to building a North American supply chain of critical minerals that is "strong, environmentally responsible and resilient." "We are committed to identifying, acquiring and exploiting opportunities to extract, process, manufacture and recycle critical minerals in both countries to diversify critical supply chains in the clean energy, electric vehicle, semiconductor, aerospace and defense sectors, among others."


Great Lakes Cleanup

In a week when the United Nations warned of the "imminent risk of a global water crisis," Canada announced $420 million over 10 years to preserve and restore a "shared national treasure" – the Great Lakes, a source of drinking water for 40 million people. An announcement welcomed by the United States, where the Bipartisan Infrastructure Law plans to invest $1 billion for clean-up and restoration activities in this freshwater ecosystem, the largest in the world.


Friday, March 24, 2023

Tik_T

 I do not have a TikTok account: I'm a more serious user... But

it does annoy me that it is being forcibly removed from many

phones. Smacks of censorhip, to my mind. I do think that YouTube

feels the same way about this, now that they are showing TTs on

their pages. Long story short, I have started looking into Clipchamp,

a free Microsoft editor that allows a quick and easy way to make

all manner of short - and fun - videos.


Twenty-one

 Django 21; it's becoming very simple to add functionality to

our blog project. Here, a rich text editor to add and update posts.

One uses pip to install it, adding it to models(hence with make

migrations and migrate. It then gets added to settings and the relevant

post pages...

                                                












This will only work if post body  html is marked 'safe'...


FastFriends

 


Thursday, March 23, 2023

Done_Twenty

 Thanks to Django 20, we now have a register page with more information.

Once our named user has filled out register, he can lof in and start blogging.



Below, the forms.py page in the members section. The notion of widget comes

from django: it is how an html element is treated. The inclusion of class form-control

is a Bootstrap feature, essentially dealing with spacing, font and so forth...

                                                                 




Wednesday, March 22, 2023

Raise

 It's a .25 rate raise from the US Federal Reserve!

                                                *     *     *


Django twenty creates a more eleborate registration form:

                                              


*     *     *

Bill C-22, the Canada Disability Benefit, in day 1 of 2 in  comittee at the

Senate:




Tuesday, March 21, 2023

Inflation_Feb

 CPI for February came out today. From the Bank of Canada:


L’inflation en perte de vitesse | La Presse

                                               *     *     *

Awaiting the US Fed rate decision of 3/22/2023.

                                                   


                                                                         


                                                                *     *     *

Nineteen

 I've spent the last few days on an abstruse problem: inconsistent use of

tabs and spaces. I check my code minutely - and it is perfect - but I am still

getting an error. Turns out that python does not accept code that is spaced with

both spaces and tabs in the same function; it needs to be one or the other.

preferably spaces. And the Sublime code editor will show which is at work

on a block of code by selecting the text and hitting crtl +A. Dots

for spaces and lines for tabs. Below:

                                                          


One just gets to work placing the code anew, till the error stops...

                                                       *     *     *

Now done with Django #19. If someone has pressed Like on a post in a previous

visit, the button is now red. It is impossible to like somethong more than once, and a further

press will subtact a Like from the count.


                                                                      


                                                            

From articledetails.html:

                                                         


                                                               *     *     *

In my desperation to check everythting in my non-working code, ended up

finding a set of the Codemy simpleBlog code on Github. Not telling anyone to

use it; but it is a resource:

https://github.com/PawanaShrestha/SimpleBlog-in-Django-Codemy.com-Tutorial-



                                                                     

                      


PEP

 Having trouble with tad and space... Did find a python style guide:

PEP 8: The Style Guide for Python Code

Monday, March 20, 2023

Spring

 SPRING!!

*     *     *
An interesting look at Bank regulation, from the New Yorker:


                                                                              *     *     *

The other view - and a sub-pectoral procedure - on breast augmentation:


Sunday, March 19, 2023

Convoluted

 Django # 18, appears convoluted. It does use a ManytoMany field: one of many users

likes one of many posts! It also calls on http to make changes to article_details.html

ie there is an additions operation to change the likes count on a page.


From models:


From views:
                                                                               

                                                                                

From article_details.html:
                                                                             

From urls:
                                                                                    



Saturday, March 18, 2023

Minor_Prob

 Had a frustrating day, yesterday. Could not get the dbshell to show

in my django app. 

The answer is to uninstall, and reinstall python.

So today, the problem is:

                                                   


I took a while, but I eventually found the simple way to do this.Just

changed the numbers to version 3.11.2 !!

                                                                          


Django #18 is completed, and I am now keeping rack of likes for each post.

(Admin also shows me who is liking the post!!

                                                                            

                                                                                


*     *     *