NARASIMHA
How can i do aggregate on an aggregated value
NARASIMHA
Like avg of sum in a group by query
Emmanuel
hello, I need help on this /static/css/static/images/main/annie.jpg i am trying to access this file but it is pointing to a different path
Emmanuel
This is how i created path {% static 'images/main/annie.jpg' %} i got different results
Emmanuel
like his background-image: url("{% static 'images/main/annie.jpg' %}");
Emmanuel
That is what the system, I don't even understand
Muflone
This is how i created path {% static 'images/main/annie.jpg' %} i got different results
the correct URL for this static is /static/images/main/annie.jpg
Emmanuel
like his background-image: url("{% static 'images/main/annie.jpg' %}");
I did it this way but I don't know why I got that in return
Muflone
show the exact error, as your words are different
Emmanuel
I get this error when I am trying to use an image as a background-image
Emmanuel
background-image: url("static/images/main/Annie jpg") then the error pops up
Muflone
"this" error
Muflone
are you using {% static into a .css file?
Ahmed
Hello guys i want some help How to make variation to products
Amit
How to use others doman name in our server at the beginning of url
Amit
Like http:client1:8000/ Like http:client2:8000/ Like http:client3:8000/
Emmanuel
are you using {% static into a .css file?
Thank you for your time, I have been able to resolve it
David
Some here know a project with django about marketplace I want to l ow experience of other developers thank you guys
Emmanuel
What was the error?
It was pointing to 2 static directories
Emmanuel
They were having the same sub-directory
Emmanuel
So I deleted one
Karan
Hi guys can i ask programming related queries/question here /\??
Rose
User kiseya has 1/3 warnings; be careful! Reason: rule #1: speak English
Stive/Stivenos
hi guys i am building a news website and when i see the django debug toolbar i have too much sql queries .... and i used select related and prefetch related but that also make no d/ce. is there any other way i can decrease these queries.
Stive/Stivenos
34 queries
Muflone
34 queries
check in your code if you have loops which iterate on the records
ali
Django support Mongo DB?? for NoSQL databases?
ali
34 queries
About what part site?
ali
No officialy.
So I can't use it integrated?
Victor
So I can't use it integrated?
You can use djongo, but I don't think is a good idea
Mirco
Django support Mongo DB?? for NoSQL databases?
Django doesn't work well with nosql But if you use Postgres, you can take advantage of document storage by using jsonb available features
A
guys, please tell me is it ok to use the ModelViewSet class in views with routers?
A
and how to better regulate query methods using ModelViewSet.
A
I'm new to DRF, please give me a hint
ali
Django doesn't work well with nosql But if you use Postgres, you can take advantage of document storage by using jsonb available features
Yes, thank you, but I wanted to use pure mongodb. I think that's a bad thing the django doesn't support NoSQL databases.
ali
and how to better regulate query methods using ModelViewSet.
Query optimization doesn't work with DRF. If you want good queries, you should know and be professional in django ORM to send good and clean queries. In the end, the DRF document is so best.
A
Yes, thank you, but I wanted to use pure mongodb. I think that's a bad thing the django doesn't support NoSQL databases.
when I use ModelViewSet, the swagger gets a lot of unnecessary requests, I was thinking about how to adjust the requests using viewset
jūdê
then the best option for me is to use generics?
GenericAPIView is what I would always recommend You get to define your different HTTP methods within a class, take full control of the behaviourism of each method, describe the method using docstrings and swagger_auto_schema for swagger documentation, customise your query and optimise as much as you want, make it scalable and so on and so forth. Also, with GenericAPIView, you are forced to use serializers to either define input with data validation or output, which generally, forces you to write specific and better code.
Mirco
Yes, thank you, but I wanted to use pure mongodb. I think that's a bad thing the django doesn't support NoSQL databases.
Django is a 20 years old framework built for relational databases For nosql is better to use other tools like FastAPI
DePyraxe
Im trying to create custom user in Django but it refuse the python manage.py migrate command and show this error The field admin.LogEntry.user was declared with a lazy reference to 'accounts.user', but app 'accounts' doesn't provide model 'user'. I need your help guys to solve this errors
Godfred
hello please any help? i have tried fixing the error buy not working. "xception Type: TemplateDoesNotExist Exception Value: polls/index.html"
jūdê
And this is a new project? Did you by any chance run the first migration before declaring this user model?
DePyraxe
And this is a new project? Did you by any chance run the first migration before declaring this user model?
I created a first app and run migration, secondly I created another app for custom user but in migration return that error.
J D
Hello, I want a function to run every 24 hours, what can I use?
J D
Scheduler
thanks a lot
Poya
hi why i can't send photo?
Muflone
hi why i can't send photo?
There's Instagram for the photos Django is code and code doesn't require photos
SK
Can we convert the data to json format which is getting from database and show in html page?
Rose
Can we convert the data to json format which is getting from database and show in html page?
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
pelmen'
hi! i want to check my bot last activity. all what bot is doing is checking data and sending data with django api. i want to check how many bots was active in last two minutes ( i'm sorry for my English)
Nati
What might be the issue when updating a field in PostgreSQL with a max_length of 100 value too long for type character varying(50) class Product(models.Model): title = models.CharField(max_length=100)
Nati
Have you migrated it correctly? Because the db has still 50 as max length
Yes, I have run 'makemigrations' and 'migrate' as I always do, but I have never faced this error before.
SK
Can we convert the data to json format which is getting from database and show in html page?
Need help on filter the data which is getting , if am giving only {{ entry}} it is fetching the data but when am trying to show the specific value..getting an error {% for entry in entries %} {{ entry }} <hr> {{ entry.CN }} {% endfor %}
SK
can someone help me on this?
Anonymous
Hello Can someone explain the concept of generic relation to me?
Rose
User Alireza has 2/3 warnings; be careful! Reason: rule #1: speak English
Muflone
Hello Can someone explain the concept of generic relation to me?
a FK field which can related to different models, not only a single one
Anonymous
Filefield is good or upload it to s3 and store as url
ruthless
But, I couldn't skip video or video controls is not working