Django 1.7+ migrations: Altering a field to be a ForeignKey

Django 1.7+ migrations: Altering a field to be a ForeignKey

I’m migrating an existing project written in PHP to Django. The existing project is using MySQL and it’s missing some indexes and foreign keys, but there’s also existing data so the normal Django migration file cannot be trusted. I’ll explain why….

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Django: Custom decorator with optional kwargs

Django: Custom decorator with optional kwargs

After spending the last 3 years in PHP (not by choice) I’m happily back to Django and working toward a PHP-free-life. Not that PHP is terrible, I believe it has a place in the landscape, I just personally do not…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Django and RethinkDB: A tutorial

Django and RethinkDB: A tutorial

I’ve been using Django for a while and I’m a huge supporter of it. Late last year I picked up RethinkDB and instantly fell in-love with it. It’s quickly become my go-to NoSQL database for all my new up-and-coming projects….

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Step-by-step guide to using Google Storage as your website CDN

Step-by-step guide to using Google Storage as your website CDN

Today I finally moved away from Cachefly as my CDN to Google Storage, because my friend at Google assures me that any content put there is distributed on to their Edge servers which is Googles CDN, and he also assures…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Step-by-step guide to social logins with Django Social Auth

Step-by-step guide to social logins with Django Social Auth

Update! The guys at OAuth.io have released their awesome idea an open source package for everyone to take advantage of. I HIGHLY recommend using this solution, because it is FAR easier. If you don’t want to bother setting it up…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

SCSS+JS+Image asset packing, optimizing and versioning

SCSS+JS+Image asset packing, optimizing and versioning

In my production and development environments all of my assets are packaged, versioned and stored outside of my repository. For development I use internal subdomains to replicate those assets coming from a CDN, and in production those assets are uploaded…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Python persistent dictionary?

Python persistent dictionary?

I just had an interesting thing happen in Python while working on rwrapper that I haven’t come across yet, it really had me baffled and I’m still not sure why it does it yet. I’ll do some research later and…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Using a wrapper for your RethinkDB tables in Python

Using a wrapper for your RethinkDB tables in Python

Since I’ve been using Django a lot recently I’ve become sort of spoiled by the Database abstraction that comes with it, but unfortunately using that with RDB just isn’t an option so I tried to find a nice middle ground….

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!

Python lambda modify list of dictionaries

I got sick of having to commit results from RethinkDB to memory then run through a loop to add a few extra fields before returning it to the browser. What follows is an in-line solution to this problem because I…

 Dave

About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!