This explains the following questions.
1. How to install Aptana in Windows 8 64 bit os?
2. How to install Python in Windows 8 64 bit os?
3. How to install Django in Windows 8 64 bit os?
4. How to run a sample application in Django in Windows 8 64 bit os?
This will be useful for candidates who are learning Django framework.
Baabtra django framework installation and sample project using aptana
1.
2. • This PPT explains three things
1. How to install Django framework on
Windows 8 64 bit OS?
2. How to configure aptana Studio for using
Django framework?
3. How to create a simple sample application
using Django framework in Aptana Studio?
3. How to install Django
framework on Windows 8 64
bit OS with Aptana?
Haris NP
haris@baabtra.com
www.facebook.com/haris.np
9
twitter.com/np_haris
in.linkedin.com/in/harisnp
4. Steps
• Install Python 2.7
• Install MySQL for Python (You need to install
the corresponding driver for your DBMS)
• Install Django
• Install Aptana
5. Step 1: Python installation
• Down load Python from the following link
– http://www.python.org/ftp/python/2.7.5/python2.7.5.msi (Please note that you should not install 64 bit
version of the Python. If you install, you will get an error
that MySQL is not a valid Win32 application). The idea is if
you are using Python and MySQL, then you should use
both Python and MySQL 32 bit. The 32 bit version of
python will run in 64 bit operating system.
– http://python.org/ftp/python/3.3.2/python3.3.2.amd64.msi (If you are using MySQL database, you
can not use python 3.3.2 as there is no MySQL driver
released for Python 3.3.2)
– After installation, add the path of Python to the
environment variables as shown in the screen shot
7. • In order to verify that Python is installed
properly, type python in the command
prompt. As we have added to the
environment path, python command should
execute from any folder in the computer
8. Step 2: MySQL-Python-1.2.3 install
• Download the mysql driver for python from
the following link
http://www.codegood.com/download/10/
File Name : MySQL-python-1.2.3.win32py2.7.exe
Or MySQL-python-1.2.4.win32-py2.7
10. Now you might get this error
• Python version 2.7 required, which was not
found in the registry – Windows 8 64 Bit OS
11. Reason
• Setup is looking for the Python installation
registry value InstallPath
inHKEY_LOCAL_MACHINESOFTWAREWow64
32NodePythonPythonCore2.7InstallPath.
Notice the Wow6432Node, which is a registry
compatibility layer used for 32-bit apps in
Windows 8 64-bit
16. • Repeat the same steps by choosing the folder
Python
• Create the folder structure
• Python PythonCore 2.7 InstallPath
InstallGroup
17. • Double click on (Default) as shown
• Copy paste the value from the registry
HKLM Software Python PythonCore
2.7 InstallPath
18. • Double click on InstallGroup
• Change to the value in HKLM Software
Python PythonCore 2.7 InstallPath
InstallGroup
• In my case it is Python 2.7
22. Step 2: Install Django
• Download Django tar file from the following
location
https://www.djangoproject.com/download/1.5.
5/tarball/
• Copy and paste the tar file to C:Python33
(where you have installed your python) as
shown in the attachment
31. • In order to verify that Django is installed,
please type import django in the python
command line as shown. If there is no error,
you can confirm that it is installed successfully.
32. • Now python and Django framework are
installed in your machine.
• Now for the IDE, you can install Aptana Studio.
33. Step3: Install Aptana Studio
• Download latest Aptana studio from
http://www.aptana.com/
• Double click the set up to install Aptana Studio
• It runs as a stand alone application.
43. • Select Django version as 1.4 or later. We had installed 1.5.5 (Refer
the initial slides)
• Database Type : mysql (You can choose your database from the
drop down list)
• Database Host: localhost (you can give the IP address if you are
using a different system)
• Database Name: baabtra (Your database name) If you are using
sqLite, the database will be created automatically. Other databases,
you have to create the database before itself.
• Port number 3306 (Your port number)
• Username : root (Username for connecting to the database)
• Password : ******(Your password for the username above for
connecting to the database)
• Please note that the above information will be stored in the
configuration file for connecting to the database.
45. • For verification, right click the project root
and Select Run As PyDev: Django
46. Another possible error
• The interpreter configured does not exist in the
filesystem: C:Python33python.exe
• In my case the error happened because I had
installed Python 3.3 and when I tried to install
Python-mysql connector, it was available only for
Python 2.6. So I had to remove Python 3.3 and
install 2.6.
53. Another Possible Error
• Traceback (most recent call last):
File "C:UsersadminDocumentsAptana Studio 3
WorkspaceBaabtraFirstDjangomanage.py", line 8, in <module>
from django.core.management import
execute_from_command_line
ImportError: No module named django.core.management
54. Reason
• Django was installed on Python 3.3. Now it
was reinstalled to Python 2.7. So we have to
reinstall the Django framework.
• Follow the same steps as given in Step No.2 of
this PPT
58. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baab
te.com