Azat
Model's pk should be unique and should not be used for storing valuable info
Tukhtamurod
I need it like Emp001,Emp002..
it will be extra headache and utterly unnecessary work, but as long as you are talking about how to achieve it, declare id field as varchar and primary key, and every time you add new record check the last added record and give the newly added record corresponding id. but that is a total bullshit))
Loki
Anybody knows how can I use deep learning model with Django
Loki
I tried using it but having some issue
Beka
http://collabedit.com/6nd7v my code
I would suggest you to use the django signals. It's better for this case.
Beka
http://collabedit.com/6nd7v my code
How ID can be a CharField?
Beka
Think out of box.
Shanks
What if single page has two pure html forms how to prevent other from getting posted Or How to detect which form is getting posted? Because even if I'm doing request.method=='POST' But the data I'm getting is of two form getting posted one with blank values which in reality is not getting posted and other one got posted and showing the valuess in Query dict
Atul
Is there any way that we can serve html page using CSS and js without loadstatic configuration in one app of my Django project
Atul
Please help 🙏🏽
Beka
Is there any way that we can serve html page using CSS and js without loadstatic configuration in one app of my Django project
Your js and css code lives in static directory. Static directory lives inside your root project. I think this is well organized project structure. In production you also show one directory static.
Atul
Yes but I want to add some HTML pages which have their own CSS/js file which I don't want call using load static i.e., src={% static 'abc.js'%} I want to call it as src="js/abc.js"
😇ANGELO™️🎧
Beka
I never thought about it.. in production (with debug false) Django won't handle your static files.
Atul
In short I want to serve some HTML pages with out converting them in Django
Beka
Really? I never saw that
What you never saw?
😇ANGELO™️🎧
Beka
Yes you are right but my client's requirement is this one
I think you need to explain to client how django works. Why your client focusing on code itself?
Beka
Yes you are right but my client's requirement is this one
How you implement it's your responsibility.
Beka
Yes
Make it clean and nice.
Atul
I will try my best
Atul
Thank you☺
Shanks
I mean how to handle multiple forms in a single page
Harish
Maybe use iframes?
Harish
I mean how to handle multiple forms in a single page
Each form would have a different view and url You can then another view and url for your single page And link the others through iframes
Atul
I mean how to handle multiple forms in a single page
Use two different form tags containing csrf token
Atul
And in views Use two different If request.method == POST
Sandeep
I need one django 2+ year of experience resume. Any one have please forward.
Doragonsureiyā
I need one django 2+ year of experience resume. Any one have please forward.
Rule 🔟: Job offers are only allowed in the offtopic chat - @PythonOfftopic. To avoid being marked as spam, make your offer include skillset/techstack, salary/reward, contact information and a brief description of what work you want done.
Axror
Good afternoon everyone. I have a #question. How can I control registrated users. How can I recognised them???
Full stack developer (React, Django)
can we use . and - in django URLs
Prince
can we use . and - in django URLs
- is possible . i guess no
Full stack developer (React, Django)
- is possible . i guess no
Bro I have to use pass an jwt token as slug... Can we use . in slug
Michael the wolf 🐺
Jwt tokens are usually passed in headers
Kd
I am new in deployment need help I have AWS EC2 ubuntu server , domain is mapped with ip address but when i am accessing site I have to use domin:port Example www.xyz_domin.com:8000 How can I use site without port?
Michael the wolf 🐺
proxy
Cimara
Todo morning guys, i'm a beginner in django and i don't know how do i stop a foreign key from appearning on my form. Could someone help me.
Cimara
Good*
Nikolay
Hello! Could somebody help me? I want to know: is ts possible to using multiple (2) database in ONE django app? What should I do/read for it?
Tushar
Hello! Could somebody help me? I want to know: is ts possible to using multiple (2) database in ONE django app? What should I do/read for it?
What do you mean by database here are you taking about MySQL and postgres as different databases or do you want 2 databases of same type?
Tushar
You can add another database in settings.py
Tushar
Read more about it in the documentation
Tushar
Sure
~:$
Defining custom query for select_related???? Just like we can define custom query in case of prefetch_related using Prefetch object.
DD
How can I render normal submission form ( blank form to insert data ) and update form ( which we can render using instance to update record ) both together ?
Axror
Hi. How to connect visa and PayPal payment system to Django project??
Tushar
You'll get some pretty great resource for that on YouTube so check that out
Anonymous
Anyone having little expertise in Django rest framework can connect with me on Google meet?..I have a doubt..please
Doragonsureiyā
Hi. How to connect visa and PayPal payment system to Django project??
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Anonymous
how i prepare for a django interviwe please help
Doragonsureiyā
kichu
I am using funcAnimation of matplotlib to create animated graph from large dataset(10000 rows) I am using django framework. After creating animation i want to send the animation to the frontend. But it is taking too much time to save the animation. Is there any way to send the animation without saving it?
kichu
anim = animation.FuncAnimation(fig, animate, init_func=init, frames=1155, interval=20, blit=True) encoded_string = base64.b64encode(anim)
kichu
I tried to send it by encoding but iit is showing error "TypeError: a bytes-like object is required, not 'FuncAnimation'"
kichu
Can anyone help me?
~:$
No
You can answer my query.