Husan
what does this have to do with Django? what do you mean by dynamic database tables?
Ok, i should do integration for 4 organizations. I think in the future if organizations is 5+ We are writing models to every organisation. What do i do? We get .json data and should write every data name to my database.
Danish
I want to implement a background task processing..but each task required high computation (like need more memory, and time) so how can i efficiently implement it using celery and django?
~𝙰𝚋𝚍𝚞𝚛𝚊𝚡𝚖𝚘𝚗
I want to implement a background task processing..but each task required high computation (like need more memory, and time) so how can i efficiently implement it using celery and django?
My recommendation is write optimize code, buy more memory in server, set a little big diapason of time to each task but this depends on task.
Danish
Yep, that's the main thing ofc
Shan
How to used select_related include filter?
Sergio
Hi, everyone Could you tell me about how to create dynamic database tables. Our project come .json data and we get it and read every fields and create key and value. Can you give me docs or example code for understanding
1. You can use JSON field to operate with JSON structures. Latest Django release have a lot of stuff included to make ops with JSON fields easier 2. If you need dynamic tables and able to modify table at runtime without migration lifecycle, take a look into baserow project it has all you need inside.
Noname
Hello! Can anybody give me advice? How can I add logging before and after server starting? I want to add info to log file "Server started..." <Default Django server starting> "Server works!" Thank you!
Sergio
Hello! Can anybody give me advice? How can I add logging before and after server starting? I want to add info to log file "Server started..." <Default Django server starting> "Server works!" Thank you!
1. You can use Django Apps “ready” hook to output starting message 2. There is no canonical way for tear downing routine in Django. But you can use python’s signal hook and catch all termination signals and output message before process finishes
Shan
what do you want exactly?
I have two tables would like to join two tables data. How to do ?
Mirco
I have two tables would like to join two tables data. How to do ?
share your models and the query you'd like to run / write
Abolfazl
I want to do something in the Models.py file that takes a number as the number of questions in an IntegerField and displays the same amount of TextField below it, and each of them has a question section and 4 answer options.
Patrick
you can use jsonfield and save data in list
Difficult to query if you wanna query by question for that use can try many to many where questions will be saved in another table and use those stored questions and quite simple to query than json
Ima
Hi everybody, i'm just new in this django world. I need to build a tipical scenario with orders, delivery notes,.. in navigation bar(sometinh ver simple, not an ERP) I prefer not to use the django admin frame. How could I start it? Is there something about that previously built I could base on and start over it? Thanks in advance
Rose
User .​ has 1/3 warnings; be careful! Reason: totally offtopic
Никита
Hello everyone who has worked with htmx, please tell me how to send the form to the server? Preferably via htmx:configrequest
Domestos
Hello guys! I’m working on pet-store right now, using Rest Framework. Is there any solution to store cart and featured products information considering we don’t want to implement classical authentication, our goal is to work with anonymous users. I just find it hard to implement such logic, as Django based on user concept. I would be really grateful if you will help me with some advices or with ready-to-use solutions
Sergio
Hello guys! I’m working on pet-store right now, using Rest Framework. Is there any solution to store cart and featured products information considering we don’t want to implement classical authentication, our goal is to work with anonymous users. I just find it hard to implement such logic, as Django based on user concept. I would be really grateful if you will help me with some advices or with ready-to-use solutions
First of all try saleor maybe it will fits your needs as it was built on top of Django and has a lot of stuff to learn inside. Or just take inspiration from. Second if you want to work with anonymous users introduce checkout db entity with random hash 32+ chars length that is hard to guess. After that associate cart db entity with checkout and cart item with cart. Keep everything in db don’t worry if some cart and checkout will become trash you can create cleanup management command later. Use checkout id in frontend (cookies, local storage, state) whatever to keep same cart between browser requests. I believe that all what you need on a high conceptual level
.
Yeah i used the JSON field but how to show django admin page
Use dynamic custom fields like get_fields or get_fieldsets
A
Guys, What is Django Rest framework?
A
Is this a framework or an extension of Django?
cj
Is this a framework or an extension of Django?
do you read it is named Django Rest Extension?
DeathLikeSilence
Guys, What is Django Rest framework?
Django Rest Framework (DRF) is for website APIs Django is two different things, one of them is Django is based on a template model and view. On the other side, we have DRF. For instance, when you work in teamwork (to create a website and you are a back-end developer) you should know DRF In DRF you use serializers and you test your DRF project with Postman or Insomnia. For Django based templates you have to have some knowledge of html, CSS, or something like that. I highly recommend read docs
Ahmed kamal
I use built in authentication and use the post form, but I always have git. What is the reason?
Devendra
SMTPAuthenticationError at /pass_reset/ (534, b'5.7.9 Application-specific password required. For more information, go to\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor g1-20020a170902fe0100b001d7393f6917sm758107plj.86 - gsmtp') Request Method: POST Request URL: http://127.0.0.1:8000/pass_reset/ Django Version: 4.2.9 Exception Type: SMTPAuthenticationError Exception Value: (534, b'5.7.9 Application-specific password required. For more information, go to\n5.7.9 https://support.google.com/mail/?p=InvalidSecondFactor g1-20020a170902fe0100b001d7393f6917sm758107plj.86 - gsmtp')
Devendra
i got this error when try to reset password using email
Maxim
but still giving same error
It has nothing to do with Django anyway delete here and ask @pythonofftopic
Harshit
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?
ㅤ
guys, anyone suggest me why everyone using django channels verion 3- instead of latest version, thanks in advance
Saitama
How long it takes to master Django
Rose
User Sanidhya has 1/3 warnings; be careful! Reason: necroposting
Anonymous
How long it takes to master Django
Depends on how much u practicing per day
Behnam
hi guys i want to limit my user to choice only on of <choisecs> filds in my model how can i limit it?
Behnam
class Reaction(models.Model): status_choices = [ ('1', 'like'), ('2', 'dislike') ] owner = models.ForeignKey(User, on_delete=models.CASCADE) post = models.FileField(Post, on_delete=models.CASCADE) status = models.CharField( choices=status_choices, validators=[MaxValueValidator(1)] )
ali
Is there any package to i18n my models automatically?
ali
How long it takes to master Django
Master??? NeverEver but u can have a senior django developer in 3 to 5 years
Flavio
And if the reaction are and will always be only like and dislike, you can also use a booleanField
AZ
Hello everyone i hope you’re doing good, i have problem with integrate aramex api can someone help me with that they give me the account and everything but I couldn’t send any requests to aramex i want someone who nows about aramex apis to tell me what i should do. Thank you
Rose
User Vyoma 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)
Subavani
Anyone have django book pdf
Subavani
which one?
Web development
ali
Any one can suggest the best django book for advanced topics?
Subavani
Home automation system using django and iot anyone had idea about this project
Maxim
Home automation system using django and iot anyone had idea about this project
this is not a group for discussing abstract ideas, but for solving specific issues
Harshit
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?
Felix
Please, I need help on django-calculation
Felix
I followed the documentation but it still don't show the input tag
Rose
Please, I need help on django-calculation
No one can help you until you explain your difficulties.
AZ
Do you guys recommend to update to Django 5.0 or not?
Felix
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
M. Hossein
Do you guys recommend to update to Django 5.0 or not?
V5 has not differed a lot Though consider updating to 5.0.2 because of django 4 and 5 denial of service bug
ali
Two Scoops of Django
What topics it covered?
cj
What topics it covered?
almost everything
Tejas
can anyone tell me why i get this error TemplateSyntaxError at /taskapp/taskapp-board/ Could not parse the remainder: '(status='new')' from 'tasks.filter(status='new')' https://nekobin.com/vuweruhoru
Tejas
https://dpaste.org/dmtjo

Hi everyone How can i send gmails in django? There is nothing such as "Less secure app" in gmail settings.
Devendra
How long it takes to master Django
dont try to master just create heavy projects
Devendra
hey can any one have idea how to create auth system in django like instagram (login with : username,phone number or email ) any idea plz and thanks in advance
Brook
hey can any one have idea how to create auth system in django like instagram (login with : username,phone number or email ) any idea plz and thanks in advance
You can use builtin Auth systems by configuring you Django settings. Specify your preferred Auth system like JWT authentication and others and django will take care of the session management and other things. You don't have to build ur own Auth system