Tuesday, 15 May 2012

Follow the following steps to install TCC automation

  • For installing TCC automation software, make sure that your computer has MYSQL and Django installed.
  • This application is tested for Django version 1.4.
  • In this documentation, replace the "user name " with the name of your system.
  • Also run following command commands in the terminal :                          sudo apt-get install apache2 libapache2-mod-wsgi

    (mod-wsgi is necessary for running the software on localhost using apache.)
                                                                     sudo apt-get installmysql-server python-mysqldb
  1. First step to install the TCC software is to download the “TCC.tar.bz2 “ of office automation from the http://sarovar.org/frs/download.php/1327/TCC.tar.bz2 .Then, extract it and place the extracted folder in the home folder. Change the name of the folder from "TCC" to "TCC11_12".
  2. Open the TCC folder and make the changes in the apache folder and settings.py file. In apache folder there is a “django.wsgi” file which contains sys.path.append(‘/home/user name/’), in this give  "user name" of your system. In settings.py file,where there is a user name and password, give the user name and the password of your phpmyadmin. Then open phpmyadmin and create the database (say "tcc") and then again open the settings.py file and change the name of the database as created in the phpmyadmin (say "tcc"). 

          DATABASES = {
                  'default': {
                  'ENGINE': 'django.db.backends.mysql',
                  'NAME': 'tcc',                      
                  'USER': 'root',                    
                  'PASSWORD': 'q',
                  'HOST': 'localhost',            
                  'PORT': '',                      

        also change 'HOST':''  to  'HOST': 'localhost', in the above database.

  • In the settings.py file change

         LOCAL_URL = ''      to                                                                          LOCAL_URL = 'http://localhost/'

          MEDIA_URL = ''     to                                                             MEDIA_URL = 'http://localhost/media/'     

  •      Give the path in TEMPLATE_DIRS = (“/home/username/“) in settings.py file of your templates of       TCC application as:

              TEMPLATE_DIRS = ("/home/USER NAME/TCC11_12/templates"                                                 
               <replace USER NAME with the    "user name" of your system> 

    3. Write the following command in terminal to go into the TCC project:

          cd TCC11_12

        Then, run the following command in order to create the tables in the database

          python manage.py syncdb

    4. Then, go to phpmyadmin and in the above database from the tables created above we have to     drop two tables: automation_teachers and automation_variables. The procedure to drop the tables is : Select the tables that are to be dropped and at the end there is “with selected” click on this and select “drop” and then at the end on the right side there is “go”, click on “go”.After click on “go”,your selected tables was dropped.

5. Now, we have to import the dropped tables: automation_teachers and automation_variable. And the procedure is : When you go to the phpmyadmin and open the database of the TCC project, at the top, click on the import.
Then, in order to import the tables browse the “tcc_11-12.sql” file.The ”tcc_11-12.sql” file is given below and you have to first copy it on the desktop first and then browse it in the import portion of the phpmyadmin .Then, at the end there is “go”. Click on “go”.

This will import the tables in your database.

6. Save following text in a file  (/etc/apache2/httpd.conf) Change the path of media folder to your own path that you follow instead of the path given.(instead of goraya give your own user name)

Alias /media/ /usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/contrib/admin/media/

<Directory /usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/contrib/admin/media/>
Options Indexes
Order deny,allow
Allow from all

WSGIScriptAlias  /polls /home/goraya/TCC11_12/apache/django.wsgi
<Directory /home/goraya/TCC11_12/apache/>
Order allow,deny
Allow from all

WSGIScriptAlias  /tcc11_12 /home/goraya/TCC11_12/apache/django.wsgi
<Directory /home/goraya/TCC11_12/apache/>
Order allow,deny
Allow from all

  • One most important thing that must be done is to copy the media file and replace it on the media path i.e/usr/local/lib/python2.7/dist-packages/Django-1.4-py2.7.egg/django/contrib/admin/media/
    .Given link is the link of the media.tar.gz , compressed file of the media file, you will have to first save, extract it and then copy it and replace it on the above path of the media file.

7. Then, at last final step is go into the browser and type -http://localhost/tcc11_12/. This will open the TCC software in the browser. 

8. When you installed the software completely if there is problem in opening the “credit and feedback” link in running software make the following changes in /home/goraya/TCC11_12/contact/views.py:

from TCC.contact.forms import *
from TCC11_12.contact.forms import *

No comments:

Post a Comment