Martín
Google how to deploy with Python and django
Martín
There are many services out there. Heroku and PythonAnywhere are two of them I can think of
Martín
That are also Python-friendly
Martín
DigitalOcean
Martín
Good luck! 🙂
Martín
Glad to help
Mihir
Hello guys , how to install mysqlclient for django in Ubuntu
Martín
nice, just ask for help when you search again and can't progress that's the attitude, search, try and ask if you get stuck
Martín
Hello guys , how to install mysqlclient for django in Ubuntu
that would be an Ubuntu question, have you tried apt install? or maybe some package manager like synaptic and search for mysql?
Mihir
apt install
Martín
but I discourage using mysql with django unless you are forced to, better use postgres
Mihir
I have a error when installing mysqlclient
Mihir
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Martín
well some times it shows these errors but it is successfully installed
Martín
did you try to run it? did you have any problems?
Charles
hello guys ,please how i can insert datas in nested serialiazers in django rest framework..
Anonymous
I got an error in django when i try to upload image from modelform it's not working
.
How do you expect me to know?
I am sorry. No. You misunderstood
.
I wonder how this site is coded
George
I wonder how this site is coded
How. Do. You. Expect. Me. To. Know.
Anonymous
It's says image file field cannot be empty but i have put image there
Anonymous
Help me
Hardik
I want one help
Hardik
Regarding small project
Roshan
Hardik I'm here
Hardik
I want to create small project
Hardik
Wait I'll send the details
Hardik
Django Python Machine Test:- (with entity framework code first approach ). Note : - Please do not use scaffolding Below are the requirements to be developed for machine test : 1. Category Master with CRUD operations 2. Product Master with CRUD operations. A product belongs to a category. 3. The product list should have pagination on the server side, which means extract records from DB as per the page size on the view. So if the page size is 10 and the user is on page 9 then pull only records from 90 - 100.
Anonymous
Wait I'll send the details
You can ask for help, not whole project
Hardik
Yes
Hardik
I know
Anonymous
OK
Hardik
But let me explain what to for this project
Hardik
Just give me logic for this
Roshan
requirements are pretty clear Hardik . You just have to create basic CRUD API endpoint and for the 3rd requirement you can use a limit variables while requesting the next page.
Roshan
I think this is some kind of assignment
.
I thought you might have an idea. Thanks you for help
Anonymous
What is the meaning of instance in django
carson
Can someone help me . I don't know why Form is not rendering. http://dpaste.com/15N7EYC
Anonymous
Hello) why the template has broken styles?No colors) The template is written in Bootstrap) Added templates in Django
𝐀𝐁𝐃𝐔𝐋𝐀𝐙𝐈𝐙
Anonymous
you have to put all styles and css file to static folder
yes I did) But when I try to connect locally to them it just doesn’t find therefore I connected globally to the bootstrap)
#
If there is any one who is familiar to react native and django please inbox me, I need ur help
Maja Baki
<class 'teach.admin.PostAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'title ', which is not a callable, an attribute of 'PostAdmin', or an attribute or method on 'teach.Post'. <class 'teach.admin.PostAdmin'>: (admin.E112) The value of 'list_filter' must be a list or tuple. pls
Maja Baki
pls help me
John
is it possible in django to delete a file from my local machine using a button?. .
inchidi
https://www.djangoproject.com/weblog/2019/dec/18/security-releases/
John
Yes
how sir? any idea sir? thanks!. .
st9_8
how sir? any idea sir? thanks!. .
You can just link you button to a view using a link. Inside the view you just have to write the code to delete your file.
John
Yes
oh. okay. . how about downloading a file from the server then storing it to my local machine Download directory, is it possible?. .
st9_8
On server or in your local machine?
John
In this case where is located your django site?
nope, my app was already upload in the server, I use heroku. .
st9_8
nope, my app was already upload in the server, I use heroku. .
And you want to upload a file from server to your local machine?
John
And you want to upload a file from server to your local machine?
Nope, I want to download a .txt file from the server to my local machine(Download directory). .
John
You can do this from client side.
how sir? any link or idea on how can I do it? Do I need to do "os.chdir(path/to/localmachine)". . something like this to access my localmachine?. .
st9_8
yes. .
Hmmm if you use the method I send you before, you can only delete files present in your server, not in your local machine.
John
Hmmm if you use the method I send you before, you can only delete files present in your server, not in your local machine.
OH Sh*T! . . So in short I can't delete files in my local machine using django?. .
st9_8
OH Sh*T! . . So in short I can't delete files in my local machine using django?. .
It's like stackoverflow or another website hosted online can delete file in you local machine.
John
It's like stackoverflow or another website hosted online can delete file in you local machine.
Are you sure with this? Sad, I need to include this feature in my project. .
st9_8
I suppose that you local machine is the client, you use it to access you website hosted on heroku using your web browser isn't it?
John
I suppose that you local machine is the client, you use it to access you website hosted on heroku using your web browser isn't it?
yes, something like that. . So for exampla, the user of my project will click a button, then after that this button will download a file from FTP Server then this files will be stored in the users local machine. something like that. .
John
For downloading it's possible.
oh! okay. . but deleting of files from local machine, is not?. .
st9_8
oh! okay. . but deleting of files from local machine, is not?. .
Yes as I know. It makes no sense that a website can delete a file in a client machine. Probably it has a way somewhere in the web to allow, that with the agreement of the user.
John
Yes as I know. It makes no sense that a website can delete a file in a client machine. Probably it has a way somewhere in the web to allow, that with the agreement of the user.
oh! i see, "os.system('rm path/to/localmachine/fileshere')", i thought this syntax will do but as you said it cant be done thru website. .
Firdaus
oh! i see, "os.system('rm path/to/localmachine/fileshere')", i thought this syntax will do but as you said it cant be done thru website. .
From my understanding... the Python intepreter only has access to files and directories on the machine where it resides. It cannot access files and directories on other machine. Perhaps JavaScript (which runs on the user's browser) can achieve what you want? But i doubt modern web-browsers allows it. As it opens a big security hole.
cj
oh! okay. . but deleting of files from local machine, is not?. .
do you know some website where you can delete files from your local machine?
Firdaus
Maybe what you need is Server <-> Client architecture. Where the client is a GUI-based (Tkinter for example) Python application. This client communicates with the Server application (REST API for example). Where your users installs this Python application on their machine. That client application would then have access to the local machine's files and directories (limited to what the OS allows).
John
do you know some website where you can delete files from your local machine?
definitely no, that's why I'am asking. . 🙂