Tag archive for "Python"

One of my client uses google apps, so I use that account to send out mails with Django, which works just fine. However, google silently drops all error mails to the admins, for whatever reason you can't debug and will never hear anything about anyway. As those mails only go … more

Migrating Django projects with fixtures

2014-05-07

When migrating a Django project it's often useful to work with the built-in dumpdata and loaddata management commands. However, this can easily lead to errors like django.db.utils.IntegrityError: Problem installing fixture Could not load foo.Bar(pk=ba): (1062, "Duplicate entry for key 'app_label'"). Such errors indictate that a similar object already exists in … more

RuntimeError: App registry isn't ready yet

2014-04-13

The upcoming Django 1.7 has many interesting and welcomed changes. One of them is an update to how applications are loaded. The relase notes also mention potential problems with these changes. I ran into RuntimeError: App registry isn't ready yet while using the self-contained tests approach, but the fix is … more

Django-filter and custom querysets

2014-03-21

Django-filter is a powerful tool, but the documentation is a little sparse. If you want to see examples of custom Filters you have to dive into the source code. I recently wanted to add a filter for methods on a custom QuerySet. Unlike custom managers, custom QuerySets allow you to … more

Using django-tables2, django-filter and django-crispy-forms together

2014-03-18

Using django-tables2, django-filter and django-crispy-forms together I was recently working on a very CRUDy prototype and decided to use some Django applications and tools together I hadn't combined yet: Django-tables2, an excellent application that allows you to quickly build tables Django-filter for easy filtering Django-crispy-forms for easy form creation A view that uses all three apps … more

Video and image sitemaps in Django

2013-05-24

I recently added a sitemap to a site with many images and videos. Having the media files in the sitemap helps search engines to index them. I hadn't done this with Django before, so here are some notes. If you're not familiar with sitemaps in Django check out the official … more

Django Webmaster Verification

2013-03-25

Today I have released version 0.2.1 of django-webmaster-verification. I never took the time to write a post about it, so here you go. The Django application helps to quickly register with various webmaster tools like: Google Webmaster Tools Bing Webmaster Tools Yandex Webmaster Tools Majestic SEO Alexa These tools can … more

Another scoop of Django testing

2013-02-19

Two scoops of Django is a good book, and I recommend it to anyone who's working with Django. So when I finally got around to using travis-ci I turned to the packaging and testing chapters, but couldn't find anything that would really help me. Travis is a continuous integration service … more

Font I use reStructuredText on parts of this site to write HTML content. But as the main headers don't originate from the rst content I need to start with an h2 tag. It's just a matter of rtfm but here's a solution. more

Values instance has no attribute 'default_reference_context'

2013-02-17

I was just editing some reStructuredText content for my website when Django threw a strange error at me. Values instance has no attribute 'default_reference_context' What was really bizarre is that exactly the same rst content could be published as HTML just fine in a test script: from docutils.core import publish_parts … more

DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceUse a maskWorldInternet securityPianoFontGnuPGThunderbirdJenkinshome-assistant-logo