SuperN00b
Atom is only a text editor , not IDE
Shahrukh
Ok
SuperN00b
And also which IDE you use depend on what you're familiar with
Shahrukh
SuperN00b
Anyway for django , using jetbrain pycharm professional
SuperN00b
Best for django I think
Shahrukh
For database connection can I use MySQL. Is it preferred in real time.
toygar
A lot of different database systems are used with django in Real life. MySQL is one of them. This is just like the text editor question. There is no definitive answer. You should choose the tool you know and want.
Кодиров
https://dpaste.org/4kJo
Кодиров
what i've done is i try to get face encoding from base64 string images. this is my code: https://dpaste.org/n2AP how to get face encoding with base64 string image ? it doesn't work for me
Kushal
How to change multiple languages navbar using javascript and django?
Mirco
Vinay
How to manage deployment of django migration file in version control if multiple people are working on same project? If you need more clarification, I will elaborate, thanks in advance.
Sergey
hi guys! i mock my view, but it doesn't work) what i need to do? It return 404, but I wanted to get 200 https://pastebin.com/rar3P9PW
Y
Hi ,how are you? Someone's can explain me, how make to connect two apps into django project?
Y
So I should make a rubric that concerns the subscribe parties on my web site. In the fact I created news app where I have different models and configuration
Y
What need to connect?
I desire to connect my new app configuration with first app templates part which concerns subscribe
Y
I use sendGrid API'S
Y
To send emails
Azamat
I desire to connect my new app configuration with first app templates part which concerns subscribe
You can import models from other apps alike from app.models import Model
Azamat
Also you can import service logic
Charly
No I can't import I need explanation to do it
yes you can, just import it as @AzamatKomaev said
Y
So in my main app You must go in models.py and import other apps models
Y
It's ok??
Shoxrux
how to solve this problem
Doragonsureiyā
how to solve this problem
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Shoxrux
https://pastebin.com/Vss0TAe0
Charly
So in my main app You must go in models.py and import other apps models
Why do you want to import the other models in the models /
Felipe
Hi guys, I have a question for you, I'm making an e-commerce site using Django and when you're on the shopping cart page there should be a button that sends an automatic message to whatsapp, to the owner of the page with the orders selected and the sum of the products contained therein. Is there any library I can use for this?
Shoxrux
https://pastebin.com/Vss0TAe0
- 'creation_date': datetime.datetime(2021, 12, 23, 18, 15, 31, 870269, tzinfo=<UTC>), E + 'creation_date': '2021-12-23T18:15:31.870269Z', I am getting 2 different formats how to solve this
Doragonsureiyā
Can I explain you in your inbox?
Can i send you a private message? No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
Y
I understand, sorry I think that I must summarize my question and explain this correctly
Haris
modelName with ID "imagepath.jpg" doesn't exist. Perhaps it was deleted?
Haris
modelName with ID "imagepath.jpg" doesn't exist. Perhaps it was deleted?
When I try to View Image from Django admin or upload it, I'm getting this error can anyone help me solving this issues
Haris
We can't help not enough context nor code, not eny helpful detail
I have searched at many platforms still not getting any solution
Charly
Sorry?
Can you read?
Haris
Ok Got it
Anonymous
Thanks bro for replying But I want to try download bootstrap css and add manually
Put all bootstrap files in static folder then in template link them using static tag href=“{% static ‘bootstrap/css/bootstrap-css-file’%}
Anonymous
Hello everyone, hope you are doing well. I need help im Django. I need to send messages for free without using API or email server.. What I had tried: 1. I use multiple API such as Twillio etc. But it is quite an expensive solution. 2. I use an SMTP server to send messages Via Email.. But in our area no SMS service provider is available.. If you have any free or cheap solution to above problem, so please state it there while mentioning me. I will do consider it. Thanks
Anonymous
How to install gdal library in macos ??
♔Sergey
Comrades, Experts. Help solve the problem. It is necessary that when registering, the user selects one of the suggested groups (created earlier in the admin panel) Tried to expand the form: class RegisterUserForm(UserCreationForm): groups = forms.ModelMultipleChoiceField(queryset=Group.objects.all().order_by('pk'), widget=forms.Select(attrs={'class': "form-select", 'id': "floatingSelect", 'placeholder': 'Вы инвестор или брокер?'})) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields['groups'].empty_label = 'Сделайте выбор' class Meta: model = User fields = ('username', 'email', 'password1', 'password2', 'groups') Now an error occurs: ⚠️ Enter a list of values
Y
Hello someone's. I have the newsletter subscribe part on my site ,so I want to do any user can subscribe with email. But I don't know how must do it. Somebody can you help me please
Y
I have sendGrid API 's documentation for email sending
Python Guy
class PostSerializer(serializers.ModelSerializer): #userdetail = CustomUserSerializer(many=True, read_only = True) #user = serializers.Field(source='user.username') class Meta: model = Post fields = ('id', 'content', 'author', ) this is my serializer but I I want to show authorname in fronted not authorid. WHat should I change?
Python Guy
after adding this in serializer author = serializers.SerializerMethodField() def get_author(self, obj): return obj.author.username i am getting: NOT NULL constraint failed: posts_post.author_id In stackoverflow questions, problems were in forms, and here problem is in serializer,
Erik
How to make this code better?? for site in Site.objects.all(): print(site.user.email)
Badu
Can any one tell another function parellel to __range
Badu
if 'date_filter' in request.GET: try: date_range = request.GET.get('date_filter').split("-") start_date = datetime.datetime.strptime( date_range[0], "%d %b, %Y") end_date = datetime.datetime.strptime( date_range[1], "%d %b, %Y") logger.info(start_date) logger.info(end_date) qs = qs.filter(entry_date_v1__range=[start_date.date(), end_date.date()])
Badu
This is not wrking
Jaya
How to make this code better?? for site in Site.objects.all(): print(site.user.email)
you can write list(map(lambda x : User.objects.get(id=x[0]).email ,Site.objects.all().values_list('user'))) i am considering site model contain list of user id
Scary
Admin not adding to db can you tell why is that here is the link to the screenshot error https://ibb.co/XWdyZGj
Anonymous
The error says you don't have such table, which means you have to add it to you model
Scary
i have the model https://ibb.co/mR29GJj
Scary
i think problem is redirecting in installed apps how can i redirect to the to products app here is the file structure https://ibb.co/hFcgHqR
Scary
i have tried adding src/trydjango/products in installed apps am getting this error -> ModuleNotFoundError: No module named 'src/trydjango/products'
Daniel
Hi, Im creating a webpage to run in my local network, Im working on it so Im hosting in at '127.0.0.1:8006', what Im triying to do is embed the same ip but other port ('127.0.0.1:8080' wich is qbittorrent web app), but when I use 'localhost:8080' I get redirected and when I use '127.0.0.1:8080' I get an error, (127.0.0.1 refused to connect). Im using iframe in html btw. anyone knows how to embed it without getting redirected?
YUSUF CR
Hello everyone! I want to see your amazing web sites which create by Django. Can you send me link of your web site's link on my direct. I want to see the real power of Django. Thank you very much everyone!!!
YUSUF CR
I know that pinterest you tube and another sites which created by Django. But they created by professionals. I think here most of you are learners. I want to see their project. Because I've already seen professional's projects.
Azizbek Xushnazarov
#swearing
George
LB (Ben)
Hello everyone! I want to see your amazing web sites which create by Django. Can you send me link of your web site's link on my direct. I want to see the real power of Django. Thank you very much everyone!!!
https://github.com/wsvincent/awesome-django#open-source-projects https://builtwithdjango.com/projects/ https://madewithwagtail.org/ - Wagtail (CMS) is built in Django
Р
Hi. Need to create API-request. Please, link some docs about this
SuperN00b
Where's the score u mentioned ?
SuperN00b
If each item has scrore , I suggest you to use dict
SuperN00b
At least show your completed data structure or table . Btw condition append is something about created method override
Adie
What is the difference between @app.task(bind=True) and shared_tasks in celery?