Another small installment of my Web-Scraping series.
Read More »
Another small installment of my Web-Scraping series.
Read More »A small yet useful piece of information inside.
Read More »Just sort QuerySet
with Django built-in methods, man.
Very small shoutout – don’t try to make relative path work.
Read More »Building a menu for staff members I encountered a need to keep the url on the page but make it temporarily unavailable.
Read More »So you are casually overriding get_queryset()
in a, say, ListView, like this:
def get_queryset(self):
entries = [x for x in Entry.objects.all() if x.publications]
return entries
Because you need to sort the Entry
table by a reverse M2M relation publications
and then BAM!:
Attribute error 'list' object has no attribute 'filter'
Without a trace of the line you made a mistake in…
Read More »It is truly irritating when you code minding your business when Pycharm decides to look through thousands of static files in the project…
Read More »‘Run manage.py Task…’ action is not available while PyCharm is updating indices
Suddenly my server went down with this error:
redis.exceptions.ConnectionError: Error 111 connecting to localhost:6379
Pycharm in particular likes fetching Django console spontaneously (while I’m copy-and-pasting things in project tree). After runserver:
Performing system checks...
System check identified no issues (0 silenced).
July 09, 2019 - 15:45:49
Django version 2.0, using settings 'project.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Error: That port is already in use.
Read More »