how do i store django media on remote unix server - django

I have two app servers 10.22.33.54 and 10.22.33.56 and I am trying to integrate media on another server IP 10.22.30.40 I created a media directory so what are the method I can use in Django to manage media files?

Related

Django Cant creat file on desktop after hosting

I have hosted my app i have a problem with the access to desktop my django app can not creat the certain directory this problem appear only when i hosted the app befor that in the local server the file was created also in the python-anywhere i cant not find any file

Django app with offline mode: store datas both in remote and local postgresql database?

I have a problem quite similar with this post but was thinking for an easiest implementation
My Django app is deployed on a remote server with Postgresql database (main central remote database).
Users online: data are stored both in the remote database and, if possible, in a local postgresql database (local database hosted on a dedicated laptop)
Users offline (when server where app is hosted is down): 'central' user need to be able to use Django web app on the dedicated laptop (with PWA) with the most up-to-date local database
When back online, the remote database is synchronized
Django can use multiple databases.
But is my solution possible?
I have read for Django sync and collect-offline apps...
thanks for advices

Can i Deploy django project without any webhost eg. heroku , pythonanywhere etc etc

I have created a dynamic web page using HTML5 Css3 JS And django.
I have already bought a domain name.
Now i want to deploy my django project, but dont want to use any web host like heroku aws pythonanywhere etc.
All I could find on the web is how to configure apache and mod_wsgi to serve the files.
Is it possible to create a web hosting from my home ? If yes how ?
Using ubuntu server, apache & mod_wsgi or any other technology?
P.S. I dont want to use any web hosting company
So on your local computer you have to install webserver(apache, nginx or something else).
Then you have to specify a note of your domain name to your home ip address(it is better when you have static IP). If you will do this, all requests that will be in to your domain name will redirect to your home IP.
Then you have to configure your webserver.

Django Apache serve downloadable images

I have a webservices application written in django to which the communication is through andriod app. I have an API call which uploads the images to a media url specified in settings. I have to serve the uploaded files as publicly downloadable files as they will be accessed by the andriod app through API call. This is the reason why I cannot use forms as Django documentation explains. I am using apache to serve my django application through mod_wsgi.
Please help me out on this.

Django load balancing: How to share user media?

With two web servers serving the same Django application with the same underlying database, I could now balance all requests between the two servers.
Sessions are stored in the DB. Static media can be handled the same as if I used a content-delivery network (CDN).
But how do I handle user-uploaded media files that sit on a local filesystem of the webserver that receives the upload POST?
Obviously, the second server will miss these files.
What is a reliable solution? NFS to some third server? Constantly running Unison or using a DVCS like Mercurial oder git?
Static media can be handled the same as if I used a content-delivery
network (CDN).
There is your answer. Upload user media to a CDN. Checkout out django-storages for an S3 or Cloudfiles storage backend.
I personally use NFS to a third server, which then serves directly all the media when requested. This reduce the NFS usage to the upload phase, and the media server can be optimized for static assets.