S Sidharth
does this flask code request.form.to_dict() have a django alternative? tried dict(request.POST.lists()) but not working..can someone give me a hand pls?
S Sidharth
`def htpredictor(request): to_predict_list = request.form.to_dict() to_predict_list = list(to_predict_list.values()) to_predict_list = list(map(float, to_predict_list)) if(len(to_predict_list)==7): result = HValuePredictor(to_predict_list,7) ` This is the code snippet
S Sidharth
a POST form is routed to this view
Subhransu
Anyone know Django advanced project group here? If then Can you suggest here?
Shamsil
I need a help I had a problem with pycharm I was trying to build django website but it doesn't work Any answers?
Anonymous
Can anyone help me run the django-react-ecommerce code?
Anonymous
From github??
Ekky
from django.shortcuts import render Like this one ?
Anonymous
Yes
Anonymous
It didn't work
Anonymous
How can I fix it
Alex
There are codesamples for it in his "Architecture" book
Ekky
How can I fix it
Hmm, I also have that kind of problem All I do is restart my laptop, and use virtual environment
Anonymous
Anyone just starting to learn python ? We are conducting free live classes every weekend with doubt session. Happy learning.
Shanu
Im doing a project in django and im stucked in api creation. Anyone could help me
Shanu
Please..its an urgent project
Akash
I have to remove a Django model that was used mapped to another model. How can I run certain function before making migration, in order to manipulate data before deleting model ?
Alex
Please..its an urgent project
Learn to ask properly - don't waste our time and just write what is your problem.
David
Hi people
Shoaib
Hlo
Shoaib
Anybody need ERP software of school management
Alex
Anybody need ERP software of school management
It's not a marketplace, it's a dev chat. If the project is open source then simply share the link.
ken
hi. anyone can suggest good reads for Best Practices in Django Models
Alex
âshîsh
hi. anyone can suggest good reads for Best Practices in Django Models
I seriously recommend you that books are best for concepts but instead of books , django has given all the document with bit by bit use of commands with examples. That makes django documents more powerful than any book available in market. You can practice side by side. Prefer book if you are good at reading and want to know the concepts ! If you prefer django documents then it's also equal to book
ken
thanks. also I have checked the pinned posts, but can't find foss django project links (asking fellow devs for reference purposes ).
Devu
I have a User, Project, Task table and my query is tht only project owner can create task. How i fetch it from task table by django query
Viswa
GitGuardian has detected the following Django Secret Key exposed within your GitHub account. Details - Secret type: Django Secret Key - Pushed date: 2020-12-20T13:18:07+0000
Viswa
In Github, if our secret key exposed, is it problem for us??
Harsha [M]
In Github, if our secret key exposed, is it problem for us??
Yes.. secret means you should keep it secretly
Viswa
Akash
Can we somehow tell django to use all fields of model for CreateView ? class NewSchemeView(LoginRequiredMixin, CreateView): model = Portfolio fields = [*] <---- Something like this (this doesn't work)
âshîsh
fields="__all__"
Use this syntax. For all model fields
Amr
How can I fix it
Use VSCode instead
Software
To import all models
Software
We will use all
Devu
Im using createModelMixin
Lucid
I am uploading excel sheet of student result and it is stored in db
Lucid
I want it to work like whenever i upload a new excel sheet It should be uploaded in the new table or the data must be safely stored / upload and retrieve on viewing at the front end
Lucid
Any solutions for this or any suggestions
Parsa
Hi, I have a problem in authentication in AWS S3, which I have fully explained here. Thank you for your help. https://stackoverflow.com/questions/65751648/s3-aws-user-authentication-in-django #cloudstorage #aws
Alex
Elaborate please.
Alex
I am uploading excel sheet of student result and it is stored in db
What's exactly stored? The data or the entire sheet?
Anonymous
How to integrate One signal with django for notifications
Alex
Entire sheet
I assume you have a model (say TheTable) with a field smt like sheet = models.FileField(upload_to='somewhere') and you have defined MEDIA_ROOT in you settings. Then you can provide a link to a user to that file by the_instance.sheet.url
Lucid
But it is being uploaded on the same destination again and again
Shoaib
How to upload file to another server
Shoaib
Is their any problems in my question ⁉️
Alex
Is their any problems in my question ⁉️
Yes, it is too broad. What do you mean "another" server exactly?
Shoaib
Like my project is live on example.com but I want upload all my media files to sites1.com How can I achieve that?
Alex
Like my project is live on example.com but I want upload all my media files to sites1.com How can I achieve that?
I doubt that it lives there :) Probably you're missing with default django's site domain https://docs.djangoproject.com/en/3.1/ref/contrib/sites/#django.contrib.sites.models.Site
Alex
But it is being uploaded on the same destination again and again
I don't actually understand what is your problem. You have an html page where a user can upload a sheet, right? Then you have a page where a user can download the sheet, right? Or do you mean you want to return a specific sheet on the page?
Lucid
User uploads sheets one or many
Lucid
Like the result of different school classes
Lucid
My django project is only storing every sheet in same table like a queue
Shoaib
I have a html page and user can upload video in that I want that video to stored on another server
Lucid
I want my sheets to stored to get the result of specific class then compute it
Doragonsureiyā
How to upload file to another server
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Alex
My django project is only storing every sheet in same table like a queue
> My django project is only storing every sheet in same table You should not create a new table table for each file, you should create a new row in the table instead
Alex
But in that case it is storing unto 50 rows after that it isn't
Hm, could you please provide code of the view that processes that uploading? Use pastebin for that
Lucid
Ok