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 […]

Page 1 of 2