Maz
my kids.html page https://dpaste.de/VgiR
Maz
my index.html https://dpaste.de/tFxn
Jimmies San
Maz
my views.py file https://dpaste.de/HwSu
Maz
url(r'^kids', views.under_15, name='kids'),
Maz
defining the url in index throws an error.
Jimmies San
but are you using CBV or FBV? with CBV you need to define url differently
Maz
for the kids, im using FBV
Jimmies San
mmh
Maz
how do i access kids.html from index.html....just the url template tag
Jimmies San
how do i access kids.html from index.html....just the url template tag
you can just href to the /url/of in a dirty way, to see quickly the result
Maz
meaning?
Jimmies San
<a class="nav-link" href="/kids">Patients Aged 15 or Below</a>
Maz
already did that...getting a template error..
Jimmies San
what error?
Maz
lemme try as you suggest...i had used href="{% url 'under_15' %} and got a template error
Maz
what error?
cannot resolve file "kids"
Jimmies San
and the kids.html is for sure inside template directory?
Maz
i thought i'm supposed to do it correctly using {% url 'xxx' %}
Maz
?
Maz
anybody know how to do this correctly?
Jimmies San
it seems to be correct: maybe the error is in another piece of software [on settings, or idk]
Jimmies San
from django.urls import reverse
Meera
Ez pz
can u help me in this ? may i pm u ?
Dambe
You need to create a url with the name under_15
Dambe
Something like url(r'', function, name='under_15')
Anonymous
How do I make python perform asynchronous tasks like Node.Js?🤔
Anonymous
Can it better than Node.js
Karim Norman
How do I make python perform asynchronous tasks like Node.Js?🤔
Django-Q! http://django-q.readthedocs.io/en/latest/
Anonymous
Thanks man
Karim Norman
Yw
Anonymous
parse() missing 1 required positional argument: 'stream'
Anonymous
Please i dont understand
Anonymous
https://pastebin.com/MbcpSFE6
Anonymous
thats my Views.py Code
Milan
https://pastebin.com/MbcpSFE6
In parse() change request to request.body or request.data And try what's happened
Anonymous
AttributeError at /Api/ 'WSGIRequest' object has no attribute 'data'
Anonymous
.body not working
Milan
Then try request.POST or request.POST.data I don't sure but just try...
Anonymous
AttributeError at /Api/ 'QueryDict' object has no attribute 'data'
Anonymous
Not working
Milan
Try to reformat code for game_list() like: jp = JSONParser() data = jp.parse(request) game_serializer = GameSerializer(data = data)
Anonymous
ok
Milan
ok
You have any kind of picture related attribute in your model??
Anonymous
No
Milan
Ok then maybe it'll run for you
Milan
I still facing problem kinda yours in api bcz i have one pic related api
Milan
Still not solved for me..
Anonymous
same here
Anonymous
Ok then maybe it'll run for you
Finally,i used the api_view Decorator
Anonymous
i didnt use JSONParser Module again, Api_view Searches for Default parsers to pass Json into python Dict
Milan
Cool👍
Anonymous
try it out bruv
Milan
I'll Definite try that out
Anonymous
?
Anonymous
can any one see me?
Anonymous
Yeah BUT i dont understand
N S
guys what is the easiest way to increase the size of a field in createview
N S
i mean to increase the input field size
Dani
Widget?
Django Bot
>> Blogs - Hello world! >> Links - Django Custom Signals example code - How to Reset Migrations - Use a custom Docker image for Web App for Containers - Azure | Microsoft Do
Django Bot
>> Links - Install and Configure – Django Virtualenv, Gunicorn, Nginx and Supervisor o
Lizeth
I need help... does anyone knows how to connect react js with django? i have a form in react js and I want to save the data in django
Django Bot
>> Links - Django Content Management System | Wagtail CMS
Asaduzzaman
this is my models file
Asaduzzaman
https://gist.github.com/asadlive84/31f9e176abcd3ec77124712a49659ae8
Asaduzzaman
How can I write models?
Anonymous
you can create Marks model with fields student (fk), subject (fk), and score (int) for that
Anonymous
you mean I will create another model name as Marks?
yes, you are not storing student mark for each subject yet, are you?
Asaduzzaman
yes
Asaduzzaman
yes, you are not storing student mark for each subject yet, are you?
Can you check this link : https://gist.github.com/asadlive84/31f9e176abcd3ec77124712a49659ae8
Syed Jafer
In password reset email , yhe file cintent is generated but the mail is not sended