cj
for report design? no... you have to have already the report designed in Jasper, and later, yes, you can integrate Django to fill that report with the desired data
so, in a couple of words: Django can fill the report already designed in Jasper and create the PDF You don't design a report from Django to Jasper
ROG 💻
you have to have the reports designed in advance in Jasper
Yes, it is most likely that I will have to have a Jasper server from which I consume the pre-designed reports.
cj
We already tried it and it seems deprecated
a little bit old... but you can search other places, StackOverflow for example
Ali
how i install django for python 3.11.4 ??
Create a new virtual environment and install everything you need with specific version
Abolfazl
Hello guys I use MoviePy library for convert video to audio in Django But when i run project with docker I get this error(when i run it without docker everything is ok): OSError at /video/convert/ MoviePy error: the file /code/src/media/default_video/1_doctest_BF2X8uz.mp4 could not be found! Please check that you entered the correct path.
Daniel
Sorry for stupid question, but when you defined your Middleware Class, you implemeted magic methods init() and call()?
If that's what you mean, def __init__(self, get_response):         self.get_response = get_response     def __call__(self, request):         response = self.get_response(request) yes, I tested this too, but that no change, I have decided now using the same / the last urls😐😂😂
Ayass
Jual.objects.annotate( jml_produk=Count("produk"), ).values('kasir', 'jml_produk').distinct() want produce query like this. but the queryset give wrong result,,, select kasir, count(produk) as jml_produk from jual group by kasir;
Abolfazl
Docker containers do not have direct access to the file system of the host. By default, they have none.
But i use volume for my Media file In my project fist of all i save file and then convert it
clouded
The paths are not the same in the container. That's what you need to fix.
clouded
Note that this group is about Django, not configuration of Docker containers. If you want to talk about your configuration and setup issues, please go to @pythonofftopic.
Abolfazl
The paths are not the same in the container. That's what you need to fix.
MoviePy error: the file /code/src/media/default_video/ But i check this path and our files saved there
g
I have a problem with trying to make unit test, ok test.py, i have an error with doesn't exist table test_
g
I made settings with test database definition too, and then, i have an don't can't create database because the database exist
g
If i make test without database, database test only is created with tables about django users, but the tables asociated with models.py don't are created
Ario
Hello friends For those who use the Telegram API to automate their Telegram account, I created a project to convert the sent and received messages into text. Maybe it will be useful for you, I will be happy to know your feedback repo: https://github.com/cybera3s/audioscribe
N.A.developer
How I understand ManytoMany Relationship and OneToMany
N.A.developer
Ok thaks a lot
N.A.developer
I used to makemesaages its very good for translation
N.A.developer
But I don't understand Relationships
Ario
But I don't understand Relationships
study relational databases these are two types of relationships between tables in relational databases
clouded
Where good understanding ?!
google sql for beginner
clouded
Ok
And read the results! I forgot to add.
N.A.developer
I hope web developer
clouded
I hope web developer
There's one thing you cannot get around to become a web developer and that's reading.
N.A.developer
Which books we advice
Boulevard
How I understand ManytoMany Relationship and OneToMany
study basics of sql first of all, the answer is: A many-to-many relationship describes a situation where an object of the first model can be simultaneously associated with several objects of the second model. Conversely, one object of the second model can also be simultaneously associated with several objects of the first model. For example, one student can take several courses, and several students can take one course.
Daniil
Hey guys! I'm quite familiar with local development. Currently, I have a dockerized app with multiple services (Django, Celery, RabbitMQ), and I'm running it using docker-compose. My problem, and a question is: I have no idea how to host an app like this. Yeah, maybe I'm blind, but I didn't find much information on the internet. Can someone help me find any resources where I can learn about this topic, whether it's a YouTube video or a book? Thanks!
Ali
Hey guys! I'm quite familiar with local development. Currently, I have a dockerized app with multiple services (Django, Celery, RabbitMQ), and I'm running it using docker-compose. My problem, and a question is: I have no idea how to host an app like this. Yeah, maybe I'm blind, but I didn't find much information on the internet. Can someone help me find any resources where I can learn about this topic, whether it's a YouTube video or a book? Thanks!
Search about gunicorn, nginx, reverse proxy to deploy the project. Also you have to create your project nginx config file. You can create new docker-compose-deploy file and you can create nginx container. my notes: gunicorn -> https://www.notion.so/djangotips/Gunicorn-0f32e19fadc84e34829fa8253452c3f2?pvs=4 nginx -> https://www.notion.so/djangotips/NGINX-25519aba55dc4e1aa291344e15940c01?pvs=4 But you should research by self using with documentation of this things
Ali
İts just for http. For https you should create certbot container
Doragonsureiyā
İts just for http. For https you should create certbot container
To share code or error tracebacks, use a pasting service, like: - https://dpaste.org - https://hastebin.com - https://nekobin.com - https://bin.kv2.dev
Ali
https://dpaste.org/qD7EL
Nir
While im trying to save an instance of model I get the error for having wrong data type in foreign key it says it must be a bigint however the primary key is charfiled of the model which is made as a foreign key
Ali
İf your data is an objects like user model. Do like that: user.id , instance.car_id
Vanshika
Hey everyone I have a problem which I am struggling from past 5 days. I want whenever that particular page is loaded in django it should automatically becomes full screen but chrome or mozilla is throwing an error. Can anyone tell me any package of how to do this. I will be really greatful. Thanks in advance. Happy coding
Charly
Failed to execute 'requestFullScreen' on 'Element': API can only be initiated by a user gesture. This is the exact error I m getting
1.- That has nothing to do with Django 2.- As the error says you can't do that. It's a security risk and you should respect the user.
Vanshika
1.- That has nothing to do with Django 2.- As the error says you can't do that. It's a security risk and you should respect the user.
Thanks for your reply but I m making an examination portal where I want user to automatically show full screen. How to do this.
Muflone
There's an immense difference between backend and frontend Django is server side only
User
any one know how to use case insensitive function python i want that for example abc should be treated equal to ABC not different
DeathLikeSilence
hello everyone. I have 3 different models Customer Seller Owner I wrote AUTH_USER_MODEL=” accounts.Clients” In setting.py Can I use JWT to authenticate them?
User
Before calling the function convert it into lower case
ok but that also is not working i used casefold() that converted whole string into lower case i want for example apple should be treated eqivalent to APPLE. IF I search apple or APPLE in my list it should not give error
Farkhod
Hello guys I am new in django. I had trying to implement a register and login using jwt. But I had some problem in register when I do register it give me unique in phone number(cause the I give unique in model) even tho its new number and it saved it to db even tho return me an error.
Binary
U need to extend the user model
Believe
Do your user model have phone numbers fielsd?
Farkhod
U need to extend the user model
What does this man sir can you provide more info. I use AbstractBaseUser for the User in models I think it should handle this right ?
Believe
Farkhod
Send it
Send what
Believe
Model
Believe
User model that you created
Believe
If you are using predefined user model than it does not contain phone number field
Farkhod
If you are using predefined user model than it does not contain phone number field
https://github.com/sFarkhod/Property-Rental-App/blob/dev/backend/propertyRentalBackend/models.py here sir
Aleksandr
Hi, I'm using Wagtail CMS, I having trouble adding data to the context. The data is not displayed on the page models from wagtail.models import Page class HomePage(Page): def get_context(self, request, *args, **kwargs): context = super().get_context(request, *args, **kwargs) context['my_data'] = 'RRRRRRRRRRR' return context html template {% extends "base.html" %} {% block content %} <div> <p>{{ my_data }}</p> <p>SOME TEXT</p> </div> {% endblock %} At page i see only "SOME TEXT"
Ali
object_list.my_data
Ali
İf you add context_object_name = data in your HomePage class, you can call in html like that: {{ data.my_data }}
Aleksandr
İf you add context_object_name = data in your HomePage class, you can call in html like that: {{ data.my_data }}
Thank you for your reply. The error was that I rendered this page separately in urls.py, because of that it didn't see the context
Ali
The url doesn't matter, if your url connect with this view it should be work
.
C:\Users\w10\Desktop\django>py -m venv env Error: Command '['C:\\Users\\w10\\Desktop\\django\\env\\Scripts\\python.exe", 'ensurepip', '--upgrade, default-pip']' returned non-zero exit status 1.
01110010
Update the python on your machine
.
I installed the latest version 3.12.0