Posts by lennys (68)

Pics

Incorporating pictures into this blog is hard. I've been going over the code for about 4 hours now, and I was able to get the WYSIWYG working in the admin area, but not on the make-a-blog-post page. I'm still working on it, but I think this is going to take a day or 3 to figure out. The problem is that this blog was initially built without a forms.py file in the blog app, where the tutorials I've looked at all use a forms.py file. So I'm left trying to figure out how to make this work using the other .py files I have. I created a new forms.py in the blog app and added some code to it, and I **think** it's working, but since this is outside of my area of expertise it's slow going. Luckily it's been relatively quiet here at work, or otherwise I wouldn't be able to do this stuff. The WYSIWYG looks pretty slick, it's got image uploads built-in so if I can get it working that'll save me the trouble of manually writing code to support the pictures. It's also got text formatting so you can use HTML tags in your writing. Back to the grindstone...

From .site to .blog...

So I made a change that upset the apple cart, so to say. Initially I had registered this site with the domain name 'lennys.site', set it up, and all was well. But after giving it some thought, I decided that 'lennys.blog' was a more accurate domain name, so I registered that one and changed the site to it, with some difficulty involved of course. I had to create a new Django project, setup a couple of apps in that project, and copy over all the code from the .site to the .blog. Then I had to update the Apache .conf file, and remove entirely the Apache SSL .conf file to get it working initially. then I was able to get CertBot to install a new SSL certificate, this time for lennys.blog, and away we went! I don't know what changes I'm going to make to this blog going forward. I'm reading about how to upload images, so I can add some pictures to the blog posts, but that reading is slow going. A couple of days ago I worked through a short tutorial on uploading images, and I was able to get that working, so now I just need to figure out how to incorporate it into the blog. I have plenty of ideas, but the expertise isn't there yet. I'm working on it.

How it happened...

After I finished my CCNA in April this year, I decided it was time for me to develop a few websites so that I would have an online presence other than in social media, which I don't normally use. A few years ago I had worked my way through a book about Python, which had a chapter on Django. Django is a backend web development framework that is in use on many popular websites across the web, so it seemed like a good place to start. I bought a few other books specifically about Django and worked through them, slowly. Unfortunately when I was working my way through this a few years ago it got derailed by life issues, which everyone has from time to time, and I wound up pivoting to studying for my CCNA certificate. That took a lot longer than I initially anticipated, so by the time I was done with CCNA I was very rusty with Django and Python. Picking that ball back up took a while, but luckily I found some free resources online that helped. I worked my way through several tutorials I found and eventually got confident enough with Django that I put my first site together. That was trixelated.com, where I built a library website that was gleaned from the first tutorial I did and is basically identical to it. After developing the site on my laptop and getting it working, I wanted to host it on my own hardware, so when I got my cabinet via the "Mike Special" I procured an old Supermicro server from our e-waste and installed the ProxMox hypervisor. That took some doing, and re-doing to get it right, but with some help from my coworkers (thanks Thomas!) I managed to figure it out. So now I had a Mikrotik 10gig router and a server of my own, all live on the Internet! It was time to deploy. I created a new virtual machine in ProxMox on my server and after getting it up and running, installed Ubuntu 22.04 on it. I initially setup containers on the server and tried to deploy the site using them, but due to my lack of experience I kept running into problems I couldn't figure out, and eventually decided to go a different route. Instead of using containers I created a new VM, installed Ubuntu 22.04 desktop on it, and was now able to remote into it and build my site by working my way through the tutorial again, this time developing it on the server that was going to host it. I've been doing it that way ever since. Using a VM to host a few websites is a bit inefficient, as you have to run an entire OS virtually, but it worked, so who cares? It was good enough for now. trixelated.com was the first website I developed, but I had another domain name that I wasn't using, namely lennyshort.com. I wanted to build up a basic site for that domain to use to host my resume and a few other items, so after I got done with trixelated.com I started developing lennyshort.com, this time from scratch using what I had learned by working through all those tutorials. Eventually I got it running and added some basic functionality into it, namely the login and password reset features. During that process I decided I wanted to have email service working as well, so I first attempted to setup basic email service using PostFix and DoveCot running on the same server that was hosting the websites. I eventually got that working, but then I decided that I wanted to have a webmail feature for the email too, so I installed Roundcube, but kept running into issues when I tried deploying it in the live site on the server. Either RoundCube worked and the websites didn't, or the websites worked and RoundCube didn't. I fought with this setup for a few days trying to get it right, but was unsuccessful. So after talking with my coworkers about it I decided to blow it up and create a separate virtual machine just for the email service. I got that VM up and running with Ubuntu 22.04 desktop again, and this time went with MailCow, which is a standalone open-source email hosting application. MailCow was a LOT easier to work with than the previous setup I had, and after sending a bunch of test emails to myself I figured out how to arrange the DNS records for proper email service, and got email up and working for lennyshort.com, trixelated.com and my newer domain for my "business", lsenterprises.tech. So now amongst other things I had a website and working email service for lennyshort.com, which was important for me to have in case I went looking for work in the future. After building up trixelated,.com, lennyshort.com and lsenterprises.tech I went looking for what to do next. I wanted to do more with each of my websites, but I needed to develop more expertise first. After doing some Googling for Django tutorials I ran across a series of videos hosted on YouTube where the guy would write code and explain it along the way to develop Django-based websites. These videos were fast-paced, but thorough and I spent a few weeks working my way through them, building up the project on my end while watching the videos. Most of these projects never made it online because I would run into issues I couldn't resolve, which was disappointing. The first video tutorial was for building an e-commerce website named SaulGadgets, which I was excited about, and spent a week or two working on, but eventually got to a point where I couldn't go any further. I was trying to integrate Stripe into it as a payment platform and followed the tutorial as he developed it, but after doing much troubleshooting and head-scratching figured out that the version of the Stripe API in the video was an older version than the one I was working with, and the Stripe developers had made a change in the newer version of their API that basically broke the payment gateway's ability to talk to the site's Django backends' order mechanism. I spent a lot of time trying to develop some modified code to fix this issue, but was unsuccessful so I emailed the guy who made the video tutorials and explained what I had found, asking for help. Eventually he replied and basically said he didn't have time to help me with this issue, so I decided to suck it up and move on, leaving this project unfinished. After that I worked my way through a different set of video tutorials made by the same guy and created a web application that had social media mechanisms built into it, namely a blogging feature, online chat messaging and the ability to register an account and create a profile for yourself. This project was called Wey, which is a Spanish slang word meaning "dude", or something similar. This project also took a couple of weeks to complete, but unfortunately when we got to the end I couldn't get the email validation feature working properly. The videos didn't cover what I needed to know. I was able to make the app generate a confirmation email, but instead of sending the email it sent the output to the console, where I could read it but couldn't do anything else with it. So this project got shelved too, and I moved on to something else. After Googling for more tutorials I found another set of YouTube videos made by a different guy which were pretty good. This project was for a blog, and was the basis for the website you're looking at now. I spent about 2 weeks working my way through that set of tutorials and eventually felt confident enough that I wanted to deploy it online. Earlier I had attempted to build a blogging feature into lennyshort.com, but ran into an issue I couldn't figure out (like usual) and canned that idea. That's why I have a separate site for the blog now. After finishing the tutorial and watching some videos about deploying websites to Ubuntu servers, I put together what you see here and deployed it onto my server as lennys.site (in hindsight I wish I had thought to register lennys.blog instead, but oh well. I might do that and change it later). So that's the story, basically. I'm still in the learning process, and at times I still feel overwhelmed by the amount of material I have to absorb just to make all this work together, but progress is being made. Maybe someday I'll actually be able to make a living with all this stuff ;)

First Previous 19 20 21 22 23 Next Last

My Other Sites

Built with Python and Django

Sites I Like

A Random Collection

Tools I've Used

Mainly Software Stuff