Dhanush
I used opencv But the camera is opening from server system, how can we change the camera to the current user system
Anonymous
How can I get a database-record for views.py? My incorrect code-part: https://pastebin.com/Ej1fkfsF
Look for 'get_context_data' I would give you the url of the site but the bot would penalize me unfairly
Gkm
I am looking for how to create an account for a visitor who wishes to visit my application it will have its own interface unlike the administration
Mohammad
What is the difference between default = None and null = True? The answer is the same in both options
Mohammad
Gkm
I am looking for how to create an account for a visitor who wishes to visit my application it will have its own interface unlike the administration
am on a few things need to be modified or changed because the system needs to check if this visit exists in the DB if so it can navigate
Кашин
Comrades! Help a newbie. I am building a site in django and I want to handle static content with Nginx. But all my statics return 404, the Nginx logs are empty, I attach the code https://github.com/nikitakashin/commondev. Immensely grateful for your help, good coding everyone!
Anonymous
I want to use bulk method to update m2m field, but not works, because .add and .set method create a database connection. These methods take a long time to execute, and the objective of the bulk is precisely to make the insertion be in bulk, and not one at a time Code sample: athletes = Athlete.objects.all() games = Game.objects.all() # objects to update in bulk games_objs_with_m2m = [] for game in games: athlete_related = athletes.get(id=game.athlete_id_ref) game.athlete.add(athlete_related) # here is the problem, .add or set. create a db connection games_objs_with_m2m.append(game) Game.objects.bulk_update(games_objs_with_m2m, ["athlete"]) Complete code, a script to populate data from csv file: https://pastebin.com/L1pMzBU4
Anonymous
Hi, I need one help, it looks like my base.htm is creating one error on console, but I don't have any JavaScript in my base.html. however I can see that error on all pages, so I assume something wrong in base.html Can someone help me to fix this error Website: https://online-se-tools.herokuapp.com/
Viсtor
Hello everyone, wanna ask something about shell, i have ForeignKey in models, named gender, and when i call it in shell, i retrieve this: <Gender: Female> , maybe someone know how can i get "Female" text from there?
Feli
Hello guys I want to extend user model and use the Django authentication... How can I do it.
Mirco
Hello guys I want to extend user model and use the Django authentication... How can I do it.
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
Anonymous
www.github.com/olsihoxha/django-problem I have this but I can't post this way with that origin = CountrySerializer , i can just read with it
Anonymous
Any idea how to fix it please, it is giving me pain
Chetan
Any idea how to fix it please, it is giving me pain
To save this you have to explicitly call the model for CountaryName1 With all the fields and then save it Or you have to update the post method in listcreateapiview
Nareth
Hi friends. How I can get list from relationship by user_id and display current_user and get objects. as user created
Nishant
Somebody have academind's django course?
Chikya
hii All..I Am New To django..i Have An One Assignment. .....To Create Api Using Drf Djangi Rest Framework...plz Help Me...
Sopan
Hi guys, any tool for auto deploy Django webapp to AWS?
Is it already deployed? If you are starting a new deployment - then Heroku can be best for Django Specific.
Deleted
Is it already deployed? If you are starting a new deployment - then Heroku can be best for Django Specific.
They also have load balancer and monitoring tool, so I could not use heroku
Charly
Where is it?
in django website
Rakesh
Static images is not displaying in django 3.1
Gkm
Hi How to implement multiple types of users with Django (employee and customer) Help me🙏
Rakesh
Os.path.join is not there in settings
Anonymous
I want users publish post on django site then also their post publish on social media sites same time which sites they want how can i do it
Pirates Of
How to solve
Add static directories in settings.py file
Sopan
Thanks, but our company use AWS
Cool - Let me know if your comany is looking for Paid efforts to Automate. I can be of help. Message me (PM)
Pirates Of
Done it .But not working
https://docs.djangoproject.com/en/3.1/howto/static-files/
yeus
Hey all, I'm trying to make an amazon price tracker in which a user makes an account adds product and then it's price tracking starts. I have done web scraping through beautiful soup. And now i want to add an notification feature where user will be notified once the prices is decreased or increased. How can i implement that since no view would be running in .py file at the time user is not using the website. So how to give notifications automatically?
Anonymous
I can create it by adding create method , but I can't select an existing Country(the only way I know is by creating a new Country)
Banjo
Hello everyone, wanna ask something about shell, i have ForeignKey in models, named gender, and when i call it in shell, i retrieve this: <Gender: Female> , maybe someone know how can i get "Female" text from there?
Call the field attribute that says Female on the gender model to access the text. Easy way to get through this is to create a str() method in the Gender model that'll always return the Female text Like this: class Gender: def str(self): return self.text Note: i wrote self.text because i assumed that's what you named the field attribute that says Female
Banjo
Os.path.join is not there in settings
Os is a python module You have to import it
Viсtor
Thanks Banjo)
Pirates Of
Os is a python module You have to import it
import os and then use it os.path.join(BASEDIR, 'yourstaticDir')
Banjo
Thanks Banjo)
We're welcome😊
Rohan
Can 2 users login from single browser ?
Rohan
Just asking
Rohan
Can we that
Rohan
2 logins from 2 tabs
Rohan
Local django project
Anonymous
No
Rohan
Okay thanks
Sopan
Just asking
if this is what required in your application or production, then it's possible to do that. You need to modify Authentication Model.
Laja
Hello y'all
Mr.
Hi all
Mr.
Any one want to work with a team
Doragonsureiyā
Hello y'all
Please move your "Hello" and other social talk to @PythonOfftopic.
Doragonsureiyā
Any one want to work with a team
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Mr.
Don't worry bro
Mr.
I m just finding some experts
Anonymous
class TeslaModelSerializer(serializers.ModelSerializer): origin = CountryNameSerializer() class Meta: model = TeslaModel1 fields = ['model_name', 'price', 'origin'] def create(self, validated_data): origin_data = validated_data.pop('origin') country_model = CountryName1.objects.create(**origin_data) dataitem = TeslaModel1.objects.create(origin=country_model, **validated_data) return dataitem
S
use django-celery-beat
Hey I'm using mongodb with django and my task with celery-beat for every 10 mins is not executing. Any help is appreciated
Arezoo
Hi.what is diffrence between bigbluebutton and web rtc for video call in django ?
Меджитов
If I added my python script to the site through views, will the script work again with each new visit?
S
Any source code is appreciated too, we don't have any magic ball
celery -A project_name worker -l info is not recognising my task. I mentioned app.conf.beat_schedule ={'notify_10_mins':{ 'task':'task path', 'schedule':crontab(minute='*/2') }, } In celery.py file. And I did not run manage.py migrate after installing that in installed apps. Where am I going wrong?