Friday, March 17, 2023

Thursday, March 16, 2023

Seventeen

 Worked through django # 17; making sure logged-in person can

only post in his/her name. This involves the use of javascript...We need

to invoque the django user id - but not show it - on the add post page.

'lechat' is the element the javascript is going to look for.


                                                         





Logged in as admin:

                                                                                

Logged in as Bob:
                                                                              

Retraite

 The Canada Disablity Benefit is in Committee at the Senate:


*     *     *



Wednesday, March 15, 2023

Sixteen

 Django 16 deals with making sure only the actual author of a blog can

edit or delete it. To do this, we make sure that one can only proceed if user ID

is identical to author ID. That ID is assigned when we create a new user in the

admin scetion...

                                                          



                                                                         

The ForeignKey from the models' page is that ID. 

One can see theidentity  condition on the home page.

                                                             







Tuesday, March 14, 2023

Fifteen

 Worked through Django # 15. Now have a drop-down list of categories I

can use to navigate to a page of posts of that category.

                                                            


Learned a useful trick along the way: how-to check if we have created the proper function

to pass information. From the home page:

                                                                  

What shows up on the home page:

                                                                          

The views page:
                                                                     


Getting the drop-down menu code from Bootstrap for the base page:

                                                                           


US_Feb

 8:30 am, we'll know what the US Inflation numbers are forFebruary.

                                                 


*     *     *


                                                                        *     *     *

Coming in at 6%!

Monday, March 13, 2023

Slug

 Django # 14 introduces a minor, but necessary adjustment to the blog project:

making sure the slugs are appropriate. What is a slug: it is the last part of a page's

web address. It should not contain any blank spaces, but our project letting

the user create blog categories could have introduced these. The solution: letting

the user name his category with a space, slugifying so that there is a dash introduced

when making the address, making the dash disappear in the blog page that 

is later shown...