Adeliya
I know that via Django orm it is possible to update and insert data. But how to fill data from file.
Tanner
No, it doesn't take long, just a few milliseconds
Then just call it as part of the logic in your view!
S
anybody can help me how to connect mysql in django
Charly
anybody can help me how to connect mysql in django
So you skipped the offical django tutorial? https://docs.djangoproject.com/en/4.0/intro/tutorial02/
𝚅𝚊𝚖𝚙𝚒𝚛𝚎
Alex
Hello everyone! I have some kind of a problem, i don't know how to make several types of a users, in my case i need only two types. I mean I don't know how it should look in models. And another issue is that I have signal.py file where i made a function which triggers every time when user is created and then we create for him specific model like a "Client", so is it possible to make this like a dynamic value, which depends on user choice before registration. Would be so grateful if someone could explain or help me.
Neo
user_type = models.IntegerField(default=0) or even something like is_vendor = models.BooleanField(default=False)
Frozen
I have a field name Manufacturer which was previously in CharField now I changed the field into Foreign Key and migrated it... Got django.db.utils.Data Error. Invalid input syntax for type bigint... How to resolve this issue
Roshan
you should run makemigrations command first and then run migrate. I am not sure but you could try.
If it would not work, then try by deleting all the previous migrations from applications files. And then make new migration. I think it would be worked correctly.
Roman
I can do a parsing , and can manipulate data in xml file, but how to fill the table automatically.
Read file, parse data, insert data to table. May be with bulk insert
Rk
How to delete previous migrations
Itachi 🦅
How to delete previous migrations
Coment all models and admin and apply migration
Doragonsureiyā
Erick
GG
can I access to especific perm from group perms? i mean check by has_perms when the permission was assigned by group
Adeliya
Before I created model by parsing one xml file where the fields are described
Adeliya
Then I have second xml file where the values of previous table fields are there , so I need to fill it to already ready but empty model
Adeliya
But in a second file there isn’t values for all fields, so some fields that doesn’t have a values must be null.
Alen
Is extending a user simple,better than abstract user?
Mirco
Is extending a user simple,better than abstract user?
You must use abstract user or abstract base user as base classes
Roshan
If i delete previous migrations does it effect database data???
Yes, previous saved records will be erased.
Rex
I need someone to guide me with a system I'm building in Django
Rex
I'm new to python
Doragonsureiyā
I need someone to guide me with a system I'm building in Django
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Anonymous
What we store usually serialized data or deserialized data in database
Erkaboy
Hi guys. I am writing delivery app. So I have got one question. should backend keep track of live location of deliverer to show user?
Veeresh_Ramachari
you have to modify a lot admin template then
Can u share me any blog doc related to that
Mahesh
Hi
Mahesh
I want to-do-app in python django plzz help
Anas
Hello everyone I have a deep learning model ( yolov5 for object detection ) deployed in django rest api , My question is : what is the suitable services on AWS to deploy this project ?
Abhi
I want to-do-app in python django plzz help
Search Traversy Media on YouTube they have so many Django project videos on their channel that you can try building yourself and I think they also have a To-do app in Django video.
Smilez
This really is something
Fred
Hey there! I have a question about swagger docs. drf-spectacular vs drf-yasg Is there any reason to migrate from yasg to spectacular? Which one is better today?
Mirco
Hey there! I have a question about swagger docs. drf-spectacular vs drf-yasg Is there any reason to migrate from yasg to spectacular? Which one is better today?
Yes, drf spectacular supports Open API 3.x drf-yasg doesn't and there's no plan to do it in the next future
GG
hi guys, how I can reach the current session user from forms.py to filter a modelChoiceField with Object.objects.filter(user=user.id)?
Tajammul
Hey guys, I have three models in my project all have one same field and I want to display the data of that 3 models in one table is it possible. If possible please let me know how
Navroz
✋ 🖐️🖐️ Can somebody tell what "through" (in ManyToMany relationship) does in model? What is difference with "through" or without it.
professor
we installed django gurdian.Then we applied that in model based permission but result is even if i give permission other than super admin it isn't working properly.it shows 403 while we give update as well as didn't get delete option for respected permission granted people
professor
any solution?
Mihir
Someone help me with my django issues?? I am having an issues with my built in django forms.py(django.contrib.auth--forms.py)
Luis
✋ 🖐️🖐️ Can somebody tell what "through" (in ManyToMany relationship) does in model? What is difference with "through" or without it.
Django creates a table to store relationships between the both tables involved in the ManyToMany field. You can create a custom table for that and you must use the through attribute to specify it to Django. Sometimes you want to store additional information to the the relationship between the tables (ex: the date, etc).
Luis
Hey guys, I have three models in my project all have one same field and I want to display the data of that 3 models in one table is it possible. If possible please let me know how
Sorry, didn't get your idea. If your are planning to use those fields to join the three tables, you can define them as ForeignkeyField and point them to the main table. If you are not familiar with the foreign key concept, please read about relational databases and foreign keys.
Mihir
Can someone send me forms.py form django.contrib.auth--forms.py Email:-mihir.patel535@gmail.com
Luis
Can someone send me forms.py form django.contrib.auth--forms.py Email:-mihir.patel535@gmail.com
You can use pip to download the package you need to get the file from there: pip download -d <target dir> <package> Make sure you are downloading the same package version you are trying to fix
Luis
Can someone send me forms.py form django.contrib.auth--forms.py Email:-mihir.patel535@gmail.com
You also can check django source code on github (it's opensource): https://github.com/django/django/blob/main/django/contrib/auth/forms.py
Mihir
I tried to update it after updating it, it showing me same problem, in that file i am getting 162 errors in terminal in vscode due to these errors i am unable to authenticate normal users
Luis
If not, you might try to reinstall django package in your env. A safer way is to create a different virtual environment and install requirements there. If that work, then you are done
Veeresh_Ramachari
you have to modify a lot admin template then
Backend logic is enough for me like getting queryset from url
Mihir
I did i just copied code from github for forms.py but it is still showing me same errors , like something is not imported in file , can you plz check your forms.py file in django.contrib.auth--forms.py, let me know if you also getting errors in terminal for that perticular file
Luis
I did i just copied code from github for forms.py but it is still showing me same errors , like something is not imported in file , can you plz check your forms.py file in django.contrib.auth--forms.py, let me know if you also getting errors in terminal for that perticular file
My VSCode does not show any error in that file. I think that creating a new virtual environment and install dependencies is the quickest solution. This is a good tutorial about python virtual envs by realpython guys: https://realpython.com/python-virtual-environments-a-primer/
Mihir
Ok let me try to reinstall vscode
Luis
Ok let me try to reinstall vscode
I don't think vscode is the issue here
Mihir
Ok let me try to create venv
Mohammad
Hello friends Good time I have to do the following for a project Just because it's my first time, I don't know what to do, right!!! If possible, I wanted someone who entered to give me some help and introduce me to the right tools and steps second phase 1- Simple test case must be written including at least 2 sellers, 10 credit increases and 1000 charge sales (in the form of series) and finally valid sellers with the right amount measured. 2. Parallel test 3. The real parallel test (which should be coded if the thread safety and race condition are not handled correctly). Face) 4. Create safety tread and retest 5. Measuring the response time related to the charge sales API and it in the following 2 modes: 1. With low traffic (1 request on the site) 2. With high traffic (20 requests per second and above)
Nana
Hello Please I need tutorials on signing up and logging in of users with Django
Nana
Any link ?
Daniel TheProgrammer
Hey Any one ever done one tap sign in with Google in Django?
Abhi
Hello Please I need tutorials on signing up and logging in of users with Django
Go to Corey Schafer Django tutorial on YouTube there you will find it..
Abhi
You can refer to user logging system video in the tutorial
Abhi
No problem!
Artur
what is the best and the simplest open source free live chat for django?
professor
Sorry, never used django-guardian 😅
instead of that what do you guys use for the model based permission?
Veeresh_Ramachari
Veeresh_Ramachari
Any blog or documents or GitHub links anything fine i will take look