Charly
Ayodele
Charly
Hmmm, thanks
Still not convinced? Take a look before judging it
Ayodele
I will do just that. Thanks
Alison
Guys, do you usually create the templates folder in the main folder of the project or inside the folder of the respective app?
Charly
Charly
Alison
Oh, thanks
kiran
Seems ok
Yes it is okey but cant move forward and rewind the video manually
kiran
Is this a common problem or its only for me?
Lalit
My page is getting so slow. It was taking 55sec to open. After using prefetch_related and select related it is opening in 28 sec
Huge data is there and I am filtering those data, and a loop is also running
At the end I have paginated on that data
Lalit
What should I do to open my page within 2sec
Lalit
In every situation
Felipe
Nima
Hello guys
I want to start learning a database for Django
Which database do you recommend?
Charly
cj
Valentin
Ayodele
IM~Exynos
I need someone's help who does analytics work with Bigquery, i am planning to aggregate a data of 1M rows. Where that table has unique data i also need that, to reduce the query cost i am planning to aggregate the table.
M
Hi every one
need help
Error:
in check_database_version_supported
raise NotSupportedError(
django.db.utils.NotSupportedError: Oracle 19 or later is required (found 12.1.0.2.0).
I can't connect to DB oracle
Could you explain what is wrong ?
how can i fix it
cj
Axror
please help me that convert below sql query to django orm
```
SELECT m1.student_id, AVG(m1.mark) as quarter_avg, AVG(m2.mark) as annual FROM subject_markmodel as m1
LEFT JOIN subject_markmodel as m2
ON m2.student_id=m1.student_id
WHERE m1.subject_id=38 and m1.room_id=123 and m1.quarter_id=3 and m2.quarter_id in (1, 2, 3, 4)
GROUP BY m1.student_id
```
Doragonsureiyā
Anand
Hello everyone I am facing issue regarding breached password validation.it is working fine in my local code but when I am using in my server it is giving internal server error can anyone help me it is urgent issue?
kiran
Can any one help me with how to skip the video that uploaded through django
Edgar
Edgar
Edgar
A js script that changes source url of the element?
Shyam
How to take mysql db backup using django
Roshan Rajak
Neha
Guys I need help actually iam doing signup from frontend (vue.js) signup with email id phone number and username after this function sending OTP but at the time of verify its showing email ,phone no and username is not found in the session
Jairaj
Baldo
Hi. Little question, how do I on Django rest framework to GET requests have all the data of a foreign Key, while to POST/PATCH/PUT requests of these foreign Keys specify only the id?
The Inspired
you can use depth attribute of serializer or manually add the attribute using the source attribute of serializer
Rahat
Please tell me anyone implement twillio in drf
Rahat
When did I trial twilio account to only personal mobile no. OTP send
Rahat
v
Hi! I have Book model in my django project, the Book model has field status, I need to show in django admin panel only tables with particular status values. How can I do it?
Axror
Hi guys. How can I modify png image in python.
𝔸𝟙𝕕𝕪𝕟
hello
I want help in my chrome extension. My chrome extension record video audio of Google meet. My but extension is not working. If anyone know, then let me please know. And also my backend is django where I am sending my video after recoding complete.
Nabil
Hi! For example,I'm working on blog post page which has a detailview for a post and a list view for comments and a createview and updateview for a comment and voting and so on...
So how can I use multiple generic views for one page?
I mean instead of repeating myself merge the context of all of that repeated stuff then rendering that context to one template..
Aswin Kumar
I am one doubt, can anybody solve it
Aswin Kumar
I want to call a function in views. Py from html and I am using AJAX to call it, but my function needs to return render but i am not able to do it
Anonymous
I have a review model with a creator field that is defined as follows:
Creator = models.ForeignKey(auth.get_user_model())
In the admin site, when I want to create or edit a new review, the Creator field displays a select input that can be used by all users.
For example, if admin Sina wants to write a review under the name of another user or admin, they are able to do so.
If we don't want this to happen and want the admin to only be able to write reviews under their own name, what can we do?
I have tried using exclude in the admin model, but that prevents any reviews from being created at all
Afshin👀
hello I use the crispy forms at my register screen but the forms are small how can I change forms width ?
Careful
use {% load crispy_forms_tags %}
Careful
and add class to your fields
Baldo
hi, I made a webapp with django that i want to deplore using gunicorn. The problem is that if I try to start gunicorn (as per the documentation) it tells me that the settings have not been loaded correctly.
For the settings I created a folder with the settings for production and development inside. In the init file of the settings folder I made sure that it loads the right configuration based on how the DEBUG variable is set.
What can it be? In the wsgi.py file it always points to project.settings. if I start it with manage.py it doesn't give problems instead
the file hierarchy is this:
Project
Settings
init.py
Common.py
Dev.py
Prod.py
inside the init file I do
from .common import *
inside common.py I have this https://pastebin.com/AymeMjR1
Christian
You should add a __init__.py file in settings directory, import common.py file from dev and prod files and specify the correct settings file with the env var DJANGO_SETTINGS_MODULE
Pavel
Hello everyone. Could you help me with filtering qs by jsons array elements
It's necessary to find objects which contains substring
MyModel:
customs = JSONField()
json structure.
{"six": [{"hello": "wo11"}, {"hello": "wo12"}]}
what I want
qs.objects.filter(...__hello__icontains="wo1")
what I tried qs.objects.annotate(arr=Func(F('customs__six'), function='jsonb_array_elements')).values("arr_els").filter(<here is error>)
It doesn't allow ti filter
It's easy to filter by only first element in array
.filter(customs__six__0__hello__icontains="wo1")
But how to find if any in array contains?
Anonymous
hello
I am just getting started. What sources should I learn from?
Is there any simple documentation? or video
Lalit
Hello, my page is getting to much slow. It's taking nearly 60sec
Nearly 1000 data is in my database.
In views I have filtered the data, for loop is also used on filter
Next to it I have used Paginator
I think at the time of the filter it's fetching all data
Any suggestions what can do
Suryo Adhy Chandra
Anonymous
Baldo
Nvm, fixed
Afshin👀
and I used the class {{form|crispy}}
Christian
Baldo
The settings structure is not related with that, just make sure that you have __init__.py inside your settings/ directory, you’re importing the base/common file from environment specific files and that you’re specifying the environment variable to the correct settings file, example:
project_dir/
project/
settings/
init.py
base.py
dev.py
local.py
prod.py
…
manage.py
…
(It’spy
bpy, telegram is formating it to cursive)
base, local and prod files should start with from base import *
And in your server you should run export DJANGO_SETTINGS_MODULE=project.settings.prod
Same for local development (necessary to run commands): export DJANGO_SETTINGS_MODULE=project.settings.local
Yeah, I know. Btw, I fixed the problem in another way. I kept the settings like before, so that i don't have to specify every time what settings I want(It Simply reads from env what configuration I Need). The problem was in the init.py file insider the project folder, in this file I was loading the mqtt client. The mqtt client needs to access the settings and It was accessing them before they have been initialized. In order to fix that I mooved the code inside the apps.py file of my app, and implemented the ready method