My new framework for today was Django which is a Python based web framework. I haven’t written any Python for at least 3-4 years and decided to give Django a try again. What turned me off of Django was using regular expressions for urls. But after creating a polls app in Django I gotta say I’m pretty hooked. I followed the tutorial below which is based upon Django’s documentation but simplified in video form.
Think I’m going to stick with Django for awhile
I enjoyed writing the Django poll app so much I’ve decided I’m going to stick with it for awhile. A ton of the code just clicked for me and I felt as though I was in control of the app vs too much magic (like how I felt with Rails at first). Some of the syntax was wonky such as rendering and displaying urls. In some instances the text was ‘polls/index.html’ then in some instances it was ‘polls:index’. While the tutorial is for Django 2x and 3 is out I think if you’re looking for a quick get the code functioning to see how the framework works the above video is a good beginner course.
Command Line Tip
Instead of typing in python (my python3 is aliased to python) manage.py all the time I created an alias in zsh.
In the terminal (I use nano for quick edits) nano .zshrc and typed
alias django="python manage.py"
Clone my Polls App
Or
git clone https://github.com/bryansiegel/pollsDjango_project.git
Tags
Django Web DevelopmentWould you like to hire me?
Side projects, Employment Opportunities, you want to give me a [big bag] of money.
Contact