spacer

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

  • Home
  • About
  • Events
  • Tools
  • Audrey
  • Blog
  • Book
  • Django
  • Python
  • Archives

Beginner's Guide to PyCon 2013 Part III

Sunday, March 10, 2013 (permalink)

This is Part III in a series of blog posts about PyCon US 2013. The goal is to provide a handy reference guide for first time attendees of the world's largest Python conference. Part I was mostly about tutorials, Part II was mostly about the first day of talks ...

Read more ...

PyCon Tutorial: Wiring Up Django Packages

Friday, March 08, 2013 (permalink)

You just finished the Django tutorial. What now?

You learn how to Wire Up Django Packages!

This is a 3+ hour PyCon tutorial on March 14th at 1:20pm, in Santa Clara California at PyCon US.

In alphabetical order, the instructors:

  • Audrey Roy
  • Daniel Greenfeld (myself)
  • Kenneth Love

Tutorial Description ...

Read more ...

We are not using PayPal

Saturday, March 02, 2013 (permalink)

In January Audrey Roy and I launched a book about Django called Two Scoops of Django: Best Practices for Django 1.5. We decided to not use PayPal. Here's why:

Open Source Events Get Burned By PayPal

PayPal has a long, sordid history of freezing the accounts of Python ...

Read more ...

Two Scoops of Django 1.5 Beta Released

Thursday, February 28, 2013 (permalink)

After thirty four days of hard work, Audrey Roy and I are proud to announce that we've released the beta of Two Scoops of Django: Best Practices for Django 1.5. It's been a monumental effort, a labor of love, and we hope you find our efforts worthy ...

Read more ...

Beginner's Guide to PyCon 2013 Part II

Wednesday, January 23, 2013 (permalink)

This is Part II in a series of blog posts about PyCon US 2013. The goal is to provide a handy reference guide for first time attendees of the world's largest Python conference. Part I was mostly about tutorials, this post will be about registration and the first day ...

Read more ...

Beginner's Guide to PyCon 2013 Part I

Tuesday, January 22, 2013 (permalink)

New to Python and thinking about going to the upcoming PyCon US for the first time? You know, that big Python conference taking place near San Francisco in March?

Or perhaps you signed up already and are getting worried about being overwhelmed by hundreds of tutorials, talks, and activities?

No ...

Read more ...

Two Scoops of Django FAQ

Monday, January 21, 2013 (permalink)

spacer

The launch of the Two Scoops of Django: Best Practices for Django 1.5 book has gone pretty well. The response has been almost entirely positive and sales have been pretty brisk. We've gotten a ton of great, constructive editorial feedback, which we're sorting through as we race ...

Read more ...

Our Django Book Has Launched

Thursday, January 17, 2013 (permalink)

spacer

We (Audrey Roy and I) wrote a book on Django! It's called Two Scoops of Django: Best Practices for Django 1.5, and you can buy it right now in e-book (PDF) form on the website: django.2scoops.org.

Django, like any framework, has tips, tricks, and pitfalls ...

Read more ...

New Year's Resolutions for 2013

Monday, December 31, 2012 (permalink)

I'm one of those people who not only likes to make New Year's Resolutions, I like to blog about them.

Resolution

  • Go to at least one technical conference in North America, South America, Europe, Asia, Africa, and Australia.
  • Visit at least one new nation. It's hard to ...
Read more ...

2012 resolution summary

Sunday, December 30, 2012 (permalink)

Resolutions completed

  • Go to a Python related conference in North America, Europe, and Asia. Conferences I attended:

    • PyCon US
    • DjangoCon Europe
    • PyCon Philippines
    • PyCon Poland
  • See a place in the USA I've never been. A couple places I saw:

    • San Luis Obispo
    • Sonoma
  • Drop to a 32 waist

  • Visit ...

Read more ...

New Year's Python Meme 2012

Friday, December 28, 2012 (permalink)

Tarek Ziade has a habit of ending the year with a Python-themed meme. I've matched his meme the times he previousstarted it, and as you can tell from the title of this blog post I'm matching him yet again.

1. Whatโ€™s the coolest Python application, framework or ...

Read more ...

Result of our LA Migration Hackathon submission

Sunday, December 09, 2012 (permalink)

Possible Causes of for Internal Migration of Undocumented People

Our concept was to measure the effect of changing immigrant laws per state compared to income differences between regions. We present the following, which will be on it's own hosted site shortly:

Median Income over 5 years between States

Note ...

Read more ...

Developer Time

Tuesday, December 04, 2012 (permalink)

This blog post got started with a tweet.

That tweet got retweeted a lot by developers. And system administrators. And database administrators. And any creative type.

As of December 7th, 2012, it had been retweeted over 500 times, a personal best. Obviously I struck a chord that resonated with a ...

Read more ...

Stay with the Django CBV defaults!

Tuesday, November 27, 2012 (permalink)

One virtue of Django Class Based Views (CBVs) is that they come with pretty good default settings. The virtue of this is you can really pare your code down in size and complexity.

For example, here is an implementation of CBVs based on a straight-forward Django model , stuffage.models.Stuff ...

Read more ...

Thoughts on ranting

Monday, November 26, 2012 (permalink)

I'll admit it, I love a good rant. I respect those who can give rants well. I would list the ones I really like, but I'm not sure I want to deal with the arguments that would follow. ;-)

Of course, as much as I like to read or ...

Read more ...

Case Study: URL Design for petcheatsheets.com

Wednesday, November 21, 2012 (permalink)

Backstory: On Saturday, November 17, 2012 Audrey Roy and I decided to participate in the Petcentric hackathon, a Los Angeles area Pet-themed product/coding contest held at Amplify. We arrived a bit late, but armed with Audrey's idea of creating a pet based reference sheet for owners, pet sitters ...

Read more ...

Django GetOrCreateView

Tuesday, October 16, 2012 (permalink)

Today I decided to use the Django class based view (CBV) CreateView, but I wanted to avoid duplications and submit to the view from the front page of a site. The reason was I needed a simple newsletter signup form. This is what I cooked up and should work for ...

Read more ...

Los Angeles Open Source Sprint on Nov 4th!

Sunday, October 14, 2012 (permalink)

spacer

Yet again, myself, Audrey Roy, and a small but elite cadre of volunteers are feverishly at work putting together another Los Angeles open source event. Our last effort went smashingly well, and like any good engineer, we're ready to scale up - this time to 150 attendees!

LA Open Source ...

Read more ...

We need more PyCon US 2013 submissions!

Thursday, September 27, 2012 (permalink)

The PyCon US 2013 call for papers (CFP) ends tomorrow, September 28th, 2012. We need more talk and tutorial submissions. Talks are 30 or 45 minute efforts in front of the PyCon audience and are recorded for posterity. Tutorials are three hours long and are given to attendees who have ...

Read more ...

Installing Pycairo on Mountain Lion

Tuesday, September 04, 2012 (permalink)

Pycairo is the binding for the cairo graphics library. It's also not something you can get running with a simple pip install py2cairo. After many hours of working the search engines and dancing to the configure/make/make install melody, I figured out an answer that worked for me ...

Read more ...

Thoughts on my stack

Tuesday, September 04, 2012 (permalink)

I'm an open source developer. I use Python, Django, PostgreSQL, JQuery, MongoDB, Memcached, and Redis. I push production code to Linux servers.

And yet:

  • My laptop runs Apple's Mac OS X.
  • My primary editor is Sublime Text.
  • My production servers are provided mostly by Heroku.
  • All my sites ...
Read more ...

Python dictionary as a class

Saturday, September 01, 2012 (permalink)

A long time ago, circa 1999, when I was working in a certain procedural language I found a library that added objects to the language. It did so by playing interesting tricks with key/value structures, which in Python are called dictionaries. In 2005, as a new Python user, I ...

Read more ...

A Public Service Message to the Python Community

Monday, August 20, 2012 (permalink)

Hi, I'm Daniel Greenfeld. You might know me from my blog. I'm here to talk to you about a very import subject: Submitting your talk early to PyCon US.

Last year there were hundreds of talks were submitted for just a very few speaking slots. Unpaid volunteers labored ...

Read more ...

PyCon 2013 Talks/Tutorials I want to see

Monday, August 20, 2012 (permalink)

This morning, Jesse Noller, the chair of PyCon US, suggested a meme, "PyCon 2013 talks/tutorials I'd like to see". Here is my meme submission:

1. Python Obfuscation Contest

This certain-to-be-controversial talk idea would be where the speaker would solicit Pythonistas to submit a single arcane Python code module ...

Read more ...

Python dictionary vs JavaScript object: Dynamic Keys

Sunday, August 19, 2012 (permalink)

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 (most recent ...
Read more ...

Django Requirements 2012-08-15

Wednesday, August 15, 2012 (permalink)

A little over three months ago I blogged about my preferred requirements list. It's now nearly the eve of Django Dash, and I feel it's time to update the list. I'm going to bump the versions on some of the existing packages and add some new ones ...

Read more ...

Curiosity has landed!

Monday, August 06, 2012 (permalink)

I'm terribly proud of what was accomplished last night: A car-sized robot weighing a whopping 8,580 pounds (3,893 kg) was landed on Mars. It is packed with scientific packages that will expand our knowledge of Mars, and has the power to use them for at least 14 ...

Read more ...

Deadline for DjangoCon Financial Aid requests is tomorrow!

Thursday, August 02, 2012 (permalink)

For 2012, DjangoCon US has moved to Washington, DC, and everyone is invited! If you need financial support to get there, the Django Software Foundation and PyLadies have paired with a number of forward thinking sponsors to help get you there. All genders are eligible for assistance, so don't ...

Read more ...

Attaching custom exceptions to functions and classes

Thursday, August 02, 2012 (permalink)

Having too many custom exceptions on a project can be a pain, but a few choices ones are really nice. The problem is that in complex libraries having to import both functions and exceptions becomes a drag. To mitigate having to remember to import custom exceptions, this is a handy ...

Read more ...

Django Update View without slug in the url

Saturday, July 28, 2012 (permalink)

Today I wanted to use the Django Class Based View (CBV) UpdateView but without a slug identifier in the URL. For example, instead of /profiles/pydanny/ I would go to /my-crazy-profile/. Also, I needed to force authentication.

I've done this with Django functional views a few times times, but ...

Read more ...

July 15th, 2012 LA Open Source Recap

Monday, July 16, 2012 (permalink)

On July 15th, 2012, at the July LA Hackathons Open Source event, over 60 Python, Django, Ruby, Ruby on Rails, PHP, JavaScript, Node.js, Perl, and Clojure developers arrived to work on a variety of projects. We went from 10 AM to 10 PM, and there was much coding and ...

Read more ...

Simple HTTP Basic Auth Wall

Monday, July 09, 2012 (permalink)

I have a client who wanted their entire unlaunched public content site quickly but temporarily blocked for a short period of time. He wanted a universal password so he could send the site to reviewers, done quickly, and nothing else. In a few days the site will launch, and even ...

Read more ...

PyCon Philippines 2012 Day 2

Thursday, July 05, 2012 (permalink)

The second day of PyCon Philippines 2012 had a really good turnout. My unofficial estimate is that we had about 90% of the attendees from the first day attend (with the unfortunate exception of most of the faculty and students of Agoo Computer College).

The day started with...

Lightning Talks ...

Read more ...

PyCon Philippines 2012 Day 1

Tuesday, July 03, 2012 (permalink)

PyCon Philippines 2012 (PyCon PH) happened just this past weekend at the University of the Philippines Diliman (UP Diliman) campus in Quezon City, which is part of Metro Manila.

I can assure you that PyCon PH was an wonderful, amazing, humbling experience. I'm hoping that this post and others ...

Read more ...

Announcing PyCon Philippines!

Saturday, June 09, 2012 (permalink)

PyCon Philippines 2012, set to occur on June 30 and July 1, is the first Python programming conference held in the Philippines. PyCon is a volunteer run effort that brings together Python developers from a variety of backgrounds and skill levels into a friendly, cooperative environment in order to educate ...

Read more ...

Django Class Based View: email form with CAPTCHA

Wednesday, May 23, 2012 (permalink)

Yesterday I showed how to implement a simple email form for Django using Class Based Views. Today I'm going to extend yesterday's work to use the excellent RECAPTCHA service to help reduce spam content.

This version requires pip installing the following into your virtualenv.

  • pip install django-crispy-forms so ...
Read more ...

Simple Django email form using CBV

Tuesday, May 22, 2012 (permalink)

Here's a simple FormView Class Based Views for Django. Here is a sample of how to do one as a simple email form. There is no CAPTCHA in this example, that's the topic of a future blog post.

This version requires the following packages pip installed into your ...

Read more ...

May 12th, 2012 LA Open Source Recap

Monday, May 21, 2012 (permalink)

On May 12th, 2012, over 50 Python, C++, Ruby, PHP, JavaScript, and Node.js developers arrived to code on a variety of projects. It was awesome! Tons of open source projects saw contributions, and people across languages and frameworks worked together.

spacer

Event Background

Less then two weeks before May 12 ...

Read more ...

10 reasons to go to DjangoCon Europe

Monday, May 14, 2012 (permalink)

You should go to DjangoCon Europe in lovely Zurich, Switzerland. Here are 10 reasons why:

1. Chocolate

So much of what we like about chocolate comes from Switzerland. For example, Milk Chocolate was invented in Switzerland.

2. Keynote speaker: Jacob Kaplan-Moss

Always a great speaker and fun to be around ...

Read more ...

CSS Hacking to make my code samples legible

Friday, May 11, 2012 (permalink)

I've been very happy with Pelican as a blog engine so far, and haven't even moved off the sample theme. There's just been one problem: Myself and others have had a lot of trouble reading the code snippets.

I didn't have time to cook up a ...

Read more ...

Choosing an API framework for Django

Thursday, May 10, 2012 (permalink)

First off, out of the box, Django lets you construct API responses with a little work. All you need to do is something like this:

# Copied from https://docs.djangoproject.com/en/1.4/topics/class-based-views/#more-than-just-html
from django import http
from django.utils import simplejson as json

class JSONResponseMixin ...
Read more ...

Django Requirements for a project

Wednesday, May 09, 2012 (permalink)

Today I'm starting a new project. I'm working as fast as I can and hope to launch on Friday. What are my package dependencies?

Django==1.4

Unlike my last quick project which was Flask, this effort really falls into

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.