diff options
author | Prabhu Ramachandran | 2011-11-16 01:14:39 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-16 01:14:39 +0530 |
commit | ccc597e122e35070e4bfdac396b6171ef2cbd354 (patch) | |
tree | 5b180ab2e3c79efa1fd7b517fbd5e10b2a4f0c77 /README.txt | |
parent | 5150f68387fefa849ea492504a11f11eb5883eb9 (diff) | |
download | online_test-ccc597e122e35070e4bfdac396b6171ef2cbd354.tar.gz online_test-ccc597e122e35070e4bfdac396b6171ef2cbd354.tar.bz2 online_test-ccc597e122e35070e4bfdac396b6171ef2cbd354.zip |
DOC: Updating README.
Diffstat (limited to 'README.txt')
-rw-r--r-- | README.txt | 40 |
1 files changed, 26 insertions, 14 deletions
@@ -3,16 +3,14 @@ Installation To install/deploy this app follow the steps below: - 1. Clone this repository. + 1. Clone this repository and cd to the cloned repo. - 2. cd to the cloned repo. - - 3. Run:: + 2. Run:: $ python manage.py syncdb [ enter password etc.] - 4. Add questions by editing the sample_questions.xml or any other xml + 3. Add questions by editing the sample_questions.xml or any other xml file in the same format and then run the following:: $ python manage.py load_questions sample_questions.xml @@ -20,35 +18,49 @@ To install/deploy this app follow the steps below: Note that you can supply multiple xml files as arguments and all of those will be added to the database. - 5. First run the python server provided. This ensures that the code is + 4. First run the python server provided. This ensures that the code is executed in a safe environment. Do this like so:: $ sudo python python_server.py Using sudo is necessary since the server is run as the user "nobody". - 6. Now, run:: + 5. Now, run:: $ python manage.py runserver <desired_ip>:<desired_port> - 7. Go to http://server_ip:server_port/admin + 6. Go to http://server_ip:server_port/admin - 8. Login with your credentials and look at the questions and modify if + 7. Login with your credentials and look at the questions and modify if needed. - 9. Now ask users to login at: + 8. Now ask users to login at: http://server_ip:server_port/exam And you should be all set. - 10. Note that the directory "output" will contain directories, one for each - user. Users can potentially write output into these that can be used - for checking later. + 9. Note that the directory "output" will contain directories, one for each + user. Users can potentially write output into these that can be used + for checking later. WARNING: django is running in debug mode for this currently, CHANGE it -during deployment +during deployment. To do this, edit settings.py and set DEBUG to False. The file sample_questions.xml is a template that you can use for your own questions. +Deploying via Apache +===================== + +For any serious deployment, you will need to deploy the app using a real +webserver like Apache. The ``apache/django.wsgi`` script should make it +easy to deploy this using mod_wsgi. You will need to add a line of the +form: + + WSGIScriptAlias / "/var/www/online_test/apache/django.wsgi" + +to your apache.conf. For more details see the Django docs here: + +https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ + |