CE419 Web Programming. Session 15: Django Web Framework
|
|
- Hilary Riley
- 6 years ago
- Views:
Transcription
1 CE419 Web Programming Session 15: Django Web Framework
2 Web Applications & Databases In modern Web applications, the arbitrary logic often involves interacting with a database. Behind the scenes, a database-driven Web site connects to a database server, retrieves some data out of it, and displays that data on a Web page. The site might also provide ways for site visitors to populate the database on their own.
3 Web Applications & Databases Amazon.com, for instance, is a great example of a database-driven site. Each product page is essentially a query into Amazon s product database formatted as HTML. When you post a customer review, it gets inserted into the database of reviews. Django is well suited for making database-driven Web sites, because it comes with easy yet powerful tools for performing database queries using Python.
4 Databases: The Dumb Way import MySQLdb def book_list(request): db = MySQLdb.connect(user='me', db='mydb', passwd='secret', host='localhost') cursor = db.cursor() 3 2 cursor.execute('select name FROM books ORDER BY name') names = [row[0] for row in cursor.fetchall()] db.close() 1 # let's do the rest here.
5 Databases: The Not-So-Dumb Way ORM comes to the rescue! from mysite.books.models import Book def book_list(request): books = Book.objects.order_by('name') # tada!
6 Models in Django A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you re storing. Generally, each model maps to a single database table. Each model is a Python class that subclasses django.db.models.model. Each attribute of the model represents a database field.
7 Configuring the Database First, we need to take care of some initial configuration; we need to tell Django which database server to use and how to connect to it. settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } }
8 SQLite In contrast to other database management systems, SQLite is not a client server database engine. Rather, it is embedded into the end program. Good for development and small projects.
9 Quick Example from django.db import models class Person(models.Model): first_name = models.charfield(max_length=30) last_name = models.charfield(max_length=30) CREATE TABLE myapp_person ( "id" serial NOT NULL PRIMARY KEY, "first_name" varchar(30) NOT NULL, "last_name" varchar(30) NOT NULL );
10 Using Models Once you have defined your models, you need to tell Django you re going to use those models. Do this by editing your settings file and changing the INSTALLED_APPS setting to add the name of the module that contains your models.py. INSTALLED_APPS = ( #... 'myapp', #... ) python manage.py migrate
11 Fields The most important part of a model and the only required part of a model is the list of database fields it defines. Fields are specified by class attributes. from django.db import models class Post(models.Model): title = models.charfield(max_length=255) body = models.textfield() author = models.foreignkey(user) publish_date = models.datetimefield()
12 Field Types Each field in your model should be an instance of the appropriate Field class. Some of builtin field types in Django: CharField, TextField, DateField, DateTimeField, Field, FileField, URLField, etc. Complete list: fields/ You can subclass Field and create your custom types! For example, PersianDateField.
13 Field Options Each field takes a certain set of field-specific arguments. CharField requires max_length. There s also a set of common arguments available to all field types. All are optional.
14 Field Options (cont'd) null If True, Django will store empty values as NULL in the database. Default is False. blank If True, the field is allowed to be blank. Default is False. Difference between blank and null?
15 Field Options (cont'd) default The default value for the field. This can be a value or a callable object. unique If True, this field must be unique throughout the table.
16 Field Options (cont'd) import datetime from django.db import models class Post(models.Model): # title = models.charfield(max_length=255, unique=true) excerpt = models.textfield(null=true, blank=true) publish_date = models.datetimefield(default=datetime.datetime.now) #
17 Automatic Primary Key Fields By default, Django gives each model the following field: id = models.autofield(primary_key=true) If you d like to specify a custom primary key, just specify primary_key=true on one of your fields. If Django sees you ve explicitly set Field.primary_key, it won t add the automatic id column.
18 Relationships Clearly, the power of relational databases lies in relating tables to each other. Django offers ways to define the three most common types of database relationships: many-to-one, many-tomany and one-to-one.
19 Many-to-One Relationships from django.db import models class Manufacturer(models.Model): #... pass class Car(models.Model): manufacturer = models.foreignkey(manufacturer) #
20 Many-to-Many Relationships It doesn t matter which model has the ManyToManyField, but you should only put it in one of the models not both. "More Natural" from django.db import models class Track(models.Model): #... pass class Playlist(models.Model): tracks = models.manytomanyfield(track) #
21 One-to-One Relationships For example, if you were building a database of places, you would build pretty standard stuff such as address, phone number, etc. in the database. Then, if you wanted to build a database of restaurants on top of the places, instead of repeating yourself and replicating those fields in the Restaurant model, you could make Restaurant have a OneToOneField to Place.
22 Making Database Queries Once you ve created your data models, Django automatically gives you a database-abstraction API that lets you create, retrieve, update and delete (CRUD) objects. A model class represents a database table, and an instance of that class represents a particular record in the database table. python manage.py shell
23 Creating Objects To create an object, instantiate it using keyword arguments to the model class, then call save() to save it to the database. from blog.models import Author author = Author(name="Sadjad Fouladi", ="sfouladi@gmail.com") author.save() 2 1 author. = "fouladi@ce.sharif.edu" author.save() 3
24 Saving ForeignKey and ManyToManyField Fields Updating a ForeignKey field works exactly the same way as saving a normal field simply assign an object of the right type to the field in question. Updating a ManyToManyField works a little differently use the add() method on the field to add a record to the relation.
25 Retrieving Objects To retrieve objects from your database, construct a QuerySet via a Manager on your model class. A QuerySet represents a collection of objects from your database. It can have zero, one or many filters. In SQL terms, a QuerySet equates to a SELECT statement, and a filter is a limiting clause such as WHERE or LIMIT.
26 Retrieving Objects (cont'd) Retrieving all objects all_entries = Entry.objects.all() Filtering and excluding q1 = Entry.objects.filter(rating=4) q2 = Entry.objects.exclude(rating lt=3) q3 = Entry.objects.filter(headline contains='book', rating=5, pub_date year=2011)
27 Chaining Filters The result of refining a QuerySet is itself a QuerySet, so it s possible to chain refinements together. q1 = Entry.objects.filter( rating=4 ).filter( headline contains="book" ).exclude( pub_date year=2013 )
28 Querysets Are Lazy >>> q = Entry.objects.filter(headline startswith="what") >>> q = q.filter(pub_date lte=datetime.date.today()) >>> print(q) 29
29 Retrieving a Single Object DoesNotExist, MultipleObjectsReturned. one_entry = Entry.objects.get(id=1)
30 Limiting QuerySets What if the QuerySet matches 1,000 objects?! Entry.objects.all()[:5] Entry.objects.filter( )[15:30] Equivalent of SQL s LIMIT and OFFSET clauses.
31 Field Lookups Field lookups are how you specify the meat of an SQL WHERE clause. They re specified as keyword arguments to the QuerySet methods filter(), exclude() and get(). field lookuptype=value exact, iexact, contains, icontains, startswith, endswith, lt, gt, lte, gte, and A LOT more.
32 Deleting and Updating Objects Entry.objects.filter( rating=4 ).update(rating=5) Entry.objects.filter(rating lte=2).delete()
33 Django Admin One of the most powerful parts of Django is the automatic admin interface. Let's see Django admin for our project!
34 Thank you. Any questions? 38
MIT Global Startup Labs México 2013
MIT Global Startup Labs México 2013 http://aiti.mit.edu Lesson 2 Django Models What is a model? A class describing data in your application Basically, a class with attributes for each data field that you
More informationWebdev: Building Django Apps. Ryan Fox Andrew Glassman MKE Python
Webdev: Building Django Apps Ryan Fox Andrew Glassman MKE Python What Django is Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu Rwanda Summer 2011 Django 01: Models Models Suppose we want to create a web application to manage data about thousands of movies What
More informationdjango-model-utils Documentation
django-model-utils Documentation Release 3.1.1 Carl Meyer Jan 10, 2018 Contents 1 Contents 3 1.1 Setup................................................... 3 1.1.1 Installation...........................................
More informationGraphene Documentation
Graphene Documentation Release 1.0.dev Syrus Akbary Nov 09, 2017 Contents 1 Introduction tutorial - Graphene and Django 3 1.1 Set up the Django project........................................ 3 1.2 Hello
More informationstaff Documentation Release 1.2
staff Documentation Release 1.2 me February 06, 2016 Contents 1 Goals 3 2 Contents 5 2.1 Getting Started.............................................. 5 2.2 Customizing StaffMember........................................
More informationSouth Documentation. Release 1.0. Andrew Godwin
South Documentation Release 1.0 Andrew Godwin Jul 10, 2017 Contents 1 Support 3 2 Contents 5 2.1 About South............................................... 5 2.2 What are migrations?...........................................
More informationReminders. Full Django products are due next Thursday! CS370, Günay (Emory) Spring / 6
Reminders Full Django products are due next Thursday! CS370, Günay (Emory) Spring 2015 1 / 6 Reminders Full Django products are due next Thursday! Let's start by quizzing you. CS370, Günay (Emory) Spring
More informationSouth Africa Templates.
South Africa 2013 Lecture 15: Django Database Intro + Templates http://aiti.mit.edu Database Interaction Managers Manager is a class It's the interface between the database and django Various methods,
More informationdjango-audit-log Documentation
django-audit-log Documentation Release 0.8.0 Vasil Vangelovski (Atomidata) Jul 21, 2017 Contents 1 Installation 3 2 Tracking Users that Created/Modified a Model 5 2.1 Tracking Who Created a Model.....................................
More informationLecture 10(-ish) Web [Application] Frameworks
Lecture 10(-ish) Web [Application] Frameworks Minimal Python server import SocketServer import SimpleHTTPServer class Reply(SimpleHTTPServer.SimpleHTTPRequestHandler): def do_get(self): # query arrives
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu Ghana Summer 2012 Lecture DJ04 Django Views Simple Diagram HTTP Request Browser urls.py HTTP Request Model/Database Data Request Data
More informationBricks 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 informationDjango-dbindexer Documentation
Django-dbindexer Documentation Release 1.0 Waldemar Kornewald, Thomas Wanschik March 19, 2013 CONTENTS 1 Tutorials 3 2 Documentation 5 3 Installation 7 4 How does django-dbindexer make unsupported field
More informationdjango-modeltranslation Documentation
django-modeltranslation Documentation Release 0.12.2 Dirk Eschler Jul 02, 2018 Contents 1 Features 3 1.1 Project Home............................................... 3 1.2 Documentation..............................................
More informationL6 Application Programming. Thibault Sellam Fall 2018
L6 Application Programming Thibault Sellam Fall 2018 Topics Interfacing with applications Database APIs (DBAPIS) Cursors SQL!= Programming Language Not a general purpose programming language Tailored for
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu/program/philippines-summer-2012/ Philippines Summer 2012 Lecture 3 Rapid Application Development with Python June 26, 2012 Agenda Introduction
More informationTomasz 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 informationgenerates scaffolding/framework for models, views
Django by Adrian Holovaty and Jacob Kaplan-Moss (released July 2005) a collection of Python scripts to create a new project / site generates Python scripts for settings, etc. configuration info stored
More informationdjango-conduit Documentation
django-conduit Documentation Release 0.0.1 Alec Koumjian Apr 24, 2017 Contents 1 Why Use Django-Conduit? 3 2 Table of Contents 5 2.1 Filtering and Ordering.......................................... 5
More informationPART I SQLAlchemy Core
PART I SQLAlchemy Core Now that we can connect to databases, let s begin looking at how to use SQLAlchemy Core to provide database services to our applications. SQLAlchemy Core is a Pythonic way of representing
More informationdjango-filter Documentation
django-filter Documentation Release 1.0.4 Alex Gaynor and others. Sep 26, 2017 User Guide 1 Installation 3 1.1 Requirements............................................... 3 2 Getting Started 5 2.1 The
More informationDDF Documentation. Release Paulo Cheque
DDF Documentation Release 1.7.0 Paulo Cheque Aug 31, 2017 Contents 1 Getting Started 3 1.1 Basic Example of Usage......................................... 3 1.2 Installation................................................
More information정재성
건전지로달리는 쟝고세미나 정재성 Django Web Framework CGI #!/usr/bin/env python import MySQLdb print "Content-Type: text/html\n" print "books" print "" print "books" print
More informationRuntime Dynamic Models Documentation Release 1.0
Runtime Dynamic Models Documentation Release 1.0 Will Hardy October 05, 2016 Contents 1 Defining a dynamic model factory 1 1.1 Django models.............................................. 1 1.2 Django s
More informationMIT 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 informationDjango 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 informationDjango starting guide
Django starting guide (and much more ) Alessandro Bucciarelli Outline Lesson 1 Intro to versioning systems (Git) Intro to Python and basic data structures Django Lesson 2 Interaction between Django and
More informationEasy-select2 Documentation
Easy-select2 Documentation Release 1.2.2 Lobanov Stanislav aka asyncee September 15, 2014 Contents 1 Installation 3 2 Quickstart 5 3 Configuration 7 4 Usage 9 5 Reference 11 5.1 Widgets..................................................
More informationDjango IPRestrict Documentation
Django IPRestrict Documentation Release 1.4.1 Tamas Szabo Nov 06, 2017 Contents 1 Table of Contents 3 1.1 Requirements and Installation...................................... 3 1.2 Configuration...............................................
More informationdjango-filter Documentation
django-filter Documentation Release 2.0.0 Alex Gaynor and others. Dec 17, 2018 User Guide 1 Installation 3 1.1 Requirements............................................... 3 2 Getting Started 5 2.1 The
More informationMoving to a Sustainable Web Development Environment for Library Web Applications
Portland State University PDXScholar Online Northwest Online Northwest 2010 Feb 5th, 9:00 AM - 11:00 AM Moving to a Sustainable Web Development Environment for Library Web Applications Anjanette Young
More information7401ICT eservice Technology. (Some of) the actual examination questions will be more precise than these.
SAMPLE EXAMINATION QUESTIONS (Some of) the actual examination questions will be more precise than these. Basic terms and concepts Define, compare and discuss the following terms and concepts: a. HTML,
More informationdjango-pgfields Documentation
django-pgfields Documentation Release 1.0 Luke Sneeringer July 31, 2013 CONTENTS i ii This is django-pgfields, a pluggable Django application that adds support for several specialized PostgreSQL fields
More informationBishop 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 informationThe simple but powerful elegance of Django REST Framework. start
The simple but powerful elegance of Django REST Framework start Morten Barklund Full-stack Freelancer Rookie Pythonista Decent Djangoneer 2 Table of Contents 01 Django REST Framework 02 Permissions 03
More informationDjango Image Tools Documentation
Django Image Tools Documentation Release 0.7.b1 Bonsai Studio May 05, 2017 Contents 1 Quick Start 3 1.1 Configuration............................................... 3 1.2 Example models.............................................
More informationDjango File Picker Documentation
Django File Picker Documentation Release 0.5 Caktus Consulting Group LLC Nov 06, 2017 Contents 1 Dependencies 3 1.1 Required................................................. 3 1.2 Optional.................................................
More informationDjango 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 informationCOMP 430 Intro. to Database Systems. SQL from application code
COMP 430 Intro. to Database Systems SQL from application code Some issues How to connect to database Where, what type, user credentials, How to send SQL commands How to get communicate data to/from DB
More informationneo4django Documentation
neo4django Documentation Release 0.1.8-dev Matt Luongo Sep 09, 2017 Contents 1 Details 3 1.1 Getting Started.............................................. 3 1.2 Writing Models..............................................
More informationDjango Extras Documentation
Django Extras Documentation Release 0.2.7.b1 Tim Savage September 22, 2017 Contents 1 Django Extras documentation 1 1.1 Project Status............................................... 1 1.2 Getting help...............................................
More informationwidgets, events, layout loosely similar to Swing test browser, or plugin for testing with real browser on local system
Web [Application] Frameworks conventional approach to building a web service write ad hoc client code in HTML, CSS, Javascript,... by hand write ad hoc server code in [whatever] by hand write ad hoc access
More informationdjango-scaffold Documentation
django-scaffold Documentation Release 1.1.1 James Stevenson May 27, 2015 Contents 1 Installation 3 2 Creating an app to extend scaffold 5 2.1 1. Create a new application........................................
More informationdjango-oauth2-provider Documentation
django-oauth2-provider Documentation Release 0.2.7-dev Alen Mujezinovic Aug 16, 2017 Contents 1 Getting started 3 1.1 Getting started.............................................. 3 2 API 5 2.1 provider.................................................
More informationcanary Documentation Release 0.1 Branton K. Davis
canary Documentation Release 0.1 Branton K. Davis August 18, 2012 CONTENTS 1 Installation 3 1.1 Installing Canary Reports........................................ 3 1.2 Running the Demo Project........................................
More informationDjango Extra Views Documentation
Django Extra Views Documentation Release 0.12.0 Andrew Ingram Nov 30, 2018 Contents 1 Features 3 2 Table of Contents 5 2.1 Getting Started.............................................. 5 2.2 Formset Views..............................................
More informationdjango-mongonaut Documentation
django-mongonaut Documentation Release 0.2.20 Daniel Greenfeld Sep 27, 2017 Contents 1 Installation 3 1.1 Normal Installation............................................ 3 1.2 Static Media Installation.........................................
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu Nigeria Summer 2011 Django The Big Picture Google App Engine Mobile Web Browser/ Mobile Web App Your Django app Mobile App Development
More informationdjango-auditlog Documentation
django-auditlog Documentation Release 0.4.3 Jan-Jelle Kester Jul 05, 2017 Contents 1 Contents 3 1.1 Installation................................................ 3 1.2 Usage...................................................
More informationLinguistic Architecture
Linguistic Architecture Modeling Software Knowledge SoftLang Team, University of Koblenz-Landau Prof. Dr. Ralf Lämmel Msc. Johannes Härtel Msc. Marcel Heinz Outline Motivating Software Documentation Classic
More informationQuoting Wikipedia, software
Developers How To Django When Python Bites the Web WWW.WWW.WWW. Here s how to start using Django for Web application development. Quoting Wikipedia, software frameworks aim to facilitate software development
More informationLECTURE 21. Database Interfaces
LECTURE 21 Database Interfaces DATABASES Commonly, Python applications will need to access a database of some sort. As you can imagine, not only is this easy to do in Python but there is a ton of support
More informationTechnology modeling. Ralf Lämmel Software Languages Team University of Koblenz-Landau
Technology modeling Ralf Lämmel Software Languages Team University of Koblenz-Landau Technologies are at the heart of software development. Let s model them for understanding. 1 Different kinds of software
More informationLotus 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 informationweb.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 informationDjango-Select2 Documentation. Nirupam Biswas
Nirupam Biswas Mar 07, 2018 Contents 1 Get Started 3 1.1 Overview................................................. 3 1.2 Installation................................................ 3 1.3 External Dependencies..........................................
More informationwagtailtrans 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 informationDjango ORM Cookbook Documentation
Django ORM Cookbook Documentation Release 2.0 Agiliq Oct 11, 2018 Contents 1 Introduction 3 2 Querying and Filtering 5 3 Creating, Updating and Deleting things 23 4 Ordering things 29 5 Database Modelling
More informationdjango-data-migration Documentation
django-data-migration Documentation Release 0.2.1 Philipp Böhm Sep 27, 2017 Contents 1 Contents: 3 1.1 Installing................................................. 3 1.2 Writing Migrations............................................
More informationdango-ct Documentation
dango-ct Documentation Release 0.1 Wolfgang Doll Sep 27, 2017 Contents 1 Implementation Details 3 2 Some Research 7 3 Test Data Sources 9 4 Requirements 11 5 SQL Snippets 13 6 Queries for Digraph-shaped
More informationdjango IN DEPTH JAMES BENNETT PYCON MONTRÉAL 9TH APRIL 2015
django IN DEPTH JAMES BENNETT PYCON MONTRÉAL 9TH APRIL 2015 ABOUT YOU You know Python You know some Django You want to understand how it really works ABOUT ME Working with Django 8½ years, 5 at Lawrence
More informationdjango-permission Documentation
django-permission Documentation Release 0.8.8 Alisue October 29, 2015 Contents 1 django-permission 1 1.1 Documentation.............................................. 1 1.2 Installation................................................
More informationPython Schema Generator Documentation
Python Schema Generator Documentation Release 1.0.0 Peter Demin June 26, 2016 Contents 1 Mutant - Python code generator 3 1.1 Project Status............................................... 3 1.2 Design..................................................
More informationPython. Django. (Web Application Framework - WAF) PyCharm. (Integration Development Environment - IDE)
Python Django (Web Application Framework - WAF) PyCharm (Integration Development Environment - IDE) Compiled and condensed notes from various online sources Gregg Roeten pg 1 Build Environment as of 09/10/2015
More informationdjango-image-cropping Documentation
django-image-cropping Documentation Release 1.1.0 Jonas und der Wolf Nov 06, 2017 Contents 1 Installation 3 2 Configuration 5 3 Admin Integration 7 4 Backends 9 5 Frontend 11 5.1 easy_thumbnails.............................................
More informationPuzzlehunt Server Documentation
Puzzlehunt Server Documentation Release v3.1.1 Dillon Lareau Feb 16, 2018 Contents 1 Setup 1 1.1 Environment setup............................................ 1 1.2 Code Setup................................................
More informationdjango-model-report Documentation
django-model-report Documentation Release 0.2.1 juanpex Nov 06, 2017 Contents 1 Demo 3 1.1 User Guide................................................ 3 1.2 Modules.................................................
More informationTopics. History. Architecture. MongoDB, Mongoose - RDBMS - SQL. - NoSQL
Databases Topics History - RDBMS - SQL Architecture - SQL - NoSQL MongoDB, Mongoose Persistent Data Storage What features do we want in a persistent data storage system? We have been using text files to
More informationdjango-audiofield Documentation
django-audiofield Documentation Release 0.8.2 Arezqui Belaid Sep 27, 2017 Contents 1 Introduction 3 1.1 Overview................................................. 3 1.2 Usage...................................................
More informationDjango 1.9 and PostgreSQL
Django 1.9 and PostgreSQL Christophe Pettus Django SF Meetup thebuild.com pgexperts.com So. Much. Stuff. Django 1.7 introduced native migrations. Django 1.8 introduced and 1.9 extended django.contrib.postgres,
More informationTransactions for web developers
Transactions for web developers Aymeric Augustin - @aymericaugustin DjangoCon Europe - May 17th, 2013 1 Transaction management tools are often made to seem like a black art. Christophe Pettus (2011) Life
More informationDevelop Python Applications with MySQL Connector/Python DEV5957
Develop Python Applications with MySQL Connector/Python DEV5957 Jesper Wisborg Krogh Senior Principal Technical Support Engineer Oracle MySQL Support October 24, 2018 Safe Harbor Statement The following
More informationdjango-polymorphic Documentation
django-polymorphic Documentation Release 2.0.3 Bert Constantin, Chris Glass, Diederik van der Boor Aug 23, 2018 Contents 1 Features 3 2 Getting started 5 2.1 Quickstart................................................
More informationdjango-slim Documentation
django-slim Documentation Release 0.5 Artur Barseghyan December 24, 2013 Contents i ii django-slim Contents 1 2 Contents CHAPTER 1 Description Simple implementation of multi-lingual
More informationFlask-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 information9 Common Patterns for Forms
9 Common Patterns for Forms Django forms are powerful, exible, extensible, and robust For this reason, the Django admin and CBVs use them extensively In fact, all the major Django API frameworks use ModelForms
More informationSQL Data Definition Language: Create and Change the Database Ray Lockwood
Introductory SQL SQL Data Definition Language: Create and Change the Database Pg 1 SQL Data Definition Language: Create and Change the Database Ray Lockwood Points: DDL statements create and alter the
More informationThe Definitive Guide to Django
The Definitive Guide to Django Web Development Done Right, Second Edition cession No. ok ID for signout Adrian Holovaty and Jacob Kaplan-Moss 882 Apresse Contents at a Glance About the Author....................................
More informationDatabase &.NET Basics: Take what you know about SQL and apply that to SOQL, SOSL, and DML in Apex.
Database &.NET Basics: Take what you know about SQL and apply that to SOQL, SOSL, and DML in Apex. Unit 1: Moving from SQL to SOQL SQL & SOQL Similar but Not the Same: The first thing to know is that although
More informationweb frameworks design comparison draft - please help me improve it focus on Model-View-Controller frameworks
web frameworks design comparison draft - please help me improve it focus on Model-View-Controller frameworks Controllers In Rails class MyTestController < ApplicationController def index render_text Hello
More informationDjango REST Framework JSON API Documentation
Django REST Framework JSON API Documentation Release 2.0.0-alpha.1 Jerel Unruh Jan 25, 2018 Contents 1 Getting Started 3 1.1 Requirements............................................... 4 1.2 Installation................................................
More informationEE221 Databases Practicals Manual
EE221 Databases Practicals Manual Lab 1 An Introduction to SQL Lab 2 Database Creation and Querying using SQL Assignment Data Analysis, Database Design, Implementation and Relation Normalisation School
More informationAristotle Metadata Registry Documentation
Aristotle Metadata Registry Documentation Release 0.0.1 Samuel Spencer Oct 23, 2018 Contents 1 Table of Contents 3 1.1 Aristotle Metadata Registry Mission Statement............................. 3 1.2
More informationDjango ORM crash
Django ORM crash test Django ORM crash test Andrii Soldatenko 9 April 2017 Italy, Otto Andrii Soldatenko Senior Python Developer at CTO at Co-organizer PyCon Belarus 2017 Speaker at many PyCons and open
More informationParis Documentation. Release. Jamie Matthews and Simon Holywell
Paris Documentation Release Jamie Matthews and Simon Holywell Mar 21, 2017 Contents 1 Philosophy 3 2 Installation 5 2.1 Packagist................................................. 5 2.2 Download.................................................
More informationdjango-gollum Documentation
django-gollum Documentation Release 1.0.0 Luke Sneeringer December 11, 2016 Contents 1 Installation 3 2 Dependencies 5 3 Getting Started 7 4 Getting Help 9 5 License 11 6 Index 13 6.1 Using django-gollum...........................................
More informationdjango-cron Documentation
django-cron Documentation Release 0.3.5 Tivix Inc. Mar 04, 2017 Contents 1 Introduction 3 2 Installation 5 3 Configuration 7 4 Sample Cron Configurations 9 4.1 Retry after failure feature........................................
More informationDjango Localized Recurrence Documentation
Django Localized Recurrence Documentation Release 3.2.0 Erik Swanson Jan 03, 2019 Contents 1 Table of Contents 3 1.1 Installation................................................ 3 1.2 Quickstart and Basic
More informationCOMP 430 Intro. to Database Systems. Encapsulating SQL code
COMP 430 Intro. to Database Systems Encapsulating SQL code Want to bundle SQL into code blocks Like in every other language Encapsulation Abstraction Code reuse Maintenance DB- or application-level? DB:
More informationBuilding 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 informationkiss.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 informationCSV Importer Documentation
CSV Importer Documentation Release 0.1 Anthony TRESONTANI Jul 18, 2017 Contents 1 Installation 3 2 Basic sample 5 3 Django Model 7 4 Fields 9 5 Meta options 11 6 Importer option 13 7 Grouped CSV 15 8
More informationAsynchronous WebSockets using Django
Asynchronous WebSockets using Django 2017-05-18 OUTLINE OF THE TALK WEBSOCKETS What is Websocket? Why are they important? DJANGO CHANNELS Introduction Changes to WSGI server EXAMPLE Django code Django
More informationMixer Documentation. Release Kirill Klenov
Mixer Documentation Release 6.0.1 Kirill Klenov Sep 28, 2018 Contents 1 User s Guide 3 1.1 Installation................................................ 3 1.2 Quickstart................................................
More informationRails: MVC in action
Ruby on Rails Basic Facts 1. Rails is a web application framework built upon, and written in, the Ruby programming language. 2. Open source 3. Easy to learn; difficult to master. 4. Fun (and a time-saver)!
More informationDobby Documentation. Release 0.1. Antoine Bertin
Dobby Documentation Release 0.1 Antoine Bertin April 09, 2014 Contents i ii Dobby is a voice commanded bot that will serve you the best he can by executing commands that you can customize in the database.
More informationdjango-celery Documentation
django-celery Documentation Release 2.5.5 Ask Solem Nov 19, 2017 Contents 1 django-celery - Celery Integration for Django 3 1.1 Using django-celery........................................... 4 1.2 Documentation..............................................
More informationdjango-mailbox Documentation
django-mailbox Documentation Release 3.3 Adam Coddington May 11, 2018 Contents 1 Installation 3 2 Supported Mailbox Types 5 2.1 POP3 and IMAP Mailboxes....................................... 6 2.1.1 Additional
More informationdjango-filer Documentation
django-filer Documentation Release 1.3.0 Stefan Foulis Nov 09, 2017 Contents 1 Getting help 3 2 Contributing 5 3 Contents 7 i ii django-filer is a file management application for django. It handles uploading
More information