Ruby is to Python as Rails is to Django

Jay Stewart
Nov 6 · 3 min read

I thought it was super interesting that you could spin up an app so quickly in rails by just typing in a single line. I heard Python was very similar to Ruby so I was wondering if there was an equivalent gem in Python. Except they’re not called gems in Python. They’re called “packages” which — if I’m being honest — gems is a way cooler term than a package. Let me put it this way: would you rather a file full of gems or a file full of packages? It’s not even a question what your answer would be. Obviously gems.

List of possible alternative names for packages in Python:

  1. Poisons
  2. Nests
  3. Herpetariums

It looks like, however, the biggest package in Python is called “Pypi” (pronounced “Pie’-pie”, “Pie-pie’-eye”, or The Cheesehead). I wanted to see if there was an equivalent gem to TTYPrompt and Pypi had similar functionalities. I didn’t have time to dig into this further to double check if this was true but it seemed to make sense from the strangers on the internet.

So, I wanted to have a couple goals with starting to flush out this idea. Mainly, just with my knowledge of how Ruby and Ruby on Rails works, could I build

  1. A hello World app (User can go to a Localhost URL and get “Hello World” printed to the screen)
  2. A page with a few simple routes (maybe CRUD?)
  3. Resurrect Project ButtDial and incorporate ALL ITS FUNCTIONALITY

This is what I did.

Googled “Pycharm” → went to their site and downloaded the IDE. Then I ran “pip install django”

“python manage.py migrate”

“python manage.py runserver”

hurray-yay

I kept running into problems. For some reason I needed to run a virtual environment to get my server running. I can’t find the code at the moment but just know you might need to run one. From there I had to go back and forth with downloading and reinstalling django and python.

Even though django uses an MVC framework it’s weird because technically django is the controller. I don’t really know why or how it works like that but these are the pages that I had to look at:

Settings==> put the app name here.the most self-explanatory part.
This final product!

Hope you enjoyed this as a something something and a something something! Having to review over the things I knew in ruby and rails was a really helpful lesson at figuring out what I could do in django. There’s definitely a lot of differences between rails and django at the start but overall it was a fun experience to figure out the parts of information on the internet that I needed and that parts I didn’t.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade