Jump to content

[Solved] How to Deploy a Django Powered Blog(in a specific example)?


Recommended Posts

Posted

Domain Name: purerapture.co.cc

User: jazbe

 

Running the following code you will have a Django Powered Blog.No changing of the code is needed ignoring the output style(CSS and specifying its file location);

You just need to have python and django installed.Having synchronized the built in sqlite3 database in Python 2.6 with models of this Django project I tested it at my home computer using Django Runserver.

 

a Django Blog Project Source Code

 

So what is the question?

The question is how it can be deployed in Heliohost using Apache Server?

Considering what i mentioned above and removing the following statement from the urls.py file which manipulates Runserver

 

(r'^static/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': 'c:/static/adornment'}),

 

 

this deployment should be composed of only 2 steps ignoring the output style:

 

  1. Setting up and configuring a database in Heliohost Account to hold synchronized tables with Django models classes
  2. Manipulating Apache to serve Django

 

So my question is how I should accomplish these two steps? please don't give me general responses.I have read the python feature webpage in heliohost.org.I want answers to this specific case.

 

And to djbob: I have uploaded this project code to my (www) folder.I'll be glad if you try to run it in my account

 

Thank you very much

Posted

Sorry, but I really don't understand what you are asking. Have you tried following the guide on the HelioHost.org page? If so, what is the error you are getting?

Posted

This is what i get browsing to purerapture.co.cc

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, webmaster@purerapture.co.cc and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

1.I use "manage.py syncdb" in command prompt at my home computer to synchronize database.How should i do it at heliohost without shell access?

do you have sqlite3 database? i don't see it in my control panel

 

2.Yes I have tried the guide and I got the above error

 

You are the best host for your great support

Posted

We don't allow command prompt access. We have SQLite 3, but there is no control panel for it since SQLite is not a daemon-based SQL server.

 

Do you see an "error_log" file anywhere in your account?

Posted

[sat Jan 30 00:02:06 2010] [error] [client 92.242.204.175] File does not exist: /home/jazbe/public_html/404.shtml

[sat Jan 30 00:02:06 2010] [error] [client 92.242.204.175] File does not exist: /home/jazbe/public_html/favicon.ico

 

these are my error log

 

I know you don't allow command prompt access.I'm asking so how should this synchronization be accomplished without using command prompt?

 

I'm completely unsure of how I can setup the required database.Please explain what steps i should take to do it.

Posted

You should look into this with the Django folks, but unless manage.py can take input in the form of an HTTP query string then you won't be able to run it here. You should be able to allow it to input from the query string with minimal modifications, though.

Posted

I'm not going to run manage.py at heliohost.I'm looking forward to an alternative.For example making a db file in my home computer and copy its content to a db file i have created in heliohost.something like this.Don't you have any suggestion?

 

I'm so ignorant about databases.Can't I have a database file the same as the one I have in my home computer?

 

These are the only settings django needs to communicate with a database:

 

DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'db')
DATABASE_USER = ''             # Not used with sqlite3.
DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

I mean I think it's enough for example for me to first synchronize my home db file.Then make the same kind of db file in heliohost which contains the same tables in my home db file(so the db file in heliohost is some kind of a copy of my db file at home).And at last give above settings their right values.

 

What do you think?

 

I think this is a very basic project.I mean it's something very normal.And you are saying that you support django framework.I want to know how this normal project can be deployed.Isn't there anyone in this hosting who uses databases with django? and I think any useful django project must have a database.So if there is anyone who is running a django powered website on your host , he must know my answer.And if there is no such person then I think you shouldn't claim supporting Django framework on your hosting.

Posted

You should be able to create the database on your local computer and upload it to HelioHost. It should just be a single file.

Posted
You should be able to create the database on your local computer and upload it to HelioHost. It should just be a single file.

So you mean I'm fine if If I upload the db file on my cmputer to my project folder at heliohost and use the following settings in my settings.py file.

 

DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(os.path.dirname(__file__), 'db')
DATABASE_USER = ''             # Not used with sqlite3.
DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

Ok if this is the case I shouldn't have any database problems.

 

So why am I getting error browsing to my page?Is your Apache server really serving my django project? What is that 500 internal server error?

Posted

Can you try to load the page again and see if any more errors are popping up in your error_log?

Posted

What do you mean by loading the page again?

Hey I'm a complete newbie , so please give me help in layman's terms.

 

And may be it's my fault that want to have a django based website soon while I know very little about it.I'm going to learn python and django completely and even learn linux sever but I thought I may find someone kind enough here to help me to have such website before actually knowing how it's working.

 

I know you are a free service and this means that you don't have to give any kind of support at all but when you claim you support django for building a website you should provide a sample example of a django project that is hosted by you successfully.

 

And what I'm afraid from is not being able to run such a website even after gaining the required knowledge.I mean I'm afraid this kind of website be an impossible one to be hosted by heliohost.

 

Do you give me an assurance that having a django powered website is practical on your host?

And is there anything else about django that paid hostings are offering that you don't offer? And is this extra options they offer necessary to build any or every kind of website with django? I mean do you believe any django website that can be hosted by them, can be hosted by heliohost too?

 

I really like your hosting because I like the idea behind this service.It's like the idea behind the open source movement.I really appreciate you and I'm really hoping to have my django powered site on heliohost.org soon

 

Thank you very much for your dedication to this freedom

 

And I know this is off topic,but I'm curious to know how you are earning a living?!!!

Guest
This topic is now closed to further replies.
×
×
  • Create New...