1. 1 | P a g e
PROJECT REPORT
SEMESTER - V
Submitted to:
BHARATI VIDYAPEETH UNIVERSITY
Amplify DITM, Pune
Submitted by:
Akash Raj guru, B.Sc. IT III year
BVU Amplify DITM, Pune
2. 2 | P a g e
TABLEOF CONTENTS
1. Django Framework
i) introduction
ii) Project Snapshot
iii) Source code
2. QT framework
(i) introduction
(ii) project snapshot
(iii) source code
3. Web2py framework
i) Introduction
ii) Project Snapshot
iii) Source code
4. References
3. 3 | P a g e
1 DJANGOFRAMEWORK
1.1 INTRODUCTION
DJANGO IS A HIGH-LEVEL PYTHON WEB FRAMEWORK THAT ENCOURAGES
RAPID DEVELOPMENT AND CLEAN, PRAGMATIC DESIGN.
Developed by a fast-moving online-news operation,
Django was designed to handle two challenges: the
intensive deadlines of a newsroom and the stringent
requirements of the experienced Web developers
who wrote it. It lets you build high-performing,
elegant Web applications quickly.
Because Django was developed in a fast-paced
newsroom environment, it was designed to make
common Web-development tasks fast and easy.
Here’s an informal overview of how to write a
database-driven Web app with Django.
High level web framework
Basic modules, classes, and tools to quickly develop
and deploy web apps
Contains an ORM (Object-Relational Mapper) that
allows for the use of standard Python language
syntax when interfacing with a back-end database.
Developer need not learn SQL, DDL, etc!
4. 4 | P a g e
Provides a template framework that allows HTML,
XML, and other “documents” to be converted
into “templates”, which can then be converted to
“output” via a wide range of substitution
techniques.
Elegant URL support (fancy, beautiful URL's, no
“?blah=blah”, etc.)
Multi-lingual
Fast and easy to use, robust, flexible, and lots of
contributed components available!
Built in administrative interface to manage data
models.
Built-in authentication/access control components
Contributed geospatial support components
(GeoDjango)
Extensible!
Django Pre-Requisites
Python 2.3 or higher
No Python 3.0 support (yet)
Database drivers for the database you wish to use
PostgreSQL, Oracle, SQLite, MySQL
Web Server
5. 5 | P a g e
Django has a built-inweb server for development
Handles a single connectionat a time.
Not security-tested
By default listens only for “local” connections.
Apache, IIS, etc. for deployment
Downloading& Installing Django
Django can be downloadedfrom
http://www.djangoproject.com/download
Unpack and installDjango
Unpack the sources and run the command below from
the Django source directory as the root user:
python setup.py install
This command works the same on Windows as it does in
the Linux environment,you just need to make sure you
call the correct interpreter.
Choosing a Database
Current version of Django provide support for three databases:
PostgreSQL using the psycopg and psycopg2 drivers .
Unix versions can be downloadedfrom
http://initd.org/pub/software/psycopg/
Windows version are availableat
http://stickpeople.com/projects/python/win-psycopg/
MySQL using the MySQLdb package.
6. 6 | P a g e
This package is availableat http://sf.net/projects/mysql-
python/ .
SQLite 3 using the pysqlite package.
This package is availableat
http://trac.edgewall.org/wiki/PySqlite.
SQLite support is included in Python version 2.5 and newer.
Django supports all of these databases in the same
manner, so which you choose to use here makes little
difference, since everything is coded in the same
way.
When you move to your own developmentsystem,
you'll need to choose a database based on your
needs and the software deployedin your enterprise.
Creating a New Project
The django-admin.py toolis used to create a directory and
create “default” files for a new
Django project.
A project is generally made up of one or more “apps”
Functionalcode is containedwithin the apps.
Use the django-admin.pyscript to create the
new project files.
django-admin.pystartproject name
The startproject argument tells the command that we
need it to initializea new Django project.
7. 7 | P a g e
The name argument allows us to specify the name of
the project to be created.
When the command runs, it will create a new
directory called name in the current directory, and
populateit with a few files:
__init__.py: A file that causes Python to treat the directory as a
package.
manage.py:A command line utility to communicate with
Django.
settings.py: Configurationsettings for the project.
urls.py: URL declarationsfor the project. The URL's tell Django
what to do when certain URL's
are put into the browser.
1.2 STARTING THE TEST SERVER
Once you've created your project, you can test it by starting up
the Django development
server.
You can start the server using the command:
python manage.py runserver
This command will start up the server and listen on port 8000
of your system.
You can use your web browser to connect to the server using
the URL the command returns.
8. 8 | P a g e
Creating a New Application
Once you've created a project, you'll need to create an
application.
Django models and views are handledthrough the application
itself – not the project, which
consists of primarily the controller and base settings (such as
data store information)
You can begin a new app by openinga shell
window in your project directory and issuing
the 'startapp' command.
Like projects, you should avoidusing reserved words for your
app name, otherwise you might
run into problems later.
Once you've created a new app (or installedan app from a third
party), you'll want to add it
to the list of INSTALLED_APPS in your projects 'settings.py' file.
Apps are not actuallyused until they are installed,so you'll
want to make sure you install your
app, or it won't be usable in your project.
9. 9 | P a g e
Building Django Applications
Overview of A Typical Django Request
When a request comes in for a Django applicationviathe web,
it typicallyfollows a specific
path:
1. Django uses a set of regular expression matching patterns
based on the URL.
Each expression is tied to a function (called a “view” in Django
parlance), when a match is found the
view is executed.
2. Views are passed a HTTPRequest object (and possibly other
information) - which represents the
“state” of the inboundrequest (meta-parameters, GET, POST,
COOKIE, etc. are all containedin
the request object)
3. The view may make a request for data using the ORM, and
uses the informationobtainedto
populatea dictionarywith parameters that can be used to
compose the response.
4. A template is chosen, and used along with the information in
(3) above to substitute data and
10. 10 | P a g e
generate some output data.
5. The output data (4) is made part of an HTTPResponse object,
which also containsHTTP headers
that shouldbe sent to the client.
6. The HTTPResponse object is returned by the view function,
and Django uses it to generate the
response back to the client.
Setting up URL Patterns
When requests come in to
Django via the web, they come
in via a request for a particular
URL.
That URL (the portionafter the
'/' after the host name) is
matched against a set of regular
expressions to determine the
view to call.
The URL patterns are processed
in the order that they are
entered, so “specific” expressions should
11. 11 | P a g e
appearbefore generic expressions.
Regular expressions can also be used to
pass named parameters to view
functions(the first argument to the view
will alwaysbe the HttpRequest object, the others can be passed
based on the URL, such as in
the example here)
from django.conf.urls.defaultsimport *
from project.appname.viewsimport welcome, date_view
urlpatterns= patterns('',
(r'^$','welcome'),
(r'^(?P<mon>w+)/(?P<year>d{4})', 'date_view')
)
A sample URL pattern. In this case when the URL is empty, the
project.appname.views.welcome
function is called and passed a HTTPRequest object.
The second URL pattern grabs the month and year from the
URL and calls the date view with named
arguments of 'mon' and 'year'
21. 21 | P a g e
BLOG.HTML
{%extends"base.html"%}
{%blockcontent%}
{% forpost inobject_list%}
<h3><a href="/blog/{{post.id}}">{{ post.title}}</a></h3>
<divclass = "post_meta">
on {{ post.date }}
</div>
<div class = "post_body">
{{ post.body|safe|linebreaks}}
</div>
{%endfor%}
{% endblock%}
POST.HTML
{%extends"base.html"%}
{%blockcontent%}
<h3><a href="/blog/{{post.id}}">{{ post.title}}</a></h3>
<divclass = "post_meta">
on {{ post.date }}
22. 22 | P a g e
</div>
<divclass = "post_body">
{{ post.body|safe|linebreaks}}
</div>
{% endblock%}
2 QT
3 INTRODUCTIONTO QT QUICK
Qt Quick is a collectionof technologies that are designed to help
developers create the kind of intuitive, modern,and fluid user interfaces
that are increasingly used on mobile phones, media players, set-top boxes,
and other portable devices.Qt Quick consists of a rich set of user
interface elements,a declarative language for describing user interfaces,
and a language runtime. A collectionof C++ APIs is used to integrate these
high level features with classic Qt applications. Version 2.1 of the Qt
Creator integrated developmentenvironment (IDE) introduces tools for
developing Qt Quick applications.
23. 23 | P a g e
3.1 THE QML LANGUAGE
QML is a high level, scripted language. Its commands,more
correctly elements,leverage the power and efficiencyof the Qt libraries to
make easy to use commands that perform intuitive functions. Drawing a
rectangle, displaying an image, and application events -- all are possible
with declarative programming.
The language also allows more flexibility of these commands by
using JavaScript to implementthe high level user interface logic.
A QML element usually has various propertiesthat help define the element.
For example, if we created an element called Circle then the radius of the
circle would be a property. Building user interfaces by importing these
elements is one of the great feature of QML and Qt Quick.
24. 24 | P a g e
3.2 QTDECLARATIVE MODULE
To make Qt Quick possible,Qt introduces the QtDeclarative module. The
module creates a JavaScript runtime that QML runs under with a Qt based
backend. Because QtDeclarative and QML are built upon Qt, they inherit
many of Qt's technology, namely the signals and slots mechanism and
the meta-object system.Data created using C++ are directly accessible
from QML and QML objects are also accessible from C++ code.
In conjunction with the QML language, the QtDeclarative module separates
the interface logic in QML from the application logic in C++.
3.3 CREATOR TOOLS
Qt Creator is a complete integrated development environment (IDE) for creating applications with Qt
Quick and the Qt application framework.
25. 25 | P a g e
The main goal for Qt Creator is meeting the developmentneeds of Qt
Quick developerswho are looking for simplicity, usability, productivity,
extendibility and openness,while aiming to lower the barrier of entry for
newcomers to Qt Quick and Qt. The key features of Qt Creator allow UI
designers and developers to accomplishthe following tasks:
Get started with Qt Quick application development quickly and
easily with examples, tutorials, and project wizards.
Design application user interface with the integrated editor, Qt
Quick Designer, or use graphics software to design the user
interface and use scripts to export the design to Qt Quick
Designer.
Develop applications with the advanced code editor that provides
new powerful features for completing code snippets, refactoring
code, and viewing the element hierarchy of QML files.
Build and deploy Qt Quick applications that target multiple
desktop and mobile platforms, such as Microsoft Windows, Mac
OS X, Linux, Symbian, and Maemo.
Debug JavaScript functions and execute JavaScript expressions in
the current context, and inspect QML at runtime to explore the
object structure, debug animations, and inspect colors.
Deploy applications to mobile devices and create application
installation packages for Symbian and Maemo devices that can be
published in the Ovi Store and other channels.
Easily access information with the integrated context-sensitive Qt
Help system.
26. 26 | P a g e
3.4 WHERE TO GO FROM HERE
The Qt Quick page has links to various Qt Quick topics such as QML features, addons, and tools.
The QML Examples and Demos page has a gallery of QML applications
28. 28 | P a g e
SOURCECODE
importsys
fromPySide.QtCore import*
fromPySide.QtGui import*
importtime
app = QApplication(sys.argv)
try:
due = QTime.currentTime()
message = "Alert!"
29. 29 | P a g e
if len(sys.argv) <2:
raise ValueError
hours,minutes= sys.argv[1].split(":")
due = QTime(int(hours),int(minutes))
if not due.isValid():
raise ValueError
if len(sys.argv) >2:
message =" ".join(sys.argv[2:])
exceptValueError:
message = "usage:myalaram.pyHH:MM[optional message]"
while QTime.currentTime() <due:
time.sleep(10)
label = QLabel("<fontcolor=redsize=72><b>"+ message +"</b></font>")
label.setWindowFlags(Qt.SplashScreen)
label.show()
QTimer.singleShot(20000,app.quit)
app.exec_()
30. 30 | P a g e
SOURCECODE
importsys
fromPySide.QtCore import*
fromPySide.QtGui import*
frommath import*
classForm(QDialog):
def __init__(self,parent=None):
31. 31 | P a g e
super(Form,self).__init__(parent)
self.browser=QTextBrowser()
self.lineedit=QLineEdit("Typeanexpressionandpressenter")
self.lineedit.selectAll()
layout= QVBoxLayout()
layout.addWidget(self.browser)
layout.addWidget(self.lineedit)
self.setLayout(layout)
self.lineedit.setFocus()
self.connect(self.lineedit,SIGNAL("returnPressed()"),self.updateUi)
self.setWindowTitle("PYTHON_CALCULATOR")
def updateUi(self):
try:
text= self.lineedit.text()
self.browser.append("%s<b>%s</b>"%(text,eval(text)))
except:
self.browser.append("<fontcolor=red>%sisinvalid</font>"%text)
app = QApplication(sys.argv)
form= Form()
form.show()
app.exec_()
32. 32 | P a g e
3 WEB2PY FRAMEWORK
4 1.1 INTRODUCTION TO WEB2PY
web2py was created by Massimo Di Pierrro in 2008. Since its debut it has got a lot of track in
the Python and web develpment community. Projects developed with web2py
include http://rockiger.com, http://www.globaleaks.org, http://www.tenthrow.com.
Why is web2py so great for you or an aspiring internet billionair like John. web2py is 100% open-
source and licensed under the LGPL, this means you are allowed to use, copy und distribute web2py
for free, you can view and change the code as you wish, as long as you redistribute it under the
GPLv2 license. There is one exception to this limitation: all applications developed with web2py can
distributed under any license - including closed-source and commercial license. This way John is
able to hide his secret tuker app.
Another great advantage is the ease of use of web2py. It get's you started in no time and helps you to
get things done. web2py stands on the shoulders of giants (like Python and incorporates new trends
in web development very fast. Nonetheless web2py has not broken backwards compatibility since it's
first release in 2008 - a major feature of web2py.
Finally web2py has a helpful und very enthusiastic community that answers question on the web2py
mailinglist very fast and provides free applications, plugins for web2py andrecipes to common
web2py problems at a high rate.
33. 33 | P a g e
WHAT IS WEB2PY?
Created by a community of professionals and University professors in Computer Science and
Software Engineering.
Always backward compatible. We have not broken backward compatibility since version 1.0 in
2007, and we pledge not to break it in the future.
Easy to run. It requires no installation and no configuration.
Runs on Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web
hosting via Python 2.5/2.6/2.7, or Java with Jython.
Runs with Apache, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI,
WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware.
Talks to SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres,
and Google App Engine.
Secure It prevents the most common types of vulnerabilities including Cross Site Scripting,
Injection Flaws, and Malicious File Execution.
Enforces good Software Engineering practices (Model-View-Controller design, Server-side
form validation, postbacks) that make the code more readable, scalable, and maintainable.
Speaks multiple protocols HTML/XML, RSS/ATOM, RTF, PDF, JSON, AJAX, XML-RPC,
CSV, REST, WIKI, Flash/AMF, and Linked Data (RDF).
Includes an SSL-enabled and streaming-capable web server, a relational database, a web-
based integrated development environment and web-based management interface, a Database
Abstraction Layer that writes SQL for you in real time, internationalization support, multiple
authentication methods, role based access control, an error logging and ticketing system,
multiple caching methods for scalability, the jQuery library for AJAX and effects, and
a scaffolding application to jumpstart development.
The best way to understand web2pyis to tryit. You can try it online here (this online version is identical
to the actual web2py although some functions are disabled for security reasons).
web2py was inspired by Ruby on Rails and, as Rails, it focuses on rapid development and follows a
Model View Controller design. web2py differs from Rails because it is based on Python (thusit is faster
and more scalable), because it provides a comprehensive web-based administrative interface (thus
there is no need to ever type shell commands unless you wish), includes libraries to handle more
protocols (for example XML-RPC and RSS feeds), and can run on the Google App Engine.
web2py was also inspired by Django and, as Django,it has the ability to generate formsfrom database
tables and it includes an extensive set of validators. web2py differs from Django because it is more
compact, easier to learn and does not have any project-level configuration files.
34. 34 | P a g e
web2py is less verbose than Java-based frameworks and its syntax is much cleaner than PHP-based
frameworks. This makes applications simpler to develop, and easier to read and maintain.
Here is a features comparison of web2py vs other popular web frameworks.
web2py comes in source code version (for any Operating System that runs Python) and in binary
versions for OSX and Windows. web2py does not need to be installed. You unzip it, click on it, and
choose a one-time administrator password. It then opens the browser for you and directs you to the
administrative interface. Everything it needs to make this happen (the Python interpreter, the web -
server, the relational database, etc.) is already packaged with web2py. If you need more power you
customize your applicationsto use your preferred web-server (for example Apache) and your preferred
database engine (for example PostgreSQL or Oracle).
Via the admin interface you can upload a packed application, create a new application, design an
application, maintain an existing application, bytecode-compile an application, pack and download an
application. Everything can be done via the web-based admin interface, including editing the files that
comprise your applications, clearing temp files, browsing past tickets/errors,run tests,interact with the
database. If you so choose, it is also possible to interact with web2py via the Operating System shell
or the Python shell.
Any web2py application is comprised of Models (files that contain a description of the data
representation), Views (files that contain a description of the data presentation), Controllers (files that
contain a description of the business logic and workflow), Cron Jobs (tasks that need to be executed
regularly in background), Modules (collections of reusable classes and functions), and Static Files
(images, scripts, stylesheets, etc.).
Controllers consist of functions that are associated to a URL and are called when the associated URL
is visited. Models are executed before the function is called, independently on the visited URL (for
each app). Views are called when the function returns data other than a string, and renders the data
in the proper format (for example html).
A web2py application can be as simple as a single file (controllers/default.py) containing:
def index(): return "Hello World"
When http://localhost:8000/app/default/index is visited the function is called and it displays the
message "Hello World".
Here is a more complex complete application that lets the visitor upload images into a database:
In Model
1.
2.
3.
4.
db=DAL('sqlite://storage.db')
db.define_table('image',
Field('name', notnull=True),
Field('file','upload'))
35. 35 | P a g e
In Controller
1.
2.
3.
4.
5.
def index():
form = SQLFORM(db.image).process()
if form.accepted:
response.flash = 'image uploaded'
return locals()
In View
1.
2.
3.
{{extend 'layout.html'}}
<h1>Image upload form</h1>
{{=form}}
Uploaded images are safely renamed to avoid directory traversal vulnerabilities, stored on the
filesystem (or database) and a corresponding entry is inserted in the database, linking the file. A built-
in mechanism prevents involuntary double form submission. All DB IO is transaction safe by default.
Any exception in the code causes the transaction to rollback.
5 START YOUR ENGINES
To start download web2py from the download page and extracts the zip archive to your folder of
choice and open the web2py folder.
Now start web2py
on Windows double click on web2py.exe
on OS X double click on web2py.app
on Ubuntu (and any other Linux distro) double click on web2py.py and if there is an warning
message click on execute
36. 36 | P a g e
web2py shows you a splash screen and opens a little controll GUI, that asks you to choose an admin
password - then press "Start Server"
web2py opens your default web browser and you see the following screen
37. 37 | P a g e
Now click on Administrative interface, put your password in the form and submit.
38. 38 | P a g e
You then see admin interface: let's head over to the New simple application form and
insert first and click create.
After you created the application, you see the edit interface your first. It shows the: * the models *
the controllers * the views * the languages * the static files * the modules
39. 39 | P a g e
5.1.1 Say hello to the world
If you go to http://127.0.0.1:8000/first/default/index now you will see the welcome screen of
web2py again. "What. That's all?", you might say. web2py has created a new welcome app
for you - now let's customize it.
In the admin panel (http://127.0.0.1:8000/admin/default/design/first) click on the edit button left
beside "default.py" in the controllers section.
40. 40 | P a g e
Now you see the internal edit view of web2py, it show the default controller of our
application. Later we will use a real text editor to write code, but it's good to know, that you
can make quick changes via the admin interface.
Look out for:
1.return dict(message=T('Hello World'))
Change it to:
1.return dict(message=T('Hello World. I'm John. How are you?'))
Notic the Backslash () behind the I - this is important because Python uses ticks to
encapsulate Strings. Go on with clicking on the little disk symbol on the top or
pressing Ctrl + S.
41. 41 | P a g e
Let's look at our app. Go to http://127.0.0.1:8000/first/default/index. Notice the new headline.
Now let's go and edit the view: In the admin panel click on the edit button left beside the
"default/index.html" view. The same like with the controller you see the view now. Mind out
for:
1.<h1>{{=message}}</h1>
Here web2py renders our message from the controller, now look out for the Readme part
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
<h2>{{=T("Readme")}}</h2>
<ul>
<li>{{=T('Youare successfully running web2py')}}</li>
<li>{{=T('This is a copy of the scaffolding application')}}</li>
<li>{{=T('Youcan modify this application andadapt it to your needs')}}</li>
<li>{{=A(B(T("Administrative interface")),
_href=URL('admin','default','index'))}}</li>
<li>{{=A(T("Online examples"), _href=URL('examples','default','index'))}}</li>
<li><a href="http://web2py.com">web2py.com</a></li>
<li><a href="http://web2py.com/book">
{{=T('Documentation')}}</a></li>
</ul>
<ol>
<li>{{=T('Youvisited the url')}} {{=A(request.env.path_info,
_href=request.env.path_info)}}</li>
<li>{{=T('Which called the function')}} {{=A(request.function+'()',
_href='#')}} {{=T('locatedin the file')}}
{{=A('web2py/applications/%(application)s/controllers/
%(controller)s.py'%request,_href=URL('admin','default',
'peek', args=request.application,'controllers',
request.controller+'.py')))}}</li>
<li>{{=T('The output of the file is a dictionary that was rendered by the view')}}
{{=A('web2py/applications/%(application)s/views/%(controller)s/
index.html'%request,_href=URL('admin','default','peek',
args=(request.application,'views',request.controller,
'index.html')))}}</li>
</ol>
Delete everything from <ul> to </ol> then replace it with a text about John and his plans
to change the world:
1.
2.
3.
<h2>{{=T("Readme")}}</h2>
<p>Hi, I'm John. This is our first finger crunching on developing the
next killer website on the internet. Stay tuned for more information.</p>
Again save it and reload the page at http://127.0.0.1:8000/first/default/index.
6 DEPLOYING YOUR FIRST APP
Now with our great first app, it's time to deploy. This step is optional, but it's good practice to deploy
often, to check for problems early in the development process. There a many ways to deploy a
web2py app, at the moment my favorite is to use fluxflex.com. But you can use any web server with
Python installed and even use Google's App Engine. Look for the deployment recipies in the web2py
documentation.
42. 42 | P a g e
First we have to package first: Go to http://127.0.0.1:8000/admin/default/site (and eventually login),
click on Pack all in the first section, download the w2p-package.
Go to pythonanywhere.com, sign-up,
go to the Web tab, klick on the New Web2py App button, fill in your admin password and click on
the Next button. pythonanywhere creates your new project.
In the project overview click on Setup and on the Featured tab, search for web2py and clickInstall. It
takes a view seconds and web2py is installed. You can now click on the link at the top, to see your
installation.
43. 43 | P a g e
Now go to the website's admin interface
athttps://YOUR_USER_NAME.pythonanywhere.com/admin, notice the https - for security reasons
web2py doesn't let you log in without SSL-certification. Login with your admin password.
To install our first app, got to the Upload and install packed application section on the right side, give
your app a name (first), click the Choose File, select the w2p-file youdownloaded and click Install.
Tada, your first application is online, go tohttp://YOUR_USER_NAME.pythonanywhere.com to see
if everything looks alright - now you are done, your first website is online. John is proud of you.
7 ONE EDITOR TO RULE THEM ALL
A text editor is a program to write software source code. It is a bit like Word for computer
programms. There are plenty of great text editors and IDEs out there. For the sake of simplicity we
will use gedit. It works the same across all operating systems, has good Python and HTML support
(e.g. code highlighting) and it's easy to use.
44. 44 | P a g e
You can download gedit for Windows and OS X:
1. gedit for Windows
2. gedit for OS X
On Ubuntu (and most other Linux distros) gedit is already installed. If it is not installed use the
package manager of your distro to install it.
After Installation of gedit, go to Edit > Settings in the menu. In the View tab check all checkmarks;
in the Editor tab reduce tab width to 4 and again check all checkmarks; close the settings window.
45. 45 | P a g e
If you have choosen another editor or an IDE for your development work that is totally fine. But if
you are new to programming use gedit, it is a really powerful editor, that is easy to use.
7.1 INSTALLING PYTHON (OPTIONAL)
You don't need a Python installation to use web2py, but it helps if you want to use Python outside of
the web2py context.
Go to the download page on Python.org and download the newest Python 2.7.x installer for your
architecture (2.7.2 at the ti me of writing) and install it.
8 BROWSER WARS
As a browser we will use Firefox. For our purposes we will need the Firebug-Extension. Firebug
allows us to analyse webpages and inspect certain HTML elements.
Got to http://getfirebug.com an click the Install Firebug button, a few seconds later Firefox will
show you a warning, accept with Install Now.
You can toggle Firebug with F12 key. With Firebug you can now inspect the install button.
Press Ctrl-Shift-C and click the Install Firebug button. You should see this information about
the button:
the button is an a-Element (anker), that points to https://getfirebug.com/downloads
the styles of the button (color: #ffffff, etc.)
46. 46 | P a g e
Most other web browsers come with similar development tools build in, but no one measures up to
Firefox + Firebug in comfort and features.
There are several Firebug plugins for special web development purposes available, but for now the
basic setup is just fine.