Size: px
Start display at page:

Download ""

Transcription

1 1 of 15 1/2/ :30 PM Overview «Installation Werkzeug Tutorial API Levels» Table Of Contents Werkzeug Tutorial Welcome to the Werkzeug 0.5 tutorial in which we will create a TinyURL clone that stores URLs in a database. The libraries we will use for this applications are Jinja 2 for the templates, SQLAlchemy for the database layer and, of course, Werkzeug for the WSGI layer. The reasons why we ve decided on these libraries for the tutorial application is that we want to stick to some of the design decisions Django took in the past. One of them is using view functions instead of controller classes with action methods, which is common in Rails and Pylons, the other one is designer-friendly templates. The Werkzeug example folder contains a couple of applications that use other template engines, too, so you may want to have a look at them. There is also the source code of this application. You can use easy_install to install the required libraries: sudo easy_install Jinja2 sudo easy_install SQLAlchemy If you re on Windows, omit the sudo (and make sure, setuptools is installed); if you re on OS X, you can check if the libraries are also available in port; or on Linux, you can check out your package manager for packages called python-jinja2 and python-sqlalchemy. If you re curious, check out the online demo of the application. Part 0: The Folder Structure Before we can get started we have to create a Python package for our Werkzeug application and the folders for the templates and static files. This tutorial application is called shorty and the initial directory layout we will use looks like this: manage.py shorty/ init.py templates/ static/ The init.py and manage.py files should be empty for the time being. The first one makes shorty a Python package, the second one will hold our management utilities later.

2 2 of 15 1/2/ :30 PM Part 1: The WSGI Application Unlike Django or other frameworks, Werkzeug operates directly on the WSGI layer. There is no fancy magic that implements the central WSGI application for you. As a result of that the first thing you will do every time you write a Werkzeug application is implementing this basic WSGI application object. This can now either be a function or, even better, a callable class. A callable class has huge advantages over a function. For one you can pass it some configuration parameters and furthermore you can use inline WSGI middlewares. Inline WSGI middlewares are basically middlewares applied inside of our application object. This is a good idea for middlewares that are essential for the application (session middlewares, serving of media files etc.). Here the initial code for our shorty/application.py file which implements the WSGI application: from sqlalchemy import create_engine from werkzeug import Request, ClosingIterator from werkzeug.exceptions import HTTPException from shorty.utils import session, metadata, local, local_manager, url_map from shorty import views import shorty.models class Shorty(object): def init (self, db_uri): local.application = self self.database_engine = create_engine(db_uri, convert_unicode=true) def init_database(self): metadata.create_all(self.database_engine) def call (self, environ, start_response): local.application = self request = Request(environ) local.url_adapter = adapter = url_map.bind_to_environ(environ) try: endpoint, values = adapter.match() handler = getattr(views, endpoint) response = handler(request, **values) except HTTPException, e: response = e return ClosingIterator(response(environ, start_response), [session.remove, local_manager.cleanup]) That s a lot of code for the beginning! Let s go through it step by step. First we have a couple of imports: From SQLAlchemy we import a factory function that creates a new database engine for us. A database engine holds a pool of connections for us and manages them. The next few imports pull some objects into the namespace Werkzeug provides: a request object, a special iterator class that helps us cleaning up stuff at the request end and finally the base class for all HTTP exceptions. The next five imports are not working because we don t have the utils module written yet. However we should cover some of the objects already. The session object pulled from there is not a PHP-like

3 3 of 15 1/2/ :30 PM session object but a SQLAlchemy database session object. Basically a database session object keeps track of yet uncommited objects for the database. Unlike Django, an instantiated SQLAlchemy model is already tracked by the session! The metadata object is also an SQLAlchemy thing which is used to keep track of tables. We can use the metadata object to easily create all tables for the database and SQLAlchemy uses it to look up foreign keys and similar stuff. The local object is basically a thread local object created in the utility module for us. Every attribute on this object is bound to the current request and we can use this to implicitly pass objects around in a thread-safe way. The local_manager object ensures that all local objects it keeps track of are properly deleted at the end of the request. The last thing we import from there is the URL map which holds the URL routing information. If you know Django you can compare that to the url patterns you specify in the urls.py module, if you have used PHP so far it s comparable with some sort of built-in mod_rewrite. We import our views module which holds the view functions and then we import the models module which holds all of our models. Even if it looks like we don t use that import it s there so that all the tables are registered on the metadata properly. So let s have a look at the application class. The constructor of this class takes a database URI which is basically the type of the database and the login credentials or location of the database. For SQLite this is for example 'sqlite:////tmp/shorty.db' (note that these are four slashes). In the constructor we create a database engine for that database URI and use the convert_unicode parameter to tell SQLAlchemy that our strings are all unicode objects. Another thing we do here is binding the application to the local object. This is not really required but useful if we want to play with the application in a python shell. On application instanciation we have it bound to the current thread and all the database functions will work as expected. If we don t do that Werkzeug will complain that it s unable to find the database when it s creating a session for SQLAlchemy. The init_database function defined below can be used to create all the tables we use. And then comes the request dispatching function. In there we create a new request object by passing the environment to the Request constructor. Once again we bind the application to the local object, this time, however, we have to do this, otherwise things will break soon. Then we create a new URL map adapter by binding the URL map to the current WSGI environment. This basically looks at the environment of the incoming request information and fetches the information from the environment it requires. This is for example the name of the server for external URLs, the location of the script so that it can generate absolute paths if we use the URL builder. We also bind the adapter to the local object so that we can use it for URL generation in the utils module. After that we have a try/except that catches HTTP exceptions that could occur while matching or in the view function. When the adapter does not find a valid endpoint for our current request it will raise a NotFound exception which we can use like a response object. An endpoint is basically the name of the function we want to handle our request with. We just get the function with the name of the endpoint and pass it the request and the URL values.

4 4 of 15 1/2/ :30 PM At the end of the function we call the response object as WSGI application and pass the return value of this function (which will be an iterable) to the closing iterator class along with our cleanup callbacks (which remove the current SQLAlchemy session and clean up the data left in the local objects). As next step create two empty files shorty/views.py and shorty/models.py so that our imports work. We will fill the modules with useful code later. Part 2: The Utilities Now we have basically finished the WSGI application itself but we have to add some more code into our utiliy module so that the imports work. For the time being we just add the objects which we need for the application to work. All the following code goes into the shorty/utils.py file: from sqlalchemy import MetaData from sqlalchemy.orm import create_session, scoped_session from werkzeug import Local, LocalManager from werkzeug.routing import Map, Rule local = Local() local_manager = LocalManager([local]) application = local('application') metadata = MetaData() session = scoped_session(lambda: create_session(application.database_engine, transactional=true), local_manager.get_ident) url_map = Map() def expose(rule, **kw): def decorate(f): kw['endpoint'] = f. name url_map.add(rule(rule, **kw)) return f return decorate def url_for(endpoint, _external=false, **values): return local.url_adapter.build(endpoint, values, force_external=_external) First we again import a bunch of stuff, then we create the local objects and the local manager we already discussed in the section above. The new thing here is that calling a local object with a string returns a proxy object. This returned proxy object always points to the attribute with that name on the local object. For example application now points to local.application all the time. If you, however, try to do something with it and there is no object bound to local.application you will get a RuntimeError. The next three lines are basically everything we need to get SQLAlchemy 0.4 or higher running in a Werkzeug application. We create a new metadata for all of our tables and then a new scoped session using the scoped_session factory function. This basically tells SQLAlchemy to use the same algorithm to determine the current context as werkzeug local does and use the database engine of the current application. If we don t plan to add support for multiple instances of the application in the same python interpreter we can also simplify that code by not looking up the application on the current local object but

5 5 of 15 1/2/ :30 PM somewhere else. This approach is for example used by Django but makes it impossible to combine multiple such applications. The rest of the module is code we will use in our views. Basically the idea there is to use decorators to specify the URL dispatching rule for a view function rather than a central urls.py file like you could do in Django or a.htaccess for URL rewrites like you would do in PHP. This is one way to do it and there are countless of other ways to handle rule definitions. The url_for function, which we have there too, provides a simple way to generate URLs by endpoint. We will use it in the views and our model later. Intermission: And Now For Something Completely Different Now that we have finished the foundation for the application we could relax and do something completely different: management scripts. Most of the time you do similar tasks while developing. One of them is firing up a development server (If you re used to PHP: Werkzeug does not rely on Apache for development, it s perfectly fine and also recommended to use the wsgiref server that comes with python for development purposes), starting a python interpreter to play with the database models, initializing the database etc. Werkzeug makes it incredible easy to write such management scripts. The following piece of code implements a fully featured management script. Put it into the manage.py file you have created in the beginning: #!/usr/bin/env python from werkzeug import script def make_app(): from shorty.application import Shorty return Shorty('sqlite:////tmp/shorty.db') def make_shell(): from shorty import models, utils application = make_app() return locals() action_runserver = script.make_runserver(make_app, use_reloader=true) action_shell = script.make_shell(make_shell) action_initdb = lambda: make_app().init_database() script.run() werkzeug.script is explained in detail in the script documentation and we won t cover it here, most of the code should be self explaining anyway. What s important is that you should be able to run python manage.py shell to get an interactive Python interpreter without traceback. If you get an exception check the line number and compare your code with the code we have in the code boxes above. Also make sure that you have created the empty shorty/views.py and shorty/models.py files. To run your application for development purposes you can also use the manage script. Just execute this command from your command line:

6 6 of 15 1/2/ :30 PM python manage.py runserver The server will then listen on localhost:5000 for incoming requests and show your application. But we need to implement some more things before we can run the server without errors. Now that the script system is running we can start writing our database models. Part 3: Database Models Now we can create the models. Because the application is pretty simple we just have one model and table: from datetime import datetime from sqlalchemy import Table, Column, String, Boolean, DateTime from sqlalchemy.orm import mapper from shorty.utils import session, metadata, url_for, get_random_uid url_table = Table('urls', metadata, Column('uid', String(140), primary_key=true), Column('target', String(500)), Column('added', DateTime), Column('public', Boolean) ) class URL(object): query = session.query_property() def init (self, target, public=true, uid=none, added=none): self.target = target self.public = public self.added = added or datetime.utcnow() if not uid: while True: uid = get_random_uid() if not URL.query.get(uid): break self.uid = uid def short_url(self): return url_for('link', uid=self.uid, _external=true) def repr (self): return '<URL %r>' % self.uid mapper(url, url_table) This module is pretty straightforward. We import all the stuff we need from SQLAlchemy and create a table. Then we add a class for this table and we map them both together. For detailed explanations regarding SQLAlchemy you should have a look at the excellent tutorial. In the constructor we generate a unique ID until we find an id which is still free to use. What s missing is the get_random_uid function we have to add to the utils module:

7 7 of 15 1/2/ :30 PM from random import sample, randrange URL_CHARS = 'abcdefghijkmpqrstuvwxyzabcdefghijklmnpqrst ' def get_random_uid(): return ''.join(sample(url_chars, randrange(3, 9))) Once that is done we can use python manage.py initdb to initialize the database and play around with the stuff using python manage.py shell: >>> from shorty.models import session, URL Now we can add some URLs to the database: >>> urls = [URL(' URL(' >>> URL.query.all() [] >>> session.commit() >>> URL.query.all() [<URL '5cFbsk'>, <URL 'mpugst'>] As you can see we have to commit in order to send the urls to the database. Let s create a private item with a custom uid: >>> URL(' False, 'werkzeug-webpage') >>> session.commit() And query them all: >>> URL.query.filter_by(public=False).all() [<URL 'werkzeug-webpage'>] >>> URL.query.filter_by(public=True).all() [<URL '5cFbsk'>, <URL 'mpugst'>] >>> URL.query.get('werkzeug-webpage') <URL 'werkzeug-webpage'> Now that we have some data in the database and we are somewhat familiar with the way SQLAlchemy works, it s time to create our views. Part 4: The View Functions Now after some playing with SQLAlchemy we can go back to Werkzeug and start creating our view functions. The term view function is derived from Django which also calls the functions that render templates view functions. So our example is MTV (Model, View, Template) and not MVC (Model, View, Controller). They are probably the same but it s a lot easier to use the Django way of naming those things. For the beginning we just create a view function for new URLs and a function that displays a message about a new link. All that code goes into our still empty views.py file: from werkzeug import redirect from werkzeug.exceptions import NotFound from shorty.utils import session, render_template, expose, validate_url, \

8 8 of 15 1/2/ :30 PM url_for from shorty.models import def new(request): error = url = '' if request.method == 'POST': url = request.form.get('url') alias = request.form.get('alias') if not validate_url(url): error = "I'm sorry but you cannot shorten this URL." elif alias: if len(alias) > 140: error = 'Your alias is too long' elif '/' in alias: error = 'Your alias might not include a slash' elif URL.query.get(alias): error = 'The alias you have requested exists already' if not error: uid = URL(url, 'private' not in request.form, alias).uid session.commit() return redirect(url_for('display', uid=uid)) return render_template('new.html', error=error, def display(request, uid): url = URL.query.get(uid) if not url: raise NotFound() return render_template('display.html', def link(request, uid): url = URL.query.get(uid) if not url: raise NotFound() return redirect(url.target, defaults={'page': def list(request, page): pass Quite a lot of code again, but most of it is just plain old form validation. Basically we specify two functions: new and display and decorate them with our expose decorator from the utils. This decorator adds a new URL rule to the map by passing all parameters to the constructor of a rule object and setting the endpoint to the name of the function. So we can easily build URLs to those functions by using their name as endpoint. Keep in mind that this is not necessarily a good idea for bigger applications. In such cases it s encouraged to use the full import name with a common prefix as endpoint or something similar. Otherwise it becomes pretty confusing. The form validation in the new method is pretty straightforward. We check if the current method is

9 9 of 15 1/2/ :30 PM POST, if yes we get the data from the request and validate it. If there is no error we create a new URL object, commit it to the database and redirect to the display page. The display function is not much more complex. The URL rule expects a parameter called uid, which the function accepts. Then we look up the URL rule with the given uid and render a template by passing the URL object to it. If the URL does not exist we raise a NotFound exception which displays a generic 404 Page Not Found page. We can later replace it by a custom error page by catching that exception before the generic HTTPException in our WSGI application. The link view function is used by our models in the short_url property and is the short URL we provide. So if the URL uid is foobar the URL will be available as The list view function has not yet been written, we will do that later. But what s important is that this function takes a URL parameter which is optional. The first decorator tells Werkzeug that if just /page/ is requested it will assume that the page equals 1. Even more important is the fact that Werkzeug also normalizes the URLs. So if you requested /page or /page/1, you will be redirected to /page/ in both cases. This makes Google happy and comes for free. If you don t like that behavior, you can also disable it. And again we have imported two objects from the utils module that don t exist yet. One of those should render a jinja template into a response object, the other one validates a URL. So let s add those to utils.py: from os import path from urlparse import urlparse from werkzeug import Response from jinja2 import Environment, FileSystemLoader ALLOWED_SCHEMES = frozenset(['http', 'https', 'ftp', 'ftps']) TEMPLATE_PATH = path.join(path.dirname( file ), 'templates') jinja_env = Environment(loader=FileSystemLoader(TEMPLATE_PATH)) jinja_env.globals['url_for'] = url_for def render_template(template, **context): return Response(jinja_env.get_template(template).render(**context), mimetype='text/html') def validate_url(url): return urlparse(url)[0] in ALLOWED_SCHEMES That s it, basically. The validation function checks if our URL looks like an HTTP or FTP URL. We do this whitelisting to ensure nobody submits any dangerous JavaScript or similar URLs. The render_template function is not much more complicated either, it basically looks up a template on the file system in the templates folder and renders it as response. Another thing we do here is passing the url_for function into the global template context so that we can build URLs in the templates too. Now that we have our first two view functions it s time to add the templates.

10 10 of 15 1/2/ :30 PM Part 5: The Templates We have decided to use Jinja templates in this example. If you are used to Django templates you should feel at home, if you have worked with PHP so far you can compare the Jinja templates with smarty. If you have used PHP as templating language until now you should have a look at Mako for your next project. Security Warning: We are using Jinja here which is a text based template engine. As a matter of fact, Jinja has no idea what it is dealing with, so if you want to create HTML template it s your responsibility to escape all values that might include, at some point, any of the following characters: >, <, &, and ". As you can see from the examples below we don t escape URLs. The reason is that we won t have any ampersands in the URL and as such it s safe to omit it. For simplicity we will use HTML 4 in our templates. If you have already some experience with XHTML you can adopt the templates to XHTML. But keep in mind that the example stylesheet from below does not work with XHTML. One of the cool things Jinja inherited from Django is template inheritance. Template inheritance means that we can put often used elements into a base template and fill in placeholders. For example all the doctype and HTML base frame goes into a file called templates/layout.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " <html> <head> <title>shorty</title> </head> <body> <h1><a href="{{ url_for('new') }}">Shorty</a></h1> <div class="body">{% block body %}{% endblock %}</div> <div class="footer"> <a href="{{ url_for('new') }}">new</a> <a href="{{ url_for('list') }}">list</a> use shorty for good, not for evil </div> </body> </html> And we can inherit from this base template in our templates/new.html: {% extends 'layout.html' %} {% block body %} <h2>create a Shorty-URL!</h2> {% if error %}<div class="error">{{ error }}</div>{% endif -%} <form action="" method="post"> <p>enter the URL you want to shorten</p> <p><input type="text" name="url" id="url" value="{{ url e }}"></p> <p>optionally you can give the URL a memorable name</p> <p><input type="text" id="alias" name="alias">{# #}<input type="submit" id="submit" value="do!"></p> <p><input type="checkbox" name="private" id="private"> <label for="private">make this URL private, so don't list it</label></p> </form>

11 11 of 15 1/2/ :30 PM {% endblock %} If you re wondering about the comment between the two input elements, this is a neat trick to keep the templates clean but not create whitespace between those two. We ve prepared a stylesheet you can use which depends on not having a whitespace there. And then a second template for the display page (templates/display.html): {% extends 'layout.html' %} {% block body %} <h2>shortened URL</h2> <p> The URL {{ url.target urlize(40, true) }} was shortened to {{ url.short_url urlize }}. </p> {% endblock %} The urlize filter is provided by Jinja and translates a URL(s) in a text into clickable links. If you pass it an integer it will shorten the captions of those links to that number of characters, passing it true as second parameter adds a nofollow flag. Now that we have our first two templates it s time to fire up the server and look at those part of the application that work already: adding new URLs and getting redirected. Intermission: Adding The Design Now it s time to do something different: adding a design. Design elements are usually in static CSS stylesheets so we have to put some static files somewhere. But that s a little big tricky. If you have worked with PHP so far you have probably noticed that there is no such thing as translating the URL to filesystem paths and accessing static files right from the URL. You have to explicitly tell the webserver or our development server that some path holds static files. Django even recommends a separate subdomain and standalone server for the static files which is a terribly good idea for heavily loaded environments but somewhat of an overkill for this simple application. So here is the deal: We let our application host the static files, but in production mode you should probably tell the apache to serve those files by using an Alias directive in the apache config: Alias /static /path/to/static/files This will be a lot faster. But how do we tell our application that we want it to share the static folder from our application package as /static?. Fortunately that s pretty simple because Werkzeug provides a WSGI middleware for that. Now there are two ways to hook that middleware in. One way is to wrap the whole application in that middleware (we really don t recommend this one) and the other is to just wrap the dispatching function (much better because we don t lose the reference to the application object). So head back to application.py and do some code refactoring there. First of all you have to add a new import and calculate the path to the static files: from os import path

12 12 of 15 1/2/ :30 PM from werkzeug import SharedDataMiddleware STATIC_PATH = path.join(path.dirname( file ), 'static') It may be better to put the path calculation into the utils.py file because we already calculate the path to the templates there. But it doesn t really matter and for simplicity we can leave it in the application module. So how do we wrap our dispatching function? In theory we just have to say self. call = wrap(self. call ) but unfortunately that doesn t work in python. But it s not much harder. Just rename call to dispatch and add a new call method: def call (self, environ, start_response): return self.dispatch(environ, start_response) Now we can go into our init function and hook in the middleware by wrapping the dispatch method: self.dispatch = SharedDataMiddleware(self.dispatch, { }) '/static': STATIC_PATH Now that wasn t that hard. This way you can now hook in WSGI middlewares inside the application class! Another good idea now is to tell our url_map in the utils module the location of our static files by adding a rule. This way we can generate URLs to the static files in the templates: url_map = Map([Rule('/static/<file>', endpoint='static', build_only=true)]) Now we can open our templates/layout.html file again and add a link to the stylesheet style.css, which we are going to create afterwards: <link rel="stylesheet" type="text/css" href="{{ url_for('static', file='style.css') }}"> This of course goes into the <head> tag where currently just the title is. You can now design a nice layout for it or use the example stylesheet if you want. In both cases the file you have to create is called static/style.css Part 6: Listing Public URLs Now we want to list all of the public URLs on the list page. That shouldn t be a big problem but we will have to do some sort of pagination. Because if we print all URLs at once we have sooner or later an endless page that takes minutes to load. So let s start by adding a Pagination class into our utils module: from werkzeug import cached_property class Pagination(object): def init (self, query, per_page, page, endpoint):

13 13 of 15 1/2/ :30 PM self.query = query self.per_page = per_page self.page = page self.endpoint = def count(self): return def entries(self): return self.query.offset((self.page - 1) * self.per_page) \.limit(self.per_page).all() has_previous = property(lambda x: x.page > 1) has_next = property(lambda x: x.page < x.pages) previous = property(lambda x: url_for(x.endpoint, page=x.page - 1)) next = property(lambda x: url_for(x.endpoint, page=x.page + 1)) pages = property(lambda x: max(0, x.count - 1) // x.per_page + 1) This is a very simple class that does most of the pagination for us. We can pass at an unexecuted SQLAlchemy query, the number of items per page, the current page and the endpoint, which will be used for URL generation. The cached_property() decorator you see works pretty much like the normal property() decorator, just that it memorizes the result. We won t cover that class in detail but basically the idea is that accessing pagination.entries returns the items for the current page and that the other properties return meaningful values so that we can use them in the template. Now we can import the Pagination class into our views module and add some code to the list function: from shorty.utils import defaults={'page': def list(request, page): query = URL.query.filter_by(public=True) pagination = Pagination(query, 30, page, 'list') if pagination.page > 1 and not pagination.entries: raise NotFound() return render_template('list.html', pagination=pagination) The if condition in this function basically ensures that status code 404 is returned if we are not on the first page and there aren t any entries to display (Accessing something like /list/42 without entries on that page and not returning a 404 status code would be considered bad style.) And finally the template (templates/list.html): {% extends 'layout.html' %} {% block body %} <h2>list of URLs</h2> <ul> {%- for url in pagination.entries %} <li><a href="{{ url.short_url e }}">{{ url.uid e }}</a>»

14 14 of 15 1/2/ :30 PM <small>{{ url.target urlize(38, true) }}</small></li> {%- else %} <li><em>no URls shortened yet</em></li> {%- endfor %} </ul> <div class="pagination"> {%- if pagination.has_previous %}<a href="{{ pagination.previous }}">«Previous</a> {%- else %}<span class="inactive">«previous</span>{% endif %} {{ pagination.page }} {% if pagination.has_next %}<a href="{{ pagination.next }}">Next»</a> {%- else %}<span class="inactive">next»</span>{% endif %} </div> {% endblock %} The End Result And this is what it looks like in the end, with the example stylesheet from above: Bonus: Styling 404 Error Pages Now that we ve finished our application we can do some small improvements such as custom 404 error pages. That s pretty simple. The first thing we have to do is creating a new function called not_found in the view that renders a template: def not_found(request):

15 15 of 15 1/2/ :30 PM return render_template('not_found.html') Then we have to go into our application module and import the NotFound exception: from werkzeug.exceptions import NotFound Finally we have to catch it and translate it into a response. This except block goes right before the except block of the HTTPException: try:... # this stays the same except NotFound, e: response = views.not_found(request) response.status_code = 404 except HTTPException, e:... # this stays the same Now add a template templates/not_found.html and you re done: {% extends 'layout.html' %} {% block body %} <h2>page Not Found</h2> <p> The page you have requested does not exist on this server. What about <a href="{{ url_for('new') }}">adding a new URL</a>? </p> {% endblock %} Outro This tutorial covers everything you need to get started with Werkzeug, SQLAlchemy and Jinja and should help you find the best solution for your application. For some more complex examples that also use different setups and ideas for dispatching have a look at the examples folder. Have fun with Werkzeug! Copyright 2008 by the Pocoo Team, documentation generated by Sphinx

The Swiss-Army Knife for Python Web Developers. Armin Ronacher

The Swiss-Army Knife for Python Web Developers. Armin Ronacher The Swiss-Army Knife for Python Web Developers Armin Ronacher http://lucumr.pocoo.org/ About Me About Me Name: Armin Ronacher Werkzeug, Jinja, Pygments, ubuntuusers.de Python since 2005 WSGI warrior since

More information

LECTURE 14. Web Frameworks

LECTURE 14. Web Frameworks LECTURE 14 Web Frameworks WEB DEVELOPMENT CONTINUED Web frameworks are collections of packages or modules which allow developers to write web applications with minimal attention paid to low-level details

More information

web.py Tutorial Tom Kelliher, CS 317 This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment.

web.py Tutorial Tom Kelliher, CS 317 This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment. web.py Tutorial Tom Kelliher, CS 317 1 Acknowledgment This tutorial is the tutorial from the web.py web site, with a few revisions for our local environment. 2 Starting So you know Python and want to make

More information

HOW TO FLASK. And a very short intro to web development and databases

HOW TO FLASK. And a very short intro to web development and databases HOW TO FLASK And a very short intro to web development and databases FLASK Flask is a web application framework written in Python. Created by an international Python community called Pocco. Based on 2

More information

Building a Django Twilio Programmable Chat Application

Building a Django Twilio Programmable Chat Application Building a Django Twilio Programmable Chat Application twilio.com/blog/08/0/python-django-twilio-programmable-chat-application.html March 7, 08 As a developer, I ve always wanted to include chat capabilities

More information

Django urls Django Girls Tutorial

Django urls Django Girls Tutorial Django urls Django Girls Tutorial about:reader?url=https://tutorial.djangogirls.org/en/django_urls/ 1 di 6 13/11/2017, 20:01 tutorial.djangogirls.org Django urls Django Girls Tutorial DjangoGirls 6-8 minuti

More information

A Sample Approach to your Project

A Sample Approach to your Project A Sample Approach to your Project An object-oriented interpreted programming language Python 3 :: Flask :: SQLite3 A micro web framework written in Python A public domain, barebones SQL database system

More information

Without Django. applying django principles to non django projects

Without Django. applying django principles to non django projects Without Django applying django principles to non django projects I Love Django Using Django since the very first release I love the templates (so much that I rewrote the templating engine twice) Often

More information

Google App Engine Using Templates

Google App Engine Using Templates Google App Engine Using Templates Charles Severance and Jim Eng csev@umich.edu jimeng@umich.edu Textbook: Using Google App Engine, Charles Severance Unless otherwise noted, the content of this course material

More information

CIS192 Python Programming

CIS192 Python Programming CIS192 Python Programming Web Servers and Web APIs Raymond Yin University of Pennsylvania November 12, 2015 Raymond Yin (University of Pennsylvania) CIS 192 November 12, 2015 1 / 23 Outline 1 Web Servers

More information

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul CIS192 Python Programming Web Frameworks and Web APIs Harry Smith University of Pennsylvania March 29, 2016 Harry Smith (University of Pennsylvania) CIS 192 March 29, 2016 1 / 25 Quick housekeeping Last

More information

Building Web Applications

Building Web Applications Building Web Applications Ambient intelligence Fulvio Corno Politecnico di Torino, 2017/2018 Goal Create simple web applications In Python For interactive interfaces For server-side components Learn a

More information

Building a Python Flask Website A beginner-friendly guide

Building a Python Flask Website A beginner-friendly guide Building a Python Flask Website A beginner-friendly guide PythonHow.com Copyright 2016 PythonHow.com. All rights reserved. 1 Preface This book contains a quick guide on understanding and using the Python

More information

Django Test Utils Documentation

Django Test Utils Documentation Django Test Utils Documentation Release 0.3 Eric Holscher July 22, 2016 Contents 1 Source Code 3 2 Contents 5 2.1 Django Testmaker............................................ 5 2.2 Django Crawler.............................................

More information

nacelle Documentation

nacelle Documentation nacelle Documentation Release 0.4.1 Patrick Carey August 16, 2014 Contents 1 Standing on the shoulders of giants 3 2 Contents 5 2.1 Getting Started.............................................. 5 2.2

More information

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change

Chapter01.fm Page 1 Monday, August 23, :52 PM. Part I of Change. The Mechanics. of Change Chapter01.fm Page 1 Monday, August 23, 2004 1:52 PM Part I The Mechanics of Change The Mechanics of Change Chapter01.fm Page 2 Monday, August 23, 2004 1:52 PM Chapter01.fm Page 3 Monday, August 23, 2004

More information

The State of Python. and the web. Armin Ronacher

The State of Python. and the web. Armin Ronacher The State of Python and the web Armin Ronacher // @mitsuhiko Who am I Armin Ronacher (@mitsuhiko) Founding Member of the Pocoo Team we're doing Jinja2, Werkzeug, Flask, Pygments, Sphinx and a bunch of

More information

Tomasz Szumlak WFiIS AGH 23/10/2017, Kraków

Tomasz Szumlak WFiIS AGH 23/10/2017, Kraków Python in the Enterprise Django Intro Tomasz Szumlak WFiIS AGH 23/10/2017, Kraków Going beyond Django is a Web framework very popular! It is not the only one, and cannot do wonders There are many others:

More information

29-27 May 2013 CERN WEB FRAMEWORKS. Adrian Mönnich

29-27 May 2013 CERN WEB FRAMEWORKS. Adrian Mönnich First Indico Workshop 29-27 May 2013 CERN WEB FRAMEWORKS Adrian Mönnich Framework? What? Do we have one? Do we need one? A web application framework is a software framework that is designed to support

More information

If Statements, For Loops, Functions

If Statements, For Loops, Functions Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

More information

django-xross Documentation

django-xross Documentation django-xross Documentation Release 0.6.0 Igor idle sign Starikov Jan 14, 2018 Contents 1 Description 3 2 Requirements 5 3 Table of Contents 7 3.1 Quickstart................................................

More information

Python web frameworks

Python web frameworks Flask Python web frameworks Django Roughly follows MVC pattern Steeper learning curve. Flask Initially an April Fools joke Micro -framework: minimal approach. Smaller learning curve http://flask.pocoo.org/docs/0.12/quickstart/#a-minimalapplication

More information

CIS192 Python Programming

CIS192 Python Programming CIS192 Python Programming Web Servers and Web APIs Eric Kutschera University of Pennsylvania March 6, 2015 Eric Kutschera (University of Pennsylvania) CIS 192 March 6, 2015 1 / 22 Outline 1 Web Servers

More information

HTML 5 Form Processing

HTML 5 Form Processing HTML 5 Form Processing In this session we will explore the way that data is passed from an HTML 5 form to a form processor and back again. We are going to start by looking at the functionality of part

More information

LECTURE 14. Web Frameworks

LECTURE 14. Web Frameworks LECTURE 14 Web Frameworks WEB DEVELOPMENT CONTINUED Web frameworks are collections of packages or modules which allow developers to write web applications with minimal attention paid to low-level details

More information

Quick.JS Documentation

Quick.JS Documentation Quick.JS Documentation Release v0.6.1-beta Michael Krause Jul 22, 2017 Contents 1 Installing and Setting Up 1 1.1 Installation................................................ 1 1.2 Setup...................................................

More information

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. TurboGears

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. TurboGears About the Tutorial TurboGears is a Python web application framework, which consists of many modules. It is designed around the MVC architecture that are similar to Ruby on Rails or Struts. TurboGears are

More information

Django PAM Documentation

Django PAM Documentation Django PAM Documentation Release 1.4.1 Carl J. Nobile Aug 01, 2018 Contents 1 Contents 3 1.1 Installation................................................ 3 1.2 Configuration...............................................

More information

Unifer Documentation. Release V1.0. Matthew S

Unifer Documentation. Release V1.0. Matthew S Unifer Documentation Release V1.0 Matthew S July 28, 2014 Contents 1 Unifer Tutorial - Notes Web App 3 1.1 Setting up................................................. 3 1.2 Getting the Template...........................................

More information

micawber Documentation

micawber Documentation micawber Documentation Release 0.3.4 charles leifer Nov 29, 2017 Contents 1 examples 3 2 integration with web frameworks 5 2.1 Installation................................................ 5 2.2 Getting

More information

Microservice Splitting the Monolith. Software Engineering II Sharif University of Technology MohammadAmin Fazli

Microservice Splitting the Monolith. Software Engineering II Sharif University of Technology MohammadAmin Fazli Microservice Software Engineering II Sharif University of Technology MohammadAmin Fazli Topics Seams Why to split the monolith Tangled Dependencies Splitting and Refactoring Databases Transactional Boundaries

More information

pynojo Documentation Release unknown pynojo development team

pynojo Documentation Release unknown pynojo development team pynojo Documentation Release unknown pynojo development team November 05, 2013 Contents i ii Welcome! This documentation is generated on November 05, 2013 for pynojo unknown. Contents: Contents 1 2 Contents

More information

Free Web Development Tools: The Accessibility Toolbar

Free Web Development Tools: The Accessibility Toolbar Free Web Development Tools: The Accessibility Toolbar Free Web Development Tools: The Accessibility Toolbar By Many people find that learning a new web language like CSS or XHTML is tricky from a book

More information

Bishop Blanchet Intranet Documentation

Bishop Blanchet Intranet Documentation Bishop Blanchet Intranet Documentation Release 1.0 Luis Naranjo December 11, 2013 Contents 1 What is it? 1 2 LDAP Authentication 3 3 Types of users 5 3.1 Super user................................................

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

Django Admin Sortable Documentation

Django Admin Sortable Documentation Django Admin Sortable Documentation Release 1.7.0 Brandon Taylor September 28, 2016 Contents 1 Supported Django Versions 3 1.1 Django 1.4.x............................................... 3 1.2 Django

More information

Static Webpage Development

Static Webpage Development Dear Student, Based upon your enquiry we are pleased to send you the course curriculum for PHP Given below is the brief description for the course you are looking for: - Static Webpage Development Introduction

More information

Node.js. Node.js Overview. CS144: Web Applications

Node.js. Node.js Overview. CS144: Web Applications Node.js Node.js Overview JavaScript runtime environment based on Chrome V8 JavaScript engine Allows JavaScript to run on any computer JavaScript everywhere! On browsers and servers! Intended to run directly

More information

Web Mechanisms. Draft: 2/23/13 6:54 PM 2013 Christopher Vickery

Web Mechanisms. Draft: 2/23/13 6:54 PM 2013 Christopher Vickery Web Mechanisms Draft: 2/23/13 6:54 PM 2013 Christopher Vickery Introduction While it is perfectly possible to create web sites that work without knowing any of their underlying mechanisms, web developers

More information

Joopal and Drumla. Sam Moffatt, Joomla! September 13, 2009

Joopal and Drumla. Sam Moffatt, Joomla! September 13, 2009 Joopal and Drumla Sam Moffatt, Joomla! September 13, 2009 1 Introduction Joopal and Drumla grew out of a curiousity of mine. I wondered if it would be possible to integrate Drupal 6 into Joomla! 1.5 (hence

More information

CIT 590 Homework 5 HTML Resumes

CIT 590 Homework 5 HTML Resumes CIT 590 Homework 5 HTML Resumes Purposes of this assignment Reading from and writing to files Scraping information from a text file Basic HTML usage General problem specification A website is made up of

More information

Flask Web Development Course Catalog

Flask Web Development Course Catalog Flask Web Development Course Catalog Enhance Your Contribution to the Business, Earn Industry-recognized Accreditations, and Develop Skills that Help You Advance in Your Career March 2018 www.iotintercon.com

More information

SYMFONY2 WEB FRAMEWORK

SYMFONY2 WEB FRAMEWORK 1 5828 Foundations of Software Engineering Spring 2012 SYMFONY2 WEB FRAMEWORK By Mazin Hakeem Khaled Alanezi 2 Agenda Introduction What is a Framework? Why Use a Framework? What is Symfony2? Symfony2 from

More information

RedBarrel Documentation

RedBarrel Documentation RedBarrel Documentation Release 1.0 2011, Tarek Ziadé August 08, 2011 CONTENTS 1 What s RedBarrel? 3 1.1 Anatomy of a Web Service........................................ 3 1.2 The RBR DSL..............................................

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel About the Tutorial Laravel is a powerful MVC PHP framework, designed for developers who need a simple and elegant toolkit to create full-featured web applications. Laravel was created by Taylor Otwell.

More information

Watson - DB. Release 2.7.0

Watson - DB. Release 2.7.0 Watson - DB Release 2.7.0 Jan 15, 2018 Contents 1 Build Status 3 2 Dependencies 5 3 Installation 7 4 Testing 9 5 Contributing 11 6 Table of Contents 13 6.1 Usage...................................................

More information

Django with Python Course Catalog

Django with Python Course Catalog Django with Python Course Catalog Enhance Your Contribution to the Business, Earn Industry-recognized Accreditations, and Develop Skills that Help You Advance in Your Career March 2018 www.iotintercon.com

More information

DATABASE SYSTEMS. Introduction to web programming. Database Systems Course, 2016

DATABASE SYSTEMS. Introduction to web programming. Database Systems Course, 2016 DATABASE SYSTEMS Introduction to web programming Database Systems Course, 2016 AGENDA FOR TODAY Client side programming HTML CSS Javascript Server side programming: PHP Installing a local web-server Basic

More information

15-498: Distributed Systems Project #1: Design and Implementation of a RMI Facility for Java

15-498: Distributed Systems Project #1: Design and Implementation of a RMI Facility for Java 15-498: Distributed Systems Project #1: Design and Implementation of a RMI Facility for Java Dates of Interest Assigned: During class, Friday, January 26, 2007 Due: 11:59PM, Friday, February 13, 2007 Credits

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

Python StatsD Documentation

Python StatsD Documentation Python StatsD Documentation Release 3.2.2 James Socol Dec 15, 2017 Contents 1 Installing 3 2 Contents 5 2.1 Configuring Statsd............................................ 5 2.2 Data Types................................................

More information

The Pyramid Web Application Development Framework

The Pyramid Web Application Development Framework The Pyramid Web Application Development Framework www.pylonsproject.org Martin Geisler Dealini July 4th, 2013 1 / 20 Outline Introduction Handling a Request Routes Views Renderers Mako Templates Conclusion

More information

MIT AITI Python Software Development Lab DJ1:

MIT AITI Python Software Development Lab DJ1: MIT AITI Python Software Development Lab DJ1: This lab will help you get Django installed and write your first application. 1 Each person in your group must complete this lab and have it checked off. Make

More information

Web Hosting. Important features to consider

Web Hosting. Important features to consider Web Hosting Important features to consider Amount of Storage When choosing your web hosting, one of your primary concerns will obviously be How much data can I store? For most small and medium web sites,

More information

Bricks Documentation. Release 1.0. Germano Guerrini

Bricks Documentation. Release 1.0. Germano Guerrini Bricks Documentation Release 1.0 Germano Guerrini January 27, 2015 Contents 1 Requirements 3 2 Contents 5 2.1 Getting Started.............................................. 5 2.2 Basic Usage...............................................

More information

Hellerstein/Olston. Homework 6: Database Application. beartunes. 11:59:59 PM on Wednesday, December 6 th

Hellerstein/Olston. Homework 6: Database Application. beartunes. 11:59:59 PM on Wednesday, December 6 th Homework 6: Database Application beartunes Due @ 11:59:59 PM on Wednesday, December 6 th Overview For this assignment, you ll be implementing portions of a database-backed web application using Ruby on

More information

One of the fundamental kinds of websites that SharePoint 2010 allows

One of the fundamental kinds of websites that SharePoint 2010 allows Chapter 1 Getting to Know Your Team Site In This Chapter Requesting a new team site and opening it in the browser Participating in a team site Changing your team site s home page One of the fundamental

More information

CPSC 481: CREATIVE INQUIRY TO WSBF

CPSC 481: CREATIVE INQUIRY TO WSBF CPSC 481: CREATIVE INQUIRY TO WSBF J. Yates Monteith, Fall 2013 Schedule HTML and CSS PHP HTML Hypertext Markup Language Markup Language. Does not execute any computation. Marks up text. Decorates it.

More information

CID Documentation. Release Francis Reyes

CID Documentation. Release Francis Reyes CID Documentation Release 0.2.0 Francis Reyes Sep 30, 2017 Contents 1 Django Correlation IDs 1 1.1 Features.................................................. 1 Python Module Index 9 i ii CHAPTER 1 Django

More information

CS50 Quiz Review. November 13, 2017

CS50 Quiz Review. November 13, 2017 CS50 Quiz Review November 13, 2017 Info http://docs.cs50.net/2017/fall/quiz/about.html 48-hour window in which to take the quiz. You should require much less than that; expect an appropriately-scaled down

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

More information

Flask Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : May, More documents are freely available at PythonDSP

Flask Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : May, More documents are freely available at PythonDSP Flask Guide Meher Krishna Patel Created on : Octorber, 017 Last updated : May, 018 More documents are freely available at PythonDSP Table of contents Table of contents i 1 Flask 1 1.1 Introduction.................................................

More information

CSCI 204 Introduction to Computer Science II. Lab 6: Stack ADT

CSCI 204 Introduction to Computer Science II. Lab 6: Stack ADT CSCI 204 Introduction to Computer Science II 1. Objectives In this lab, you will practice the following: Learn about the Stack ADT Implement the Stack ADT using an array Lab 6: Stack ADT Use a Stack to

More information

How the Internet Works

How the Internet Works How the Internet Works The Internet is a network of millions of computers. Every computer on the Internet is connected to every other computer on the Internet through Internet Service Providers (ISPs).

More information

Ruby on Rails Welcome. Using the exercise files

Ruby on Rails Welcome. Using the exercise files Ruby on Rails Welcome Welcome to Ruby on Rails Essential Training. In this course, we're going to learn the popular open source web development framework. We will walk through each part of the framework,

More information

Lotus IT Hub. Module-1: Python Foundation (Mandatory)

Lotus IT Hub. Module-1: Python Foundation (Mandatory) Module-1: Python Foundation (Mandatory) What is Python and history of Python? Why Python and where to use it? Discussion about Python 2 and Python 3 Set up Python environment for development Demonstration

More information

STARCOUNTER. Technical Overview

STARCOUNTER. Technical Overview STARCOUNTER Technical Overview Summary 3 Introduction 4 Scope 5 Audience 5 Prerequisite Knowledge 5 Virtual Machine Database Management System 6 Weaver 7 Shared Memory 8 Atomicity 8 Consistency 9 Isolation

More information

Things to note: Each week Xampp will need to be installed. Xampp is Windows software, similar software is available for Mac, called Mamp.

Things to note: Each week Xampp will need to be installed. Xampp is Windows software, similar software is available for Mac, called Mamp. Tutorial 8 Editor Brackets Goals Introduction to PHP and MySql. - Set up and configuration of Xampp - Learning Data flow Things to note: Each week Xampp will need to be installed. Xampp is Windows software,

More information

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

Flask-MongoEngine Documentation

Flask-MongoEngine Documentation Flask-MongoEngine Documentation Release 0.9.5 Ross Lawley Feb 16, 2018 Contents 1 Installing Flask-MongoEngine 3 2 Configuration 5 3 Custom Queryset 7 4 MongoEngine and WTForms 9 4.1 Supported fields.............................................

More information

LECTURE 15. Web Servers

LECTURE 15. Web Servers LECTURE 15 Web Servers DEPLOYMENT So, we ve created a little web application which can let users search for information about a country they may be visiting. The steps we ve taken so far: 1. Writing the

More information

Using GitHub to Share with SparkFun a

Using GitHub to Share with SparkFun a Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing

More information

& ( ); INSERT INTO ( ) SELECT

& ( ); INSERT INTO ( ) SELECT Oracle apex array Craig is a Development Consultant at Explorer. Craig has an MSc in Computing Science and is an experienced software engineer, utilising development tools such as PL/SQL and APEX to provide

More information

Web pages are a complex undertaking. The basic web page itself isn t

Web pages are a complex undertaking. The basic web page itself isn t Chapter 1 : Managing Your Servers In This Chapter Understanding the client/server relationship Reviewing tools for client-side development Gathering server-side development tools Installing a local server

More information

wagtailtrans Documentation

wagtailtrans Documentation wagtailtrans Documentation Release 0.1.0 LUKKIEN Jul 27, 2018 Contents 1 Table of contents 3 1.1 Getting started.............................................. 3 1.2 Migrate your existing Wagtail site....................................

More information

Implementing a Numerical Data Access Service

Implementing a Numerical Data Access Service Implementing a Numerical Data Access Service Andrew Cooke October 2008 Abstract This paper describes the implementation of a J2EE Web Server that presents numerical data, stored in a database, in various

More information

Classes, interfaces, & documentation. Review of basic building blocks

Classes, interfaces, & documentation. Review of basic building blocks Classes, interfaces, & documentation Review of basic building blocks Objects Data structures literally, storage containers for data constitute object knowledge or state Operations an object can perform

More information

Introduction of Laravel and creating a customized framework out of its packages

Introduction of Laravel and creating a customized framework out of its packages Introduction of Laravel and creating a customized framework out of its packages s.farshad.k@gmail.co m Presents By : Sayed-Farshad Kazemi For : Software Free Day Fall 2016 @farshadfeli x @s.farshad.k @farshad92

More information

Seshat Documentation. Release Joshua P Ashby

Seshat Documentation. Release Joshua P Ashby Seshat Documentation Release 1.0.0 Joshua P Ashby Apr 05, 2017 Contents 1 A Few Minor Warnings 3 2 Quick Start 5 2.1 Contributing............................................... 5 2.2 Doc Contents...............................................

More information

CSCI 1320 Creating Modern Web Applications. Content Management Systems

CSCI 1320 Creating Modern Web Applications. Content Management Systems CSCI 1320 Creating Modern Web Applications Content Management Systems Brown CS Website 2 Static Brown CS Website Up since 1994 5.9 M files (inodes) 1.6 TB of filesystem space 3 Static HTML Generators Convert

More information

Signals Documentation

Signals Documentation Signals Documentation Release 0.1 Yeti November 22, 2015 Contents 1 Quickstart 1 2 What is Signals? 3 3 Contents 5 3.1 Get Started................................................ 5 3.2 Try the Demo Server...........................................

More information

Biocomputing II Coursework guidance

Biocomputing II Coursework guidance Biocomputing II Coursework guidance I refer to the database layer as DB, the middle (business logic) layer as BL and the front end graphical interface with CGI scripts as (FE). Standardized file headers

More information

django-sekizai Documentation

django-sekizai Documentation django-sekizai Documentation Release 0.6.1 Jonas Obrist September 23, 2016 Contents 1 About 3 2 Dependencies 5 3 Usage 7 3.1 Configuration............................................... 7 3.2 Template

More information

Hyper- Any time any where go to any web pages. Text- Simple Text. Markup- What will you do

Hyper- Any time any where go to any web pages. Text- Simple Text. Markup- What will you do HTML Interview Questions and Answers What is HTML? Answer1: HTML, or HyperText Markup Language, is a Universal language which allows an individual using special code to create web pages to be viewed on

More information

CSE : Python Programming

CSE : Python Programming CSE 399-004: Python Programming Lecture 2: Data, Classes, and Modules January 22, 2007 http://www.seas.upenn.edu/~cse39904/ Administrative things Teaching assistant Brian Summa (bsumma @ seas.upenn.edu)

More information

widgetjs Documentation

widgetjs Documentation widgetjs Documentation Release 1.2.3 Nicolas Vanhoren Dec 22, 2017 Contents 1 Tutorial 3 1.1 Presentation of widgetjs......................................... 3 1.2 Quickstart................................................

More information

Getting Django Set Up Using a Functional Test

Getting Django Set Up Using a Functional Test CHAPTER 1 Getting Django Set Up Using a Functional Test TDD isn t something that comes naturally. It s a discipline, like a martial art, and just like in a Kung-Fu movie, you need a bad-tempered and unreasonable

More information

CherryPy on Apache2 with mod_python

CherryPy on Apache2 with mod_python Revision History CherryPy on Apache2 with mod_python Revision 1.5 November 9, 2009 Revised by: FB Ferry Boender 1. Introduction I ve recently written a web application using Python using the following

More information

Django CBTools Documentation

Django CBTools Documentation Django CBTools Documentation Release 1.2.0 Viacheslav Iutin August 05, 2016 Contents 1 Installation 3 1.1 Pre-requisite............................................... 3 1.2 Requirements...............................................

More information

kiss.py Documentation

kiss.py Documentation kiss.py Documentation Release 0.3.3 Stanislav Feldman January 15, 2015 Contents 1 Contents 3 1.1 Overview................................................. 3 1.2 Installation................................................

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

Site Audit SpaceX

Site Audit SpaceX Site Audit 217 SpaceX Site Audit: Issues Total Score Crawled Pages 48 % -13 3868 Healthy (649) Broken (39) Have issues (276) Redirected (474) Blocked () Errors Warnings Notices 4164 +3311 1918 +7312 5k

More information

Site Audit Boeing

Site Audit Boeing Site Audit 217 Boeing Site Audit: Issues Total Score Crawled Pages 48 % 13533 Healthy (3181) Broken (231) Have issues (9271) Redirected (812) Errors Warnings Notices 15266 41538 38 2k 5k 4 k 11 Jan k 11

More information

CSC309 Winter Lecture 2. Larry Zhang

CSC309 Winter Lecture 2. Larry Zhang CSC309 Winter 2016 Lecture 2 Larry Zhang 1 Announcements Assignment 1 is out, due Jan 25, 10pm. Start Early! Work in groups of 2, make groups on MarkUs. Make sure you can login to MarkUs, if not let me

More information

Which is why we ll now be learning how to write in CSS (or cascading sheet style)

Which is why we ll now be learning how to write in CSS (or cascading sheet style) STYLE WITH CSS My word is changing things in HTML difficult! Can you imagine if we had to do that for every single thing we wanted to change? It would be a nightmare! Which is why we ll now be learning

More information

fragapy Documentation

fragapy Documentation fragapy Documentation Release 1.0 2011, Fragaria, s.r.o November 09, 2011 CONTENTS 1 Adminhelp 3 2 Amazon 5 2.1 AWS branded scripts........................................... 5 2.2 SES SMTP relay.............................................

More information

Can t Believe It s Linux. a totally different and hypothetical linux distribution

Can t Believe It s Linux. a totally different and hypothetical linux distribution Can t Believe It s Linux a totally different and hypothetical linux distribution What s the Situation? ubuntu is doing pretty well OS X is doing a lot better crap is actually pretty cool nobody cares about

More information

Mailform Protector for Umbraco manual

Mailform Protector for Umbraco manual Mailform Protector for Umbraco manual v1.02 15.10.2010 By member of Table of Content Table of Content...1 About Mailform Protector...2 The problem...2 Why CAPTCHA is not the solution?...2 Our solution...2

More information

HTML and CSS a further introduction

HTML and CSS a further introduction HTML and CSS a further introduction By now you should be familiar with HTML and CSS and what they are, HTML dictates the structure of a page, CSS dictates how it looks. This tutorial will teach you a few

More information

Website Design and Development CSCI 311

Website Design and Development CSCI 311 Website Design and Development CSCI 311 Learning Objectives Understand good practices in designing and developing web sites Learn some of the challenges web design Activity In pairs: describe how you d

More information