cj
ROG 💻
ROG 💻
ROG 💻
cj
cj
Anton
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.
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;
Jan
clouded
Abolfazl
clouded
Abolfazl
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.
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
Mirco
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
N.A.developer
clouded
N.A.developer
clouded
Ok
And read the results! I forgot to add.
N.A.developer
I hope web developer
N.A.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!
Doragonsureiyā
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
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
Daniil
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
Vanshika
Charly
Vanshika
Charly
Muflone
There's an immense difference between backend and frontend
Django is server side only
Raj
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
Believe
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 ?
Farkhod
Believe
Farkhod
Believe
Model
Believe
User model that you created
Believe
If you are using predefined user model than it does not contain phone number field
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 }}
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