Yep
Yeah
Anders (izzno / gooood) 🇳🇴
paste the actual models.py
Yep
I get 4 times the data from the first url stored..(i know it should run from 0 to 2)
Yep
Ok sec
Anders (izzno / gooood) 🇳🇴
And you should not be doing this is models.py
Anders (izzno / gooood) 🇳🇴
but lets see
Yep
https://pastebin.com/GQ736RyK
Yep
There is no free space between the lines in the loop
Yep
Pastebin just edited it wrong...
Yep
I can show the func.py too
Anders (izzno / gooood) 🇳🇴
the loop is under by it self ?
Anders (izzno / gooood) 🇳🇴
Not in the class ?
Yep
Hmmm seems so
Yep
Im new to django
Anders (izzno / gooood) 🇳🇴
Yes you are.
Anders (izzno / gooood) 🇳🇴
Do the tutorial
Yep
The for is left asigned...not under in the class
Anders (izzno / gooood) 🇳🇴
You are fumbeling blind at the moment.
Yep
I know..but it got it worked...half worked
Anders (izzno / gooood) 🇳🇴
Yes but even if you give me every information here I could fix it but I could not explain it to you because you dont get the core concepts.
Anders (izzno / gooood) 🇳🇴
So my suggestion is: Take the 2 hours and do the tutorial.
Yep
I got the save in the models from a tut
Anders (izzno / gooood) 🇳🇴
Well it was not a good one
Yep
I put the loop in the class, now it doesnt work...
Are there many things to change?
Yep
Just need that the data gets stored, than im done(for my first django project)
amar
def single_slug(request, single_slug):
categories = [c.category_slug for c in Tut_Category.objects.all()]
if single_slug in categories:
matching_series = Tut_Series.objects.filter(tut_category__category_slug=single_slug)
series_urls = {}
for m in matching_series.all():
part_one = Tutorial.objects.filter(tut_series__tut_series=m.tut_series).earliest("tut_published") ...
series_urls[m]= part_one.tut_slug
return render(request,
"coder/category.html",
{"part_ones":series_urls})
amar
Request Method: GET
Request URL: http://127.0.0.1:8000/web-developement
Django Version: 2.1.5
Exception Type: DoesNotExist
Exception Value:
Tutorial matching query does not exist.
amar
this is the erroe anyone please help to solve
Artyom
Hi, devs! I think is simple.. How I can parse this: goal_cutareas = Fca.objects.filter(num_of_agree__pk = 30) ? (I wish to get all objects from filter apart from other). Cause this: goal_cutareas = Fca.objects.get(num_of_agree__pk = 30) throws MultipleObjectsReturned at /path/
get() returned more than one Fca -- it returned 4!
Artyom
cause that not only one object exists with this filter parameter
Nitesh
I think different objects have similar values.
Kirill
Hi all! I’ve recently begun to study Django framework. I’ve chosen easy project and I want to realize it at work as a case study for myself. Sometimes I have no clues how to move on to develop my project further. Can anyone mentor me in my developing project?
Vivek
How to solve connection error:Httpconnectionpool(host='127.0.0.1',port=8080): max retries exceeded with url
Vivek
While running API from python application to django application
Orack
hello
Orack
how do i make model
Orack
for storing a .rar file in mysql database ?
Orack
or a .zip file
Mirco
use FileField
Tommaso
Hi guys, I accidentally overwrote my secret_key, is there a way to recover it without doing the project anew?
Yash
Can i use mutiple databse in one project like mysql with mongodb !
apple
apple
i mean.. you could with some difficulty
apple
but why
Shiva
Guy is it possible to take screenshot of particular div of html page with Django ?
cj
Oleg
cj
it's a front-end job
Oleg
Browser JS wouldn't probably be able to do that either
Afaik
Shiva
Ok ok I want to pass the value given user to that html and want to take screenshot without loading a page , with Django rest framework ?
Oleg
cj
Shiva
Shiva
Shiva
I m working on maps only
Orack
now getting Forbidden (CSRF cookie not set.): /upload_image
Orack
but i dont want to make an html file,
only call insert/ from postman
cj
Orack
Orack
any way to do it using plain django ?
cj
https://docs.djangoproject.com/en/2.2/ref/csrf/#edge-cases
notice the #edge-cases anchor 🤷🏻♂️ it should be self-explained
Orack
cj
Orack
but is it safe to use it as RESTAPI ?
cj
Orack
cj
what could go wrong ?
you will should do many things manually... if you're not djangonaut enough, you would break things, or leave open holes 🤷🏻♂️
cj
DRF is pure magic and life saver if you want to make REST APIs
Murshid
Is there any password field type in django. I created a model. That contains a password field.
Аброр Нуранов
Hello everyone. How can I start learning Django?
cj