Category: Libraries

How does q work?

tim May 25, 2018 No Comments Libraries

In a previous post I talked about what you can do with the debug logging library q. It has some interesting features that don’t look like standard Python, though of course it all is. Debug anywhere Start with the simple things. One of the nice things about q is that you can stick a debug […]

Why do Django views need an as_view() method?

tim March 14, 2018 No Comments Libraries

One thing I’ve sometimes wondered about when using Django: Why do view objects need to be constructed in a special way? For those of you who haven’t used Django, a typical URL mapping scheme looks like this: urlpatterns = [ url(r’^login/$’, views.LoginView.as_view(), name=’login’), url(r’^logout/$’, views.LogoutView.as_view(), name=’logout’), # … ] This maps URLs to view classes […]

Smarter debug logging with q

tim March 10, 2018 No Comments Libraries

I stumbled across an interesting looking library completely by chance the other day. It has the impossible-to-Google name of q, so I guess other people might have overlooked it as well. The idea is to deal with those cases that aren’t supposed to happen, but happen anyway: you’re working on a bug and want to […]

Page 1 of 1