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
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
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
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
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/
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
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 /
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 ├
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
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
{{
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_
11 matches
Mail list logo