Can I upload Django project on Cpanel without CloudLinux installed - python

Hey guys i have made my django project successfully and I was ready to upload my django project to cpanel Linux shared Hosting which I bought but when I searched on Google on how to upload Django project to cpanel I found that there is a option in cpanel called Setup Python App which gives us features to upload Python Apps and this option is only shown on cpanels which have CloudLinux but I don't have CloudLinux and it is paid. My cpanel is only showing me Application Manager kind of thing under Software Option which I think could be an alternative to upload my app. Am I right, can I really do that with Application manager thing or is there any free way to upload my Django App on my bought cpanel. I bought Linux shared hosting in cpanel and bought a domain too. Please Help.

if you do have application manager on your cpanel there might be a way to run python WSGI application ( in your case the python WSGI will be your django app )
look at this article (https://www.liquidweb.com/kb/installing-python-wsgi-applications-on-cpanel/)
flowing the steps of this article you should be able to bring your django application on cpanel without the need buy CloudLinux which is TOOOOOO expensive for the only one little tiny thing you want from it
please not that since your cpanel allready have [Application manager] then you can skip the "yum install ea-ruby24-mod_passenger ea-apache24-mod_env" step as it would only be required if you don't already see Application manager on your cpanel account
to summerize the steps for you
1 : from your terminal (ssh) log in to your user account , and get into your user main directory ( or wherever you want to have your django appstored)
cd /home/username
2: create a virtual environment identical to your virtualenv on your local machine
3: put your django project file on your server ( you need to figure this out on your own )
4: create the Passenger WSGI file ( ideally on the same directory where you have your manage.py file
note that your django application should have its own wsgi.py file right next to settings.py
so instead of writing the Passenger WSGI file as described in the link ,
you would need to put only one line of code in it to import the django wsgi file
from project_name.wsgi import application

Related

how to get setup python app icon on cpanel on bluehost

I want to deploy django app. I tried with apache in manual and Iam failing to do that. I want to deploy through setup python app icon by following this video - https://www.youtube.com/watch?v=Y1jJPVhanzU&t=528s
But no such icon is present on my bluehost filemanager. The support chat person said that has to install from my side. Python and apache are installed on whm but how to get that icon
it's very easy with cpanel just follow these steps in this website and your django app will work perfect
https://blog.umersoftwares.com/2019/09/django-shared-hosting.html

What is "Application startup file" option on Cpanel python application?

I'm trying to deploy my django project to my host using cpanel, but there are some new options in Create python applications tab. What should i set for the following items:
"Application startup file"
"Application Entry point"
create application
Ok it's actually pretty simple. When you want to deploy your Django app to cpanel, these field should be filled with:
Application startup file = Address of Manage.py file to start your app.
Application Entry point = Address of wsgi.py in your project folder.

How to deploy a bottle webapp in production?

I wrote a little bottle web application, played around with setup.py, and I'm ready to deploy.
I had two questions:
How do I deploy this new web app in production? Do I need a a webserver or reverse proxy? Can my main.py be run as a service? How is this typically done?
My web app uses a mongodb backend. Is there a way to package that with my application or to require it / look for it / alert the user when the installer runs? How is this typically done?
Pythonanywhere allows you for free to test/deploy a Bottle app with Pymongo driver. This is one of the webhostings which is python-deployers friendly... If you need something for a serious trafic, then you have to consider a paid programm or your own (virtual/dedicated) hosted server.
I ran my Bottle applications on OpenShift. There's a quickstart template on GitHub for getting a Bottle application online. You could just copy their directory structure and files, add your own, and send it all to the git repository that is created for you. OpenShift uses git when it comes to development, so if you ever make any changes, you just need to commit and push them to the server again.
MongoDB and RockMongo (a GUI for managing your MongoDB database, similar to phpMyAdmin for MySQL) are built in. You get three 'gears' or instances to work with, so the Bottle application will be one, with MongoDB and RockMongo included. You just have to enable them.

Eclipse with Webfaction and Django

This is my first time purchasing a hosting and I opted for Webfaction.com to host my Django application. So far, i've been using Eclipse to write all my code and manage my Django application and I'm not ready to use VIM as a text editor yet. Now my question is, how can I use Eclipse to write my code and manage all my files while being connected to my webfaction account?
Don't do that. Your host is for hosting. Your personal machine is for developing.
Edit and run your code locally. When it's ready, upload it to Webfaction. Don't edit code on your server.

How to use scripts to excecute django commands

Hi recently created my website in django. And I have used a web hosting provider who has django, python and my sql installed. But they do not have the ssh option or command prompt in their file manager. How can I use a script to excecute all the commands after uploading my site to the server .
I want file to be created like this updatedb.sh or updatedb.py .
Can anyone tell me how to use the scripts alone to host my django site live.
It is possible to have your Django views execute lines like:
import os
os.system("python manage.py syncdb")
In theory you could get the site working like that. However, this is a very poor strategy for deployment. Aside from the hassle of having os.system lines every time you want to do anything, what will you do if your entire site breaks? You'd be using convoluted hacks just to do the most basic maintenance.
If your web hosting provider truly doesn't support any kind of command line or even give you other options for setting up Django, it's time to find a new web hosting provider. I might recommend heroku, which supports Django and lets you deploy using git. (It is also free up to a certain amount of use).

Categories