Other articles


  1. Dynamically creating django models for m2m relationships

    Occasionally when using a django ManyToManyField I find myself wanting to query the join table directly. Consider for example the models below:

    qq python
    class Category(models.Model):
        name = models.TextField()
    
    
    class Entry(models.Model):
        data = models.TextField()
        categories = models.ManyToManyField(Category)
    

    Suppose I have an entry, and want to ...

    read more

    There are comments.

  2. Introspecting django urls for fun and profit

    One of the projects I work on has a fairly large and old code base, and is unfortunately somewhat lacking in the test suite department. We are working to improve this, but in the medium term we are stuck with a fair amount of manual testing.

    As part of some ...

    read more

    There are comments.