Skip to content

Tag: django

Django + Heroku: Out of Memory problems

So this is my first time deploying a django instance on Heroku. My site has had 1000 visits so far and 600 unique visits. We get about 60-200 visits per day. The link is https://socialspark.spuro.org/ Today, 6 days into being live – our site is running into a lot of memory issues. I.E., cannot allocate …

is not JSON serializable

I have the following ListView But I get following error: Any ideas ? Answer It’s worth noting that the QuerySet.values_list() method doesn’t actually return a list, but an object of type django.db.models.query.ValuesListQuerySet, in order to maintain Django’s goal of lazy evaluation, i.e. th…

Django – Custom Admin Actions Logging

All changes you do in Django Admin is logged in the table django_admin_table and you can also see your most recent changes in “Recent Actions”. But when you write own “Admin Actions” and make changes through them nothing is being logged by default. Example: My question is now if it&#82…

Filter an evaluated QuerySet in Django

The requirement is for me to be able to access members of an evaluated QuerySet by a string attribute, in this case name. I don’t like the idea of looping over a QuerySet as it seems like there is a more efficient way. After I’ve called something like: And I evaluate it with something like: What i…