Inside the Head of PyDanny

Hi, I'm Daniel Roy Greenfeld, and welcome to my blog. I write about Python, Django, and much more.

Tag: Javascript

Authenticating via JWT using Django, Axios, and Vue

Getting Django Rest Framework, JWT, Axios, and Vue.js to play nice isn't easy. Here's my quick-and-dirty cheatsheet that I wrote while glueing the pieces together.

Note: My architecture doesn't use django-webpack-loader. Instead, I'm running Django and Vue.js as two separate projects. I do this ...

Read more ...


Cookiecutter: Project Templates Made Easy

Yesterday, Jeff Knupp wrote an amazing how-to article called "Open Sourcing a Python Project the Right Way". While I was reading it, I was rather pleased by just how close it is to my own practices. Considering Jeff's amazing Writing Idiomatic Python, it meant I was on the right ...

Read more ...


Python dictionary vs JavaScript object: Dynamic Keys

One of the things I noticed a long time ago with JavaScript is that when you create objects you can define keys outside of strings:

> var o = {city: "San Francisco"}
  Object

In JavaScript, this is valid. In Python, you'll get a NameError:

>>> o = {city: "San Francisco"}
Traceback ...

Read more ...


Content Copyright © 2012-2018 Daniel Greenfeld. Proudly harnessed by Mountain, powered by Flask, and rendered by Frozen Flask, all of which take great advantage of Python.