By lumiobyte / Published July 29, 2019, 10:05 a.m. UTC
#100DaysOfCode Day 1:
Day 1 of my #100DaysOfCode! The first day is always exciting.
Today I finished writing the contact app for my blog (this one you're reading!) and tried to deploy it... and the trouble started.
First off, git wouldn't pull because of some sort of merge conflict. I hate when it does that. It forced me to commit a bunch of changes
locally on the server which weren't important and when I tried to pull from my remote repository to update the code on the server it refused saying some issue
with merge that I didn't understand. I wish git understood that the repository on that server is NOT for COMMITTING things, it is for PULLING things! Gawd dammit.
Don't worry, that was only the first problem of the day. Next up, I decided to delete the git repository and make a new one, pull, and restart gunicorn. Only then
all you saw on the website was a bad gateway error. Oops. Quickly I went to check out my issue on the server and then my virtualenv had just disappeared?! So I had to create
a new one, and then pip install django, gunicorn, whitenoise, Pillow, etc and manage.py makemigrations, collectstatic, migrate. That took long enough.
Then finally I did runserver and everything seemed to work. Exit out of that, restart gunicorn... YES! IT'S BACK! Feature successfully rolled out!
The feature is contact requests, a system where users can submit a contact request, then I can go into a dashboard only signed in staff can access, and view these requests, follow up by
email, or delete them if they're dupes or spam.
Nothing is more satisfying than rolling out a feature you've worked hard on - and managing to make it all work without a tutorial!!!
Afterwards, later today, I started developing another project. A website where anonymous users can upload images and share them easily with a link. I'll reveal
more about that later in development. Anyways, that's it for today, see you tomorrow!
Day 2 of my #100DaysOfCode!
Today I added some stuff to prepare for putting ads on my blog, prepared some templates, and also added a system where google analytics isn't on all the pages
because I don't want myself accessing things like contact requests or creating/editing blog posts to register on my analytics numbers. I strongly believe that if
I'm gonna have analytics on my site, that the numbers must only be real visitors and that I can't add to that number, accidentally or on purpose [😅]
Then, I continued working on my new website project, starting to really love Django! I feel like I'm getting the hang of things like models and templates and views and all. Static
files are still a pain, but understanding them will come... hopefully.
See you all on day 3!
#100DaysOfCode Day 3:
Today I kept working on my as-of-yet unannounced project. I really feel like I know my way around Django to an extent that I can make basic apps. A bit of a clue as to what my project is: You can upload images!
Uploading images... ahhhh... the old nightmare. I'll be back, and this time I'll beat you.
#100DaysOfCode Day 4:
More work on my secret project, of course! I've made a lot of progress with views and stuff. I finished models ages ago, and only today I managed to see if all my hard work has paid off!
It does work, but it's not pretty. The colour scheme is terrible, and everything is all squished up together. Display issues. Images still aren't loading, but I'm getting closer to identifying a fix...
I've worked out where my images are going (it's not where I want them to go) but I'm clueless as to how to tell Django to look there. Read the docs 5 times through and can't find anything. The docs are really
lacking on static file handling - either that, or I'm just terrible at interpreting them.
Apart from that, I've been investigating styling forms - just as much of a daunting task as everything else. I'm worried to just write the form myself too, because it might
be insecure (as everything is) and that I probably shouldn't do that. I watched some YouTube tutorials and they all do it in a really complicated way I don't understand. I don't like those type of videos, as I
don't want to just mindlessly copy code that I don't understand.
Well, today has been a day of as much progress as discovering roadblocks. But I've still got 96 days to get past them! See you all on day 5!
#100DaysOfCode Day 5:
I haven't written as much code today as I have other days, because I spent way too long admiring the Bootstrap docs. Have I yet mentioned that in my ~2 weeks of using it I've pretty much immediately fallen in love with it?
It, and font awesome too. Damn those icons are sexy. 🤣
I've been searching for a way to use every feature in existence and and I think I've managed to work badges into my blog. I had an idea where the badge would display the number of contact requests that have been sent in
without me having to go to the page to check it. Anything to add another little feature!
I also considered adding a blog to my secret project (why tho) just so I could use the "New" badge. I also used cards and shadows today.
In terms of code, I've just been tuning my templates to try and improve the hideous UX - but it's still hideous. Hopefully when I reveal the project I'll be able to get some feedback from you guys about it. That's if
I ever add images and comments to this blog. Probably not for a while.
Well, see you on day 6 everybody!
P.S If you want to help my try and fix my issues with images, send me a contact request and I'll send you an email as soon as we can and we can discuss (I'll give a more detailed rundown of my issue there)! Thanks so much for the help if you do!
This is an advertisement.