Uncaught TypeError: styled_default is not a function

2023-03-14 Thread praveen raj
Hi all, i'm trying to django-react application with postgres db but its giving me the following error: Uncaught TypeError: styled_default is not a function at Popper.js:11:20 [image: Capture1.PNG] here i'm using mui : [image: Capture2.PNG] -- You received this message because you are subsc

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Nithin Kumar
Here. urls.py from django.urls import path from . import views app_name = 'polls' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('/', views.DetailView.as_view(), name='detail'), path('/results/', views.ResultsView.as_view(), name='results'), path('/vote

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Prosper Lekia
This should be your views for vote. from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from .models import Choice, Question # ... def vote(request, question_id): question = get_object_or_404(Questi

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Brian Carey
I think you need to check your urls.py. ⁣Get BlueMail for Android ​ On Mar 14, 2023, 1:33 PM, at 1:33 PM, Nithin Kumar wrote: >question.id or question_id both gave the same result. >These are the views. > >from django.shortcuts import get_object_or_404, render >from django.http import HttpResp

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Sandip Bhattacharya
Can you share your urls.py? > On Mar 14, 2023, at 1:33 AM, Nithin Kumar wrote: > > Hi, > > Stuck with this problem > > https://docs.djangoproject.com/en/4.1/intro/tutorial04/ > > NoReverseMatch at /polls/2/Reverse for 'vote' with arguments '(2,)' not > found. 1 pattern(s) tried: ['polls/

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Nithin Kumar
question.id or question_id both gave the same result. These are the views. from django.shortcuts import get_object_or_404, render from django.http import HttpResponse, Http404, HttpResponseRedirect from django.template import loader from .models import Choice,Question from django.urls import reve

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Prosper Lekia
Let's see your views. On Tue, Mar 14, 2023, 14:32 Muhammad Juwaini Abdul Rahman wrote: > question_id=question.id > > On Tue, 14 Mar 2023 at 21:22, Nithin Kumar > wrote: > >> Hi, >> >> Stuck with this problem >> >> https://docs.djangoproject.com/en/4.1/intro/tutorial04/ >> >> NoReverseMatch at /

Re: Where to include libraries I write in a django app

2023-03-14 Thread Scott McKissock
Thanks, that makes sense. On Monday, 13 March 2023 at 14:23:19 UTC-4 bck...@gmail.com wrote: > Hi Scott, > > Yes, generally single-app relevant utility code should be included as > additional modules within that app. Some examples: > my_app ├── __init__.py ├── apps.py ├── models.py ├── urls.py ├

Re: Stuck with Django Tutorial Part 4

2023-03-14 Thread Muhammad Juwaini Abdul Rahman
question_id=question.id On Tue, 14 Mar 2023 at 21:22, Nithin Kumar wrote: > Hi, > > Stuck with this problem > > https://docs.djangoproject.com/en/4.1/intro/tutorial04/ > > NoReverseMatch at /polls/2/Reverse for 'vote' with arguments '(2,)' not > found. 1 pattern(s) tried: ['polls/ > My detail.ht

Template Filter - stringformat issue

2023-03-14 Thread DieHardMan 300
I tried Django template built-in filter "stringformat" to fixed string length to 3 for example assume I have variable name "data" contain "A1" I want to display this variable as "A1 " (1 blank space) so my code is {{ data|stringformat:":<3s" }} --> Result is None so I tried another 6 examples {{

Stuck with Django Tutorial Part 4

2023-03-14 Thread Nithin Kumar
Hi, Stuck with this problem https://docs.djangoproject.com/en/4.1/intro/tutorial04/ NoReverseMatch at /polls/2/Reverse for 'vote' with arguments '(2,)' not found. 1 pattern(s) tried: ['polls/ {% csrf_token %} {{ question.question_text }} {% if error_message %}{{ error_