My Django Story

Towards the end of my undergraduate time at UC Berkeley (early 2017), I found out about Django. I spent over the next year of my life building a web application for a nonprofit from scratch. In that time, I didn't have many set deadlines, so I spent hours upon hours experimenting with and exploring different ways to structure Django code. By the time I finished a solid prototype for the nonprofit, I had gained a ton of experience in how to do things in Django (and how not to do things in Django), like structuring the entire application, models, queries, routes, etc.

After running out of money from working on the nonprofit, I decided to go into freelancing, and eagerly took the first month to built out two websites and a backend for Sharkey’s Bar and Grill in Syracuse, NY. They have volleyball leagues three seasons out of the year, and in their summer leagues they often have over 400 teams sign up. I set up the server, infrastructure, database, and all the front end and back end code. I also got to use a little bit of my AI experience from UC Berkeley by utilizing a constraint solver to do the schedule generation. The schedule generation handled excluded and preferred times on the team level, and made sure that certain leagues were matched to certain courts, and that courts 11 and 12 were “least preferred” (no alcohol allowed on those courts ;)). For the frontend for the player facing site and the admin/management site for the coordinator, I picked up Vue to build them quickly (reaching the deadline before the summer season started in 2018). It was an engaging and empowering project, and showed how much my year of exploring Django and building the web application for the nonprofit really “paid off” in the long run.

Following that, I worked on a number of Django powered projects. The next was Joyride, a Slack Bot/App currently on the Slack App store. It used a Django powered backend with a Redis based queueing system (Django RQ).

Alongside Joyride, I got my first Upwork project, building an MVP from scratch in about 10 hours with Django (and the assistance of Cookiecutter Django) for a client that wanted to explore an idea. Django really shined as a framework here for “rapid prototyping”, and I also started to use and customize Cookiecutter Django to quickly start many other future projects after this point.

Shortly following that, I started contracting with the Evidence Based Practice Institute (EBPI) in Seattle (through Upwork). They are working on cutting edge healthcare applications, and my first assignment was to optimize the database queries for an Excel spreadsheet report generation endpoint that was making roughly 280,000 database queries. I was able to reduce it down to three queries! Following that, I worked on more performance optimization, feature development, and some architecture. I set up a Redis Queueing system with Django RQ to offload tasks that didn’t need to be immediate in the request/response cycle, further speeding up a number of endpoints. I also worked on some React frontend code after being there for a number of months, so at the time of writing I’m full stack when necessary (there are two other developers at the moment: One frontend and one backend).

Later on (alongside EBPI), I built another Slack Bot that integrated with Google Maps. I used Celery for this one, and got a lot more experience with pytest and pytest Django (which I prefer to the regular unittest setup).

More recently, I got to architect and built the foundation for two proprietary Django backends from scratch. One with some help from another developer, and one solo. The first was a real estate application. I had to integrate with a third party real estate API and Stripe, and did a lot of work with webhooks and mocking (with/alongside pytest). The backend had to be built before the frontend, so I made sure to have as thorough test coverage as I could within the limits I had to build it. The second (the one I did solo) was building a new backend for an existing legacy application. I integrated GraphQL with Graphene and Graphene-Django, alongside writing a lot of custom code to handle merging and joining of personal schedules/availability. As of February 2020, one of those projects, called Agent's Corner, is just about ready to launch for production, and I’m currently maintaining, scaling, and adding new features to it.

That brings us to the present. To summarize my Django experience thus far, I have experience with:

  • Django
  • Django Admin (I’ve built quite a bit of custom admin functionality)
  • Django REST Framework (almost every project I’ve worked on with Django has used this to at least some extent)
  • Graphene and Graphene-Django
  • Pytest and Pytest-Django
  • Custom signup, verification, reset password, and authentication flows and backends
  • Integrating Twilio with Django and mocking/patching it within tests
  • A number of Django libraries, including:
    • Django Model Utils
    • Django Simple History
    • Django Import/Export
    • Djoser
    • Django Filter
    • DRF Nested Routers
    • Django Celery
    • Django RQ
    • Django Recurrence
    • Django Expiring Token
    • Django Guardian
    • Django Anymail (With Mailgun or Sengrid, and either Django templates or ESP templates)
    • Django CORS Headers
    • Django Storages (With S3)
    • Django Phonenumber Field
    • Django Summernote
    • Django AllAuth
    • Python Social Auth (Django)
    • ... And More

I also have experience integrating the following with Django:

  • Google Maps
  • PayPal
  • Stripe
  • Slack
  • Many other systems and APIs. Recent work (as of February 2020) has involved more and more external integrations.

I have written code for and integrated the following frontend libraries/frameworks (and could potentially work on those if needed) with Django backends:

  • Vue (standalone SPAs or even within Django template responses)
  • D3
  • React
  • jQuery
  • Plenty of Vanilla JS

Finally, I would say my biggest strength within Django is being able to read/understand a large codebase, and see the places where the performance could be improved. That performance improvement might come about by introducing queueing, optimizing queries (using things like select_related, prefetch_related, etc., but also by rethinking the logic and rewriting some of the code), caching and/or using cached properties as necessary, or a number of other ways.

Also, with experience (as of the latest update in early February 2020), I've gotten to solve a number of interesting "synchronization" problems where my Django models and code needed to be synchronized with external resources, and there were a lot of webhooks/notifications that queued different celery tasks to update various models, send notifications/emails, and keep all of that database state consistent. I've really enjoying architecting the Django application and building the models to handle these types of workflows, and I'm looking forward to hopefully getting to solve more of these types of challenges in the future alongside new ones!