top of page
  • Aug 22, 2020
  • 1 min read

For my first project, I have written some base files, to get a web page with a couple of images and a menu. Extended it with a second app to tweak the menu names and page contents.


All good so far, I add in a separate html file for a contacts page a py file for the form content and a couple of changes in the view sand urls. It works and showed the form.

Then I push it to git and the format of the page is lost and the image links are broken.


Even when I revert all the changes I made it still remains broken.

Does anyone know what I am doing wrong?


 
 
  • Aug 21, 2020
  • 1 min read

Fed up trying to look through wordy drivel as I learn how to set up a Django base system for an app. Too many sources were interjected with 'Learning Python', something that is not needed at this point for me and I think most people would have come to Django from learning Python previously.


Here is little note that I use whilst I get it to sink into the brain.

Now it is a walkthrough for me but if you get stuck using this then please get in touch.





 
 
  • Aug 5, 2020
  • 1 min read

There are many variations of the guessing game, where a random integer has to be guessed in 5 guesses or less.

After successfully completing my first Advanced bite on @Pybites. I noticed their take on the game in the form of another Advanced bite. So I thought I would have a go at it. Just to make it more of a challenge I didn't open the bite to see the template code to start with or the pytests that would give a pass of the bite.


No, I went for it with just the brief. Handles exceptions for an empty entry, a non-numeric character and to note if the guess was previously entered. This is above the usual lower, higher, correct or too many guesses.



Generate the random number is a separate function to the class. With variable that can be altered. ( I renamed the variable to that used in the PyBite before I took the screenshot)


The class would handle everything else. I had a lot more detail in my code than required for the test. Counting guess attempts, and deducting attempts if there was an erroneous guess.

The messages f' strings were a lot more detailed than required. So I dumbed it down a bit.


Again the screenshot is of a working hybrid of what I designed myself and some reductions of content to ensure that the pytests would pass. The developed code will slot into the PyBite code, with a little work on the class details.



 
 

© 2020 by Vincent Healy. Proudly created with Wix.com

bottom of page