Dmitriy
what is the error?
[Errno 44] Not such a file or directory
Dmitriy
I can't understand how Django collects the project as a result
Cezar
I can't understand how Django collects the project as a result
Django uses HTML templates to render a page. Inside the HTML templates you can use template tags which will be converted either into objects coming from the database or simple python code. From what I see pyscript seems to be a JavaScript library that allows a dev to use python code to create JS. I did not know about it. So you could use it but it is good to keep in mind that it is not Cpython but JSPython if that's the case
ким
how to make a background image in html and then link them with models
EZNEBEZIM
how to make a background image in html and then link them with models
1. Define image filed in your 2. In HTML template create ima tag. 3. In settings.py , you should define media path for store images.
Software Engineer
Mirco
Filefield
It's for a background image, so ImageField Be aware, ImageField is always a FileField 🙂
Artyom
how to make a background image in html and then link them with models
{{ model.image_field.url }} for your HTML template
ким
is it possible to transfer images from the module to css?
Mirco
Sebastian
Hello group, a question, does anyone know of any documentation to save several records with a JSON document in djangos resto framework?
Sebastian
several data at the same time
Arslan
Hello everyone, this is a question, I have a project on DRF, there are handles in swagger, I want to optimize queries, can you tell me how to get the number of requests to the database and the time spent when pulling the handles
Mahkam
Hi everybody I have a question. Is it possible to post request with some languages in DRF apart from parler?
Jasurbek
I have 2 identical ImageFields and in DRF, one of them is returning a "/files/subject_images/None.png" format while the other in a "http://127.0.0.1:8000/files/profile_images/2.png" format. How can I make both of them return full path.
Yameen
Please check the path declaration in setting.py
Yameen
I had same issue while deployment, search for how to define static path and static url and look for the same in nginx.conf after the changes don't forget to reload daemon and restart all the services on AWS. I hope this will help. And let me update if it's not, so I can help for the same.
Eliya
it is working on local but not on server
Which oprating system are you using. Yesterday, i succeed in ubuntu 20.4 os. With hostinger website
Eliya
I can share you my deployment method
ким
how to make a django browsing history
Ravi
How many models can support django
whoami
hi everyone. my django admin, swagger, profiler are not loading statics, STATIC_URL, STATIC_ROOT configured. collectstatic already 1000 times, cache cleared. i dnnow what to do
sagar
Hi team, can anyone help to containerized django application exposing application with Docker container ip address..
Shukurullo
Emmanuel
Please I don't understand appropriate? Like why was it created? Asking to learn
Pasha
Hey! Can someone help please. I need to write function in views.py for template follow.html than showes posts of following author. def follow_index(request): posts = Post.select_related('author').filter(author..... need be author of posts that request.user follow him do I correct explain?
Georg
hello. THere is some function get_wsgi_applications. But it's result is an instance of WSGIHandler. So if I want to pass it to some class which needs a WSGIApplication it fails.. How can I get WSGIApplication instance exactly ?
Georg
or maybe I can get a reference of some kind of WSGIServer?
Denis
https://pastebin.com/Jd2pRf3j how to join two querysets and respond with ? {"Actors":[actor1..., actor2..., ], "Venues"[venue1..., venue2..., ]}
Sravya
bro how can i pass variables from django models to js
Artyom
bro how can i pass variables from django models to js
Ajax is the first that comes to mind. Or you can use DRF with some front end framework
quokka
I have a column 'ag_id' and I want to show it as 'foo_ag_id' on the returning from endpoint. There is a way to do that? OBS: I'm using external database that I can't do any changes as migrate/migrations class Foos(models.Model): ag_id = models.ForeignKey('Bars', on_delete=models.CASCADE, db_column='bars_ag_id') class Meta: managed = False db_table = 'foos'
MUNAWAR
Hello I'm new to Django How can we authenticate user id and password with the user id and password in our postgresql database table
MUNAWAR
check Django docs... there is a 'authenticate' method
That works with auth.authenticate What if we have created table other than auth_user
Adzmely
and use it in your views …
The Inspired
That works with auth.authenticate What if we have created table other than auth_user
If you have overridden the default user table then you can also override it's methods and write your own custom logic.
Anonymous
bro how can i pass variables from django models to js
Just render response in json format by using Jsonresponse
Artyom
What do u think of Jsonresponse
If it is useful, why not?
Anonymous
If it is useful, why not?
I guess Ajax is more suitable in case of asynchronization
Artyom
I guess Ajax is more suitable in case of asynchronization
Can't say, for I didn't work with a asynchronization yet
Anonymous
Yeah
Ajn
Guys how to host my django-psql project on Aws
Ian
hello, have you expeirence with django guardian? can I set permissions for objects from admin site or only from code?
Giorgi
Hello guys, I want to avoid form resubmission upon refresh, but my code does not work: def home_view(request): form = QuoteForm(request.POST or None) context = { 'form': form } if form.is_valid(): form.save() context['form'] = QuoteForm() return render(request, "homepage/home.html", context)
Giorgi
Do you have any idea why?
عبد القيوم
what to do in order for the admin can access to the certain urls in django i am just using permissions class IsAdminUser nevetherless it is not working.
Pushkar
I just want to add soft delete functionality whenever i delete the user Any body up for help
Abhie
Hey, how can i synchronise two methods in views.py
.
I just want to add soft delete functionality whenever i delete the user Any body up for help
There’s a helpful example here: https://buildatscale.tech/model-inheritance-in-django/amp/
ABDALLH
guys i have project on linux server
ABDALLH
somtimes it show me error no segment error
Maxim
somtimes it show me error no segment error
does this have anything to do with Django ?
Abolfazl
Hi, guyz, can i use modelform with abstractuser models? i made my form with bootstrap and i don't wanna use django forms such usercreationform and how? Throughout the Internet i just see abstractuser model with usercreationform or userchangreform for update
Nityananda
Hey.... give me some idea for my college minor projects based on django and reacts
Maxim
Hey.... give me some idea for my college minor projects based on django and reacts
this is not a project idea sharing group and i'm not kidding
ABDALLH
i use django rest framework
Tура
Hi, I have a google signup for my website, and two types of users, I am trying to sign up by Google but the user type leaving as a default. I have two different URLs to sign up as I have two types of users
Tура
Could you help me please, why the user type is not changing even I use two different sign up
.
Hey how can I insert data into postgresql table using django?
Doragonsureiyā
Hey how can I insert data into postgresql table using django?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Sai
I have question D=[{'name':'sam','position':'rough' ,'drinks':'pepsi'}, {'name':'sam','position':'rough','drinks':'cooldrink'}] Output:{'name':'sam','position':'rough','drink':[{'drinks':'pepsi'},{'drinks':'cooldrink'}]