Rose
User Tokyoo has 1/3 warnings; be careful! Reason: request for ready-made project
Rose
User Tekleab has 1/3 warnings; be careful! Reason: this is neither a job board nor a bulletin board
Angel
Hi, when using i18n I understand that you have to go through each word in the .po file of each language and write it in the corresponding language, I find it quite laborious, you have to go from file to file looking for the word, it doesn't seem practical to me, I wanted know your experiences
It’s
How to learn Django Channel?
LB (Ben)
Hi. I'm using a Django Formset and would like to get some ideas or suggestions on how to add data attributes the Management Form. https://docs.djangoproject.com/en/5.0/topics/forms/formsets/#understanding-the-managementform E.g. {{ my_formset.management_form }} I'd like this to output the fields (total forms, min forms etc) but with specific data attributes on each field. I could loop through the fields in the Django template but wondering if there's a nicer way.
Rose
User AbiduSage has 1/3 warnings; be careful! Reason: useless messages
Anonymous
How to learn Django Channel?
https://channels.readthedocs.io/en/latest/introduction.html
Rose
User Emmanuel has 1/3 warnings; be careful! Reason: do not send PMs without the recipient's consent; ask the person in the group first (rule #9)
𝔽ɛx-ꜱɪɴ
How much django should I know start as a inter
Aamer
How much django should I know start as a inter
Just very basic stuff (like what’s Django, what’s MVT, basic understanding of how a website works, html) should be enough to get on internship As internship itself involves further learning
Aamer
Hi. I'm using a Django Formset and would like to get some ideas or suggestions on how to add data attributes the Management Form. https://docs.djangoproject.com/en/5.0/topics/forms/formsets/#understanding-the-managementform E.g. {{ my_formset.management_form }} I'd like this to output the fields (total forms, min forms etc) but with specific data attributes on each field. I could loop through the fields in the Django template but wondering if there's a nicer way.
Yup You can modify the form widgets by adding widgets in a Meta class in your form class This widgets should be a dictionary containing keys as form field name and value as corresponding widget, you can further read about it in doc And if you are using crispy forms, then you can use crispy forms helpers And also, if you are looping over fields in html, you can also using django-widget-tweaks which allows you to add attributes through template filters, without writing whole html input
𝔽ɛx-ꜱɪɴ
I created the form i.e form.py The template file i.e html The urls.py The views.py The webpage for the calculation displayed but without the form
Did u render the form in context dictionary inside views.py and include the form inside form tag properly in html?
Aamer
Thankyou so much One more question 😁 How many months should I work as an intern
6 months is more than enough And if it’s a very reputed/big company like MNCs where you see your job in future then you can do 1 year
𝔽ɛx-ꜱɪɴ
Depends on country’s pattern too
Ok got it thankyou so much
Aamer
Aamer
Hi everyone How can i send gmails in django? There is nothing such as "Less secure app" in gmail settings.
There is less secure app option in gmail settings, if you are sending emails from your gmail, that must require authentication, and authentication needs “allow less secure apps” turned on to pass gmail security You can also look for third party email gateways like sendgrid, mailgun, mail chimp etc They provide some free emails per day/month too
Aamer
if request.method == "POST": form= KpiForm(request.POST) if form.is_valid(): apn=request.POST.get('apn') if apn == 'Y': apns_list= Index.objects.values_list('index',flat = True) for apn_ in apns_list: Obj = form.save(commit=False) Obj.apn = apn_ Obj.save() else: model = form.save(commit=False) model.apn = 'Default' model.save() Hi all, I am receiving data from one form, and I want to save muliple records by just altering one filed, rest data of form will remain same. The for loop in the if condition is iterating through all the values in apns_list but saving only one object, probably the last one. Can anyone suggest how can I save multiple objects?
In the forloop, when you are assigned Obj to form.save(commit=False) and saving it, for all the iterations the form class is same hence it’s saving same form again and again resulting in only one object created 1- Rather, you can create the form instance inside the forloop so on each iteration, a new form instance will be created and a new object too 2- One more way would be calling Model.objects.create(data-here) inside forloop if you have many modifications in form then the first approach is better
Aamer
Hi all, I have created one django form, in which type of "mobile_no" is charfield. However in the database this field is a foreign key to other table. Now on submitting the form getting an error that "mobile_no" should be an instance type. Is that possible that I get a submission as a text from the template and in the backend find the instance of that mobile_no and store it as an instance only?
Yeah The current error shows that your are assigning mobile_no (string) directly in place of foreign key, which was supposed to be an instance rather than a string You can do as follows submitted_mobile_no = request.POST.get(“mobile_no”) related_object.foreign_key_field_name = MobileNumberModel.objects.get(mobile_no=submitted_mobile_no) For further improvements, you can add some exception handling when record doesn’t exist with mobile number
The_Invisible_Drax
No, no, I want "fully" customization all of html and css, js of page
Do pip install jazzmin then add jazzmin in your installed app in settings. Py
Ædel
while debugging drf in vscode, my viewset breakpoints are ignored. where should i put the breakpoints so they can be fired?
Rose
User IT MANAGER has 1/3 warnings; be careful! Reason: speak English
Rose
User Bekzod has 1/3 warnings; be careful! Reason: useless messages
ali
Do pip install jazzmin then add jazzmin in your installed app in settings. Py
Thank u, but again, that package just changed the admin panel automatically, not customizable.
Rose
User Osiris has 1/3 warnings; be careful! Reason: don't request DMs (rule #9)
Abolfazl
guys, how i can work with sms verifiction in Django?
@user.py
guys, how i can work with sms verifiction in Django?
https://dev.to/tkirwa/otp-generation-redis-storage-sms-sending-and-verification-with-african-talking-api-in-django-and-drf-43dp Check out this post
Ahmed kamal
Hello friends, I have this problem. When I print what the form contains after making a submit its print none . Note that I made sure that each fields had a name andi deleted any form that may cause conflicts.
Luckypatcher
Hi all,anyone with daraja documentation kindly assist
ford
Hi all,anyone with daraja documentation kindly assist
you can just visit safaricom developer website for that.
Luckypatcher
you can just visit safaricom developer website for that.
They are only providing apis,am requesting if anyone has views,urls etc
ford
They are only providing apis,am requesting if anyone has views,urls etc
check this GitHub repo https://github.com/Ekirapapaul/django-mpesa
Aamer
Hello friends, I have this problem. When I print what the form contains after making a submit its print none . Note that I made sure that each fields had a name andi deleted any form that may cause conflicts.
A short code snippet would help to understand the code First you can make sure if request.POST or request.data (depending on form body type) is having some data
Ivan
I wanna create my first project in djanho can someone help me and send me what I should do
Pulkit
I wanna create my first project in djanho can someone help me and send me what I should do
you can start here https://docs.djangoproject.com/en/4.2/contents/
Rose
User Flier has 2/3 warnings; be careful! Reason: this is neither a job board nor a bulletin board
Solomon
Please how do I solve the error: "image attribute has no file attached to it" I have done the configuration in my settings file, and m using something like {{item.image.url}} in the IMG src to reference it. What m I doing wrong?
Odomus
are you sure item has image attribute
Solomon
are you sure item has image attribute
Yes, I tried to open each image I had uploaded through the admin site, the URL looks like this: localhost:/8000/media/item_images/watch.jpg This is the URL while trying to make sure I had uploaded correctly.
Nasrullah
I have a problem with my django server Whenever i decide to edit static files i need to change my host in case to see the effects why is this like this?
AKSHARA REDDY
Guys I have a html page that plays the audio and shows the transcript All the audios and transcripts should be taken from the PC how should I create the django framework
AKSHARA REDDY
Guys I have created a server in 8000 port I don't know why I closed my program But the server is still running with last prog What should I do?
Mirco
Can you please explain a bit clear?
https://docs.djangoproject.com/en/5.0/howto/static-files/deployment/#:~:text=The%20basic%20outline%20of%20putting,static%20file%20server%20and%20served.
Anonymous
Can you please explain a bit clear?
What's the shell script or ci/cd for deploying your project?
Rose
User Ibm has 1/3 warnings; be careful! Reason: nonsense reply
Rishav
I've created a auto logout feature but, logout is done once return home after update for eg. But I want it to happen just at after the time set. Please help.
Arman
How to implement service in Django which has to take user's uploaded file then check it in order to detect does it contain malware and if does not then to save in db, otherwise reject?
Vikash
Hey guys I want to create a custom same as like export action when I click export open file format form(choice) I want same create action with list of selection I know how to implement this but problem is I'm unable to add list of select button when I click custom action
.
Development
Static files are usually cached in the browser. On windows, try pressing Ctrl + F5 every time you wanna reload the static files. Alternatively, if you wanna do a quick always-refresh, just add a random query value at the end like ?={% now “U”%} or something like that
Abolfazl
Guys, How i can post some radio button in a form to views.py ?
Mohammad ali
Dear my friends I am active in the field of web development (Django and React), I would like to be happy if we could shoot the breeze and form a team.
Danny
hello good morning, i want make a question? i have a app web, this app is make with django, this
Danny
this is funcionaThe application works but when I try the login it gives me the following error [12/Feb/2024 12:17:05] "GET / HTTP/1.1" 200 16185 [12/Feb/2024 12:17:08] "GET /login/ HTTP/1.1" 200 13893 [12/Feb/2024 12:17:26] "POST /login/ HTTP/1.1" 200 13563
Rose
User James has 1/3 warnings; be careful! Reason: offtopic cross-posting
Danny
and the temple looks like this
Danny
I can't upload the photo, only the data labels are shown and not the data
King David
Django forms required= false meaning
꧁ 👑༼ᴘ͞ʀ͞ɪ͞ɴ͞ᴄ͞ᴇ͞s͞s͞༽👑 ꧂
Django forms required= false meaning
Form could be submit without fill this field
Никита
Hello everyone, please tell me how to fix the error, gunicorn on the server gives an error https://docs.google.com/document/d/1EWBWwAciUGmUaKyQkhC7GSkRCcelH9FQLSYKuor_19k/edit?usp=sharing Maybe someone has come across this
ㅤ
Hello, I have a question. I use django-seeding and it make all seeds together it has parameter priority, but it don't work, that's why in staff seeder can't find role, but role has priority 1 and staff 5