Python 3.7 how to run django on cpanel || django on shared hosting
Python 3.7 how to run django on cpanel || python 3.7 cpanel || django on cpanel shared hosting | how
run Django with python latest version with default database sqlite3 ::
how to run python 3.7 #django on #cpanel
this is tutorial video
many peaple may have faced this problem now i am solved step by step
How to run django in Cpanel python 3.7 sqlite3 || django on shared hosting latest version python
ask anything join telegram ::
Blearningclub Telegram channel ::
first create python app
select environment and install django ( pip install django )
create django project ( django-admin startproject project )
edit passenger application to wsgi application
then in edit settings.py
select host name
then add media ,static file directory
like {
MEDIA_URL=’/media/’
STATICFILES_DIRS=[BASE_DIR +”/assets”,]
STATIC_ROOT=’/home/***username***/public_html/static’
MEDIA_ROOT=’/home/*** user name***/public_html/media’
}
then create assets in directory of manage.py
then create media folder in public html
then goto terminal:
command: python manage.py collectstatic
if you will see an error then change your data base to mysql
it is more easy to use
step :
first , create a database ,user and give privileges
change settings.py in django project
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘ ‘,
‘USER’: ‘ ‘,
‘PASSWORD’: ‘ ‘,
‘HOST’: ‘localhost’,
}
}
the select python environment
in terminal : install mysqlclient
pip install mysqlclient
then type :: pip install collectstatic
and restart the server
django works successfully
more video:
how to run django on cpanel:
how to run your django project on shared hosting cpanel:
how to get free ssl:
why learn python , python animation:
music credits :
3am by Tokyo Music Walker
Creative Commons — Attribution 3.0 Unported — CC BY 3.0
Free Download / Stream:
Music promoted by Audio Library
download and use copyright free music && i also used in this video:
support us || LIKE || SUBSCRIBE || SHARE
Help please! error media url admin upload save imagefield
Page not found (404)
Request Method: POST
Request URL: https://ioaprendo.com/admin/ioapp/curso/1/change/
Raised by: django.contrib.admin.options.change_view
Using the URLconf defined in prueba.urls, Django tried these URL patterns, in this order:
admin/
[name='home']
^media/(?P<path>.*)$
The current path, ioapp/curso/1/change/, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
thank you so much, very clear explanation)))
I tried all method but after doing this method it is just showing 500 server error in all pages except home page. It works with homepage but when I go to other pages like login, admin, register then it shows 500 server error. Please help me to fix this problem
in setting.py it should be (STATICFILES_DIRS=[str(BASE_DIR) + "/assets",]) rather than (STATICFILES_DIRS=[BASE_DIR +"/assets",]). Otherwise the command "python manage.py collectstatic" will throw a TypeError "TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'".
there was an error after i used python @t collectstatic. can you help me?
it shows some file and says "TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
" and is showing error in this (STATICFILES_DIRS=[BASE_DIR +"/assets",])
I can't able to find "python app" in my CPanel.
Which hosts accept this way??
i am not able to see python on software section.i have bigrock cpanel
its very great tutorial thanks
hey bro first off, thank you from Ukraine ! second off.. how did "404.shtml", "home.html" and "layout-styles.css" ended up in public_html directory ? I did not see you setting up the defaul folder for templates…
Where and How do you add python code here? Say I want to add an api called (view name:multilply , pythonfile: Maths.py, url: /multiply) .. I want to add some real useful code that could be called by url. I am able to do in my computer but not in cpanel.
When I pip install mysqlclient in terminal i get gcc permissions denied, contacted the admins of server but to no assist, please help
Hello,
I want to Know I made a Python Django Project {E commercial Website}
I don't know how to host or deploy my website in my Cpanel.
???
why we don't use port?
how can i contact you sir? please reply
very helpfull video. can you make a video on how to set up settings for deployment to hide secret key and credit card details