ChatGPT awesomness with optimising the App code and CSS

20 views
Skip to first unread message

Dean D. Babic

unread,
Oct 7, 2025, 3:24:40 AMOct 7
to Jam.py Users Mailing List
ChatGPT is really helpful with optimising the code:

https://chatgpt.com/share/68e26362-2f40-8012-a126-3ce562c81d9c

✅ Why this is better:
  • Eliminates repetitive if statements — a single lookup table replaces nine if blocks.

  • More maintainable — to add a new mapping, just extend the map object.

  • Faster — fewer conditional checks and property lookups.

  • Safer — it won’t throw errors if a property doesn’t exist.

The first one is used for home_page in here:
https://jampy.pythonanywhere.com/

and the second one can be used here:
https://elgar.pythonanywhere.com/

This one also has new CSS. 

Compare this tho screenshots, one with orig. CSS, and a new one. The size difference is huge!




Screenshot 2025-10-07 151820.png
Screenshot 2025-10-07 151925.png

Dean D. Babic

unread,
Oct 13, 2025, 12:58:41 AMOct 13
to Jam.py Users Mailing List
If someone is interested:

edit_form_tepmlate_layout_headers_jampy_css.png
AND
THEY ARE MOVING!


edit_form_tepmlate_layout_headers_jampy.png.mp4
Reply all
Reply to author
Forward
0 new messages