niketan
HELP: I'm trying to create a app that run a pertecular python script when button pressed... the script contain code related to opencv. how can i do this
Roman
Guys please help , I have no idea , I am suign rest_framework , and getting this error AttributeError: Got AttributeError when attempting to get a value for field `date` on serializer `RecordSerializer` Model : class Record(models.Model): date = models.DateField() lat = models.FloatField() lon = models.FloatField() Serializer : class RecordSerializer(serializers.ModelSerializer): class Meta: model = Record fields = '__all__' Please help I am just exploding
Ayomide
Hi All I created this web application by scraping and manipulating data on various movie download sites with python and Django..... Then serving it as an api endpoint to my react frontend You can download movies without any hassle....really fast https://pedantic-lewin-bdf7dc.netlify.app/ Please review
Ayomide
try it like this........
Ayomide
nice
Anonymous
Is it possible include form in ListView
Daniel
UI is horrible
I take it back... But u can do better on UI side. Like some images on movies poster
Ayomide
yeah...thanks
Damron
Hi! I want to create simple Django+Vue app and proj's structure will be looking as follows: proj— | — backend (Django proj) | — frontend(Vue js proj) And I want to deploy them to Heroku but as 2 buildpacks - nodejs and python Is it good idea to make like this or its better to realize proj not as 2 projects but as single?
Mrinal
Can anyone please help me with this question: https://stackoverflow.com/questions/61649764/mysql-error-2026-ssl-connection-error-ubuntu-20-04
niketan
please help, how can i run a python script from django app on button click. i tried this
niketan
def apage(request): inp = request.POST.get('param') out = run([sys.executable, '/media/niketan/cartush/project/major/mdls/cvcv.py',inp], shell=False,stdout=PIPE) return render(request, 'apage.html',{'data1': out.stdout})
niketan
but it did not work... i used a form in html file
SkyLord
hi to all I asked myself to play a little with users and groups of Django for educational purposes the essence of the idea is as follows: the user is registered at the same time choosing the type of registration (user type) for example the group "G1" and the group "G2" after registration, each user gets access to a personal account, which differs (different data) depending on who he is "G1" or "G2"; BUT, in the personal account "G1" there is a button to send a message and then when a user creates a message (from G1), it should go to all users from the "G2" group, and those in their personal account either delete the message or reply to it to the sender from G1 - the answer is as if private. Now about the models, by analogy with the blog, I think so: - Group model (analogy with categories) is the user type "G1" or "G2" - Profile1 model (analogy with posts) in which OneToOne with a user model and Foreignkey with a group is for users from "G1" - Profile2 model (analogy with posts) in which OneToOne with a user model and Foreignkey with a group is for users from "G2" - Messages model (analogy with comments) in which Foreignkey with Profile1 please tell me is this the right approach or not?
Anonymous
Anyone pls tell the difference between Web2py vs Django
Nonverbis
Anyone pls tell the difference between Web2py vs Django
Django is popular. Web2py is not popular. You will be alone in the desert if anything happen.
Doragonsureiyā
Anyone pls tell the difference between Web2py vs Django
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 firsts results
niketan
ypu have to code some urls and javascript also
can u give any example i have seached web and did not find anything good
Doragonsureiyā
can u give any example i have seached web and did not find anything good
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Batman
does anyone know how to dynamically set the fields in a drf serializer based on the data present in per object
Bahodir
Help
Bahodir
When : python manage.py runserver
Bahodir
Errors
Anonymous
Hello Guys, I am making a self-hosted website in wordpress, but for hosting bluehost is asking me to pay anually. My question is: is there any hostiong out there where i can pay bill amount only for a month?
Anonymous
Hi, I am new here. I just started learning Django. I need a good django book from you. Thanks
Doragonsureiyā
Hi, I am new here. I just started learning Django. I need a good django book from you. Thanks
Check out PythonRes, a channel for Python resources (links to help you out).
Anonymous
How not allow django in admin page add the same item to table in database. I don't want it to reapeat??
Bjorn
Didn't u ask the same question in python offtopic. Don't crosspost.
Ayomide
😄
sizemore
how do you use Cython in django2.1+
Anonymous
i have found on my own. But i have another mistake
Anonymous
Use unique=True in model attribute...
Anonymous
"Duplicate key name 'name_c3a904f9_uniq
Anonymous
i can't find this because it is decripted
Anonymous
i know the table and i know the field
Anonymous
but i can'd find repition
Bjorn
"Duplicate key name 'name_c3a904f9_uniq
flush the tables first.(if there's no data in the db yet.. ) or delete the duplicate values manually.
Anonymous
the data already exists
Anonymous
there a lot of data. What query can i use to find duplicates
Anonymous
for example with python manage.py shell
Ayomide
what fiels exactly is duplicated
Ayomide
field
Ayomide
lets say you have an article model and the duplicated field is the article name
Ayomide
in python manage.py shell you write something like Article.objects.filter(name="sleep").delete()
Jigani
in python manage.py shell you write something like Article.objects.filter(name="sleep").delete()
He could just set the field to unique and won't have to worry about data duplication
Ayomide
read the thread above...
Ayomide
he has done that
Jigani
Okay
Anonymous
i have found the solution
Anonymous
unfortunatly Null in unique filed is considered as duplicate too
Anonymous
i have Null fields in database
Anonymous
i am going to fulfill it in future
Code
whats the problem?
Anonymous
Hi there Can anyone help me to solve I’ve installed Django-jet and want to enter /admin but it shows error TemplateSyntaxError at /admin admin_static is not a registered tag library. Must be one of :admin_list Admin_modify Jet_dashboard_tags Etc ...
Anonymous
Yes
Anonymous
Are you using abstractuser ?
Anonymous
If u can share the code
Anonymous
are not you creating your custom user model?
Anonymous
I think you should not use
Anonymous
models.Model
Anonymous
AbstractUser has a lot of things included for you