A free (but superb) Django hostingPosted: Tags: code,python,django
Ever since I stared to learn Django, I've looking for a web-host to host the apps that I develop - so that I can learn the every bit of the learning chain: from design until hosting. As it was for learning purpose, I didn't want to pay heavily for it. So primarily I was looking for some free hosting service.
I came to know via Django Google Groups that bells-n-whistles provide a fee hosting service. I sent them a mail via their contact form. They setup the free domain and sent me a mail regarding the details. Their free hosting access is only via FTP.
I had starting glitches with the hosting. Every time I sent them a mail, they were very prompt in answering back. Being a newbie into Django (especially its hosting), I probably asked silly and annoying questions. Not minding, they replied back with answers - simple yet to the point.
There is no detailed documentation on their site. So here is what worked for me.
Here is the snippet of settings.py
PROJECT_DIR = os.path.dirname(os.path.abspath(file)) DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = os.path.join(PROJECT_DIR, 'sol.db') MEDIA_ROOT = '%s' % PROJECT_DIR MEDIA_URL = 'media/' ADMIN_MEDIA_PREFIX = '/media/' TEMPLATE_DIRS = ( r'%s/templates/sol' % PROJECT_DIR, r'%s/templates' % PROJECT_DIR, r'%s/templates/admin' % PROJECT_DIR, )
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'sol', )
As you can see, I am using sqlite instead of their default db PostgreSQL. As it is a demo db, it works okay for me.
Then transfer both application templates and admin templates to templates directory. Transfer css files to media directory. If you have file uploads (like images or avatars), they should be within media directory as well.
Of course since it is a free hosting, you need to add a link to their site. For the free service that they provide, it is expected. If I continue to learn Django (I'll be), then I will most probably, go with them for hosting.
You can visit their site at: bells-n-whistles. The one that I'm hosting is at: http://cephire.bells-n-whistles.net. (Since it is a demo and just setup, there is not much there. Hope to add over the time. It is a Twitter clone. If you want to try it out, use jjude/jjude for user id/password).