Building a personal blog using Django
25 comments
A blog is exactly what the Django Girls tutorial does: https://tutorial.djangogirls.org/en/
There are many different ways of building websites (such as static site generators, JAMStack, etc) so that's also something to consider. If you do want a hosted CMS then Django is a perfectly fine choice and as others mentioned, the Django Girls tutorial teaches you how to build exactly that.
Later down the line you could consider Wagtail which builds upon Django but provides extra functionality helpful in building a CMS, but for the time being I suggest you stick with Django if you're just trying to learn.
Later down the line you could consider Wagtail which builds upon Django but provides extra functionality helpful in building a CMS, but for the time being I suggest you stick with Django if you're just trying to learn.
Django for a blog is just an overkill. if the plan is to learn django, pick bit more complicated project, like e-commerce or HRMS, etc.
If the goal is to have a blog, use any static site generators for easy and quick win and deploy it to netlify, github pages, etc. easier and cost effective.
If the goal is to have a blog, use any static site generators for easy and quick win and deploy it to netlify, github pages, etc. easier and cost effective.
agreed. Static site generators also significantly lower your attack surface when it comes to security.
until you want to add comments, different SEO schemas, spam protection, search, etc
Flask is simpler, uses Python and their tutorial is a blog.
I found Flask easier to pick up than Django, as I an new to coding too.
https://flask.palletsprojects.com/en/2.1.x/
I found Flask easier to pick up than Django, as I an new to coding too.
https://flask.palletsprojects.com/en/2.1.x/
Go for it @rishikeshs and when you are done, write in your newly created blog the entire procedure you followed so we can learn too ^_^
Writing along as you work on something is a great way of reinforcing what you learnt as well!
Thanks a lot!
A few others have commented about using a static site generator to build a blog. If you're looking into develop your python skills here's two (of many) static site generators that are written in python:
Pelican: https://blog.getpelican.com/
Nikola: https://getnikola.com/
Pelican: https://blog.getpelican.com/
Nikola: https://getnikola.com/
I'll check these! Thanks a lot for the suggestion
I rebuilt my blog on django in college (it was previously on Drupal, IIRC, prior that rewrite) and ran it that way for many years. It was a good experience. I used the django admin as my only CMS, and it got the job done. It was an interesting way to run a blog and I was happy with it for those years.
A few years ago I got tired of running it. Cheap VPSes have an expense in management time (making sure everything is up to date, distro upgrades, etc) and I didn't think the managed django hosts that I was aware of were worth the costs and static hosts sites got cheap as free again (just like when I was a kid; back when my blog started before blog was a word) so I switched to a static generator (again). (In this case Jekyll because of Github momentum at the time I switched.)
Django is a great choice and you can have some fun with it! Others are suggesting SSGs because they are cheaper and easier (they are), but it is your blog and you should have fun with it.
A few years ago I got tired of running it. Cheap VPSes have an expense in management time (making sure everything is up to date, distro upgrades, etc) and I didn't think the managed django hosts that I was aware of were worth the costs and static hosts sites got cheap as free again (just like when I was a kid; back when my blog started before blog was a word) so I switched to a static generator (again). (In this case Jekyll because of Github momentum at the time I switched.)
Django is a great choice and you can have some fun with it! Others are suggesting SSGs because they are cheaper and easier (they are), but it is your blog and you should have fun with it.
I think you should clarify your goal.
If you want to learn coding and specifically Django then this is a good project.
If you just want a blog there are other tools that are easier like
Jekyl and Hugo
Yes. I thought since I’m already learning Python, Django would be an added advantage
Django is a great MVC framework. It might be overkill for a blog as another poster wrote, but it's still a good way to learn Django.
If you ever want to learn Nim, please consider Nexus (https://github.com/jfilby/nexus) as I'm building it to be something like Django for Nim.
If you ever want to learn Nim, please consider Nexus (https://github.com/jfilby/nexus) as I'm building it to be something like Django for Nim.
Well, about the MVC terminology, if we want to be pedantic we have to read their official response about why they call it "MVT" and not "MVC"
https://docs.djangoproject.com/en/4.0/faq/general/#django-ap...
https://docs.djangoproject.com/en/4.0/faq/general/#django-ap...
Yes the view layer of Django is templating, but it's still a view layer.
For Nexus the view layer is very flexible. You could use Nimja for templating or DocUI which I still plan on releasing. This doesn't mean there's no code at all in the view layer, there's a WebContext object with useful info (e.g. is this a mobile device?) and some other helper code.
DocUI is still something I plan to release as Open Source this month. With the current Flutter front-end engine you can write Nim (or any other supported language) on the back-end and have the front-end engine render your UI.
For Nexus the view layer is very flexible. You could use Nimja for templating or DocUI which I still plan on releasing. This doesn't mean there's no code at all in the view layer, there's a WebContext object with useful info (e.g. is this a mobile device?) and some other helper code.
DocUI is still something I plan to release as Open Source this month. With the current Flutter front-end engine you can write Nim (or any other supported language) on the back-end and have the front-end engine render your UI.
Why jester instead of prologue? Jester had some issues in my experience running things like background jobs on Windows.
I just went with what I knew. I started this project a few years back and it's been evolving slowly.
Web routes will be configured via YAML, so I actually think I could make the lower-level web framework pluggable. So you could use Jester, Prologue or something else.
Web routes will be configured via YAML, so I actually think I could make the lower-level web framework pluggable. So you could use Jester, Prologue or something else.
You can use something like Hugo and host it on Github Pages. For a blog you don't need a backend framework like Django.
I have a blog post on setting up a Hugo + Netlify blog on my own blog.
https://www.amishbhadeshia.co.uk/posts/setting-up-a-new-blog...
https://www.amishbhadeshia.co.uk/posts/setting-up-a-new-blog...
autoblogging(1)
I was wondering whether this is a good choice and I would love to see some examples of personal blogs developed using django.