Skip to content
Advertisement

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 ‘post_details’ with arguments ‘(2020, ’08’, ’15’, ‘indian-software-industry’)’

Django Rest Framework With Only Function Response

I just want to make a simple API with DRF. The API going to get a “keyword” from URL, and that “keyword” will go to a function. And function response is going to be API response. Simple Example: http://127.0.0.1:8000/api/langdetect/helloworld/ RESULT: It’s all easy. How can I make this? I read the doc but every example is making with Models, serializers

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

How to fix TemplatesDoesNotExist error even after BASE_DIR has been Joined with templates in settings.py?

Image 1- Error I notice Exception Value: registration/login.html , I don’t even have that in the templates, instead, i have sign-in.html, I have no idea why it mentioned login.html. Please see my templates folder below as image 3-Templates. I’m trying to fix the above error. My project path looks like Image 2- project path Image 3- Templates The image 2

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 configure your WSGI app as Django’s App engine looks

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

Advertisement