Skip to content

Tag: django

Why am i getting NoReserverMatch at /?

I am new to Python and trying to develop a simple blog application.I am getting NoReverseMatch at / error while trying canonical url. Tried different solution to fix this but i am getting help for django versions which are old. Please help me with a solution for updated Django version. ERROR: Reverse for &#82…

Django ajax: in call does not make any changes

So I made this ajax view for my user model I extends my user model with an Integerfield of notification, but when I call the ajax it does not give +1 to my notification model, does anybody know what is going on? my urls.py and my ajax call my user profile model Answer So, change url: Then, change the view

Django no module named ‘main’

I was working on a Django project on my PC, Then I created an application named “register” and I get a weird error when I try to run manage.py runserver: im using Python 3.8.3. this error occurs when i added forms for registration. my settings.py: Answer I’m guessing that you didn’t co…

How to hide Celery task id from structlog?

I used Structlog and Celery in my Django application and both work very well, but I would like to prevent task_id from appearing in the log when the worker executes tasks. How can I do that? The reason is that task_id is a key:value of 36 characters long so it makes log output hard to read. This is how my