Nikki
But if any user send the mobile number using browser console (F12)
Nikki
How to validate that the user entered mobile
Nikki
Validate mobile number before storing into db
Nikki
Nikki
thanks
Nikki
I will check
cj
try with request.FILES and be sure the form in your HTML file has enctype correctly set
S
S
It provides automatic db routes using db.connect command
inchidi
S
Most of the system point database based on domain name,, domain name connects with schema and things works automatically
S
Django uses one db at a time but php can multiple,
cj
cj
S
Read a full document bro
Rohan
Rohan
User based DB?
Rohan
Why would you do that?
S
Main case is security and low cost of server
S
Services like this runs in one instance and one db so overall server cost is less and your data will remain isolated and secure from each other.
S
Don't need to setup new instance and db for new server set up.
S
When you sell your own project to different people/company then this is a good idea to follow
shivam
S
How ??
S
shivam
Yes. In our company we have our tech stack on django
shivam
You can define multiple dbs in settings. Py alongside default
shivam
And also give the dB name while running migrations
m0nte cr1st0
I need to help with celery
m0nte cr1st0
https://stackoverflow.com/questions/58629790/how-can-to-run-task-in-5-minutes-after-finish-previous-task-using-celery-beat/
S
How can you define that this request should go to this db only and another one in let's say second db??
S
m0nte cr1st0
S
Think you should read official document of celery
m0nte cr1st0
Raad
I have my app ready and now the time to fill the database by dummy data to test the app. What are the best practices for doing that? Any advices?
Raad
I mean populate the database
Vahe
Hi guys,
Does any of you integrated drag and drop functionality in Django?
For example I have kanban board and want to have some ajax updates when something is drag and droped from one cell to another.
Any ideas?
cj
Vahe
Cesar
Hello, im working on a django project with normal templates (not api). i have som forms that should be on everypage, is there an easy way to have like a reusable package containing all forms i will be using on several pages?
Vahe
Anonymous
Pedro
Cesar
Денис
Денис
You could even combine decorators without need to subclass views from anything
Денис
but still all of your forms need a place in template.
So you possibly need custom template tags also, like {% my_brilliant_form.as_p %}
Денис
as template tags have their own logic implemented, you don't need to change views.
Manuel
good afternoon for yall
Manuel
has any one of you got any way to connect an ldap with django
Manuel
is someone there
Денис
Денис
it's dark night here in Russia, for example
None
Hello I use https://materializecss.com/modals.html. And I can't provide certain statement of context from view to html. def deny_order(request, order_pk):
order = get_object_or_404(Order, pk=order_pk)
context = {
'order':order,
'value':'123'
}
return TemplateResponse(request, 'my_html.html', context). Order displays nice but value returns - missing variable value
raven
anyone know how to serve media files with django gunicorn setup?
Maksim
Nginx
raven
cool
Erik
None
I have resolved that, thanks
Erik
Sam
I m not able to create my database
Sam
The makemigrations command runs and then when it comes to check for the class type it gives an error
Manuel
what's that error
raven
R
can anyone help me with this: “OperationalError: attempt to write a readonly database”. now the problem is obvious but I am unsure what I am doing wrong to fix it.
I have tried chmod, I have tried chown. But either I am using them incorrectly, or there is something else.
R
I am not working in root, I work in my user account. I made a group with root and ‘user’ and a chowned them to be owners of simpleSiteDB.sqlite3
R
I chmoded simpleSiteDB.sqlite3 to be 0755
R
other than that, I’m not sure what else there is to do
R
my site’s directory currently looks like this:
drwxr-xr-x 3 root root 4096 Oct 31 15:51 apps
drwxr-xr-x 2 root root 4096 Oct 31 15:51 login_registration
-rwxr-xr-x 1 root root 816 Oct 5 15:11 manage.py
-rw-r--r-- 1 root root 5336 Oct 5 15:11 readme.md
-rw-r--r-- 1 root root 46 Oct 5 15:11 requirements.txt
-rwxr-xr-x 1 root django 135168 Oct 5 15:11 simpleSiteDB.sqlite3