Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems
 

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Python module Y306
The Django web framework
Exercises, examples and other material relating to training module Y306. This topic is presented on public course %dj%

Background
Django is a web framework. It's code which is written in python which lets you create, customise and maintain web sites, where the data is (usually) stored in a database, and the look and feel of the pages is (usually) held in a template. By keeping the appearance of the web site separate from the underlying information it presents, you can look after each of the elements independently. Furthermore, Django uses "DRY" (don't repeat yourself) principles so that a single amendment to your data, or to your template, allows the change to propogate through all effected pages without any requirement for repeated (bulk?) editing.
Articles and tips on this subjectupdated
4095Django - first steps - Updated
What is Django / What is a Web Framework? Many web applications have the same elements - a look and feel (the view, logic that works with the data, usually in a database (the model), something to handle incoming URLs and run the appropriate piece of logic (a router) and bespoke glue in the middle that ...
2013-05-25
(longest)
4013Web Frameworks - nested templates
There are times when an inversion of long-accepted logic makes sense. I've been working in a many-floored office block in Salford this week, with a bank of lifts to travel between floors. Rather than press a button for your floor once you're in the lift, you press a button in the lift lobby when you ...
2013-02-23
 
3919What is a web framework?
When you write web applications, there are many features you'll need which mirror features other people have needed too. Now - there's nothing to stop you writing your own code (maybe in Ruby, Python or Perl) including these features ... but wouldn't it be better to use the feature set that someone ...
2012-11-17
 
3705Django Training Courses - UK
We run regular public Python courses - for newcomers to programming (Learning to Program in Python) and for delegates with prior programming in another language (our Python Programming course). If you're going to be using Python within the Django web framework, we can extend the course to cover that ...
2012-04-28
 
3698How to stop forms on other sites submitting to your scripts
From time to time, many of us web site authors and maintainers put a form on our site which submits data to another site. It might be something as simple as a Google seach box or a webmail login page. If you're developing a page / form which you do not want to be filled in remotely in this way, you ...
2012-04-21
 
3640Sessions (Shopping Carts) in Django - the Python Web Framework
What are sessions? When you're running a web application, you need to be able to enter data page by page on your way through, and have that data retained - on a shopping site, for example, you need to be able to add things into your basket page by page and have them stay there until you check out. ...
2012-03-10
(longer)
3639Demonstration of a form using Django
Our previous Django demonstrations have shown the setting up of the Django environment and data: [here] Adding your own views and templating them: [here] Separating the HTML from the Controller: [here] Nesting Templates: [here] and defining database table relationships: [here] Let's now add a form definition ...
2012-03-10
 
3634Defining database relations in your Django model
Each database table maps to a class in Django - and the beauty if that be the way you define the tables will work equally well with SQLite, MySQL, and other supported databases (you just have a database configuration block to set when you install your Django project). Here is my models.py file from ...
2012-03-10
 
3633Nesting Templates in Django
Django's templates are HTML files into which your controller will fill web page content. This is done by means of an extra tagging language, which includes two groups of constructs: a) construct starting with {{ and ending with }}, which are filled in with the value held in a field in the Context object. Example: ...
2012-03-10
 
3624Why do we need a Model, View, Controller architecture?
In the very early days of the web, it was a source of data - with files of marked up text (in HTML) being sent out to a browser program by a server running on a central computer. Requests to the central server were made in http (Hypertext transfer protocol), and the responses were translated by the ...
2012-03-03
 
3139Steering our Python courses towards wxPython, SQLite and Django
With our modular courses that we write ourselves, we've well placed to move forward with technology; more often than not, what's needed is a series of gentle changes, adding in the occasional module for private courses where a particular new subject is needed, with it being introduced into public courses ...
2011-01-21
 
3140Django - separating the HTML from the view / model
This is the third section on Django - the Python based web framework. See first Step 1 and Step 2. Let's add another view of our data to our Django app - using DRY techniques, this will be a short piece of coding but I'll take the opportunity to add in and explain a few more features that you'll probably ...
2011-01-21
 
3138Django - adding your own views, and then templating your views.
Django is a web framework in Python using DRY (Do not repeat yourself) principles. It usually uses data held in a database such as SQLite or MySQL, which is maintained separately from the look and feel of the web site. This is the second article in a series. For the first article in this series - "Django ...
2011-01-20
(longest)
3136A framework with python - Django - first steps
What is Django and what do I need to be able to use it? Django is a framework - a tool that lets you create, customise, run and maintain web sites in which the data is stored in database tables. It uses the DRY (Don't Repeat Yourself) philospohy of design - quite the opposite of early web sites, where ...
2011-01-19
(longest)
1745Moodle, Drupal, Django (and Rails)
In the 1970s, we had C and in that decade and the following one, we put together our systems in that language and its derivatives. In the 1990s, we had Perl and in that decade and the following one, we put together our systems in that language are related ones. In the 2010s, we'll have a wide range ...
2010-01-31
 
Examples from our training material
15_0.firsttemplate.htp   Django 1.5 - Story 0
15_0.indextemplate.htp   Django 1.5 - Story 0
15_0.settings.py   Django 1.5 - Story 0
15_0.urls.py   Django 1.5 - Story 0
15_0.views.py   Django 1.5 - Story 0
15_0.visitbase.htp   Django 1.5 - Story 0
2_index.html   Template - django, stage 2
2_settings.py   Django settings for oursystems project - phase 2
2_urls.py   Django - URL to view mappings - phase 2
2_views.py   model to view transforms in Django - phase 2
3_integrate.html   Template for Django lesson 3 (tag language)
3_urls.py   url mapping - URLs without extensions
3_views.py   Django integrated view
admin.py   Register the System class with the admin app
base_site.html   Modified look and feel for admin app
models.py   Definition of Django managed tables
settings.py   Django settings for oursystems project - phase 1
urls.py   url to application mapping
views.py.001   First view in Django - checking URL mapping
views.py.002   Transforming a model to a view in Django
z_complete   Complete set of Django files
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
Introduction to Django.
What is a framework and what is MVC?
Creating a project.
The development server, and the database setup.
Creating and activating models.
Using the API.
Activating and using the admin site and functionallity.
Adding related objects.
URL controls.
The templating system and attributes
Your first view, and views that interact with the model and controller.
Forms and generic views.
Caching.
RSS feeds.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.


You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/Y306.html • PAGE BUILT: Mon Feb 8 18:55:24 2016 • BUILD SYSTEM: WomanWithCat