SlideShare a Scribd company logo
6
Most read
11
Most read
17
Most read
SAASY MAPS - USING DJANGO-
TENANTS AND GEODJANGO TO
PROVIDE WEB-GIS SOFTWARE-AS-A-
SERVICE
Anusha Chickermane
OBJECTIVES
• create a semi-isolated multi-tenant architecture using django-
tenants+postgresql
• build on top of it using geodjango+postgis+openlayers to provide
individualised web mapping services to different clients
• performance and security implications of this approach
• We achieve this by creating a website that shows accident point locations
for three different counties and brings up the associated attributes of
date_of_accident and number_of_vehicles
• Code and this presentation at https://github.com/anushamc/foss4guk-
django-tenants
SOFTWARE AS A SERVICE
• SaaS - software deployment
model where applications are
remotely hosted by the service
provider and made available to
customers on demand
• Eg. github.io, has multiple tenants
• tombatossals.github.io/angular-
openlayers-directive/ – user tombatossals
example page
• blueimp.github.io/jQuery-File-Upload/ -
user bluimp’s example page
• We look at the top 2 layers of the SaaS
architecture – Saas apps and
Application services
SAAS SECURITY CONCERNS
• SaaS deployment model – Aws or self-hosted?
• Data security(encryption, app vulnerability) – Django+postgres
• Network security (SSL) – Django
• Regulatory compliance
• Data segregation – tenant-schemas
• Availability
• Backup
• Identity management and sign-on process - Django
DATA SEGRATION
• django-tenants lies in the
middle: shared database,
separate schemas
• Isolated – more secure, but
costlier to implement and
maintain, and lower
performance
• Shared – less secure, but
easier to implement and
better performance
• The right choice on the
spectrum depends on
business requirements and
sensitivity of the data
PERFORMANCE
• Not as memory intensive as having separate databases
• As the number of schemas (i.e. tenants) grows, propagating model
(i.e. database structure)changes will take longer – parallel migrations
help reduce this performance hit
• Since the same database models are used across tenants,
customisation of each tenant is limited to only changing the look &
feel via templates – i.e cant have one geometry field for one tenant
and two for another in the same model
• If using main-domain and subdomain, eg github.io and
bluimp.github.io, need to watch out for cookie attacks across
subdomains
THE DJANGO FRAMEWORK
• MVT – Model View Template
• Model – defines the data
structure and handles the
database queries
• View – determines what data
from the model should be
returned in HTTP response
• Template – renders data in
HTML(or JSON or XML) and
makes it look pretty
A TYPICAL DJANGO PROJECT
• mysite/
• manage.py
• mysite/
• settings.py
• urls.py
• wsgi.py
• app/
• admin.py
• migrations/
• models.py
• static/
• css/
• js/
• templates/
• Index.html
• tests.py
• views.py
• manage.py – runserver,
makemigrations, migrate
• settings.py – database and site
settings
• urls.py – urls mapped to views
• admin – to create the admin interface
• Models – define the database
structure
• Templates – html files with Django
tags
• Views – handle get and post requests
DJANGO-TENANTS APP
• public_app – accessed from
the main domain i.e.
www.mainsite.com
• tenant_app – accessed from
the tenant’s sub-domain
• mysite/
• manage.py
• mysite/
• settings.py
• …
• public_app/
• admin.py
• migrations/
• …
• tenant_app/
• admin.py
• migrations/
• …
SETUP
• Boot from OS-Geo-Live
• Insert disk into CD drive, restart system and hold down F12 to access boot
options
• For windows 8 and above – Click on the power option (either on the Start
Screen or the Charms Bar) and then hold down the shift key while clicking on
Restart.
MODIFYING THE HOSTS FILE TO
SIMULATE DIFFERENT TENANTS
• Open the terminal and run the following command:
sudo vim /etc/hosts
• Near the top of the file, add the following lines:
127.0.0.1 mainsite.com
127.0.0.1 cumbria.mainsite.com
127.0.0.1 lancashire.mainsite.com
127.0.0.1 london.mainsite.com
• To exit the editor, press ESC and then type :wq
CREATING THE DATABASE
• Open pgAdmin III.
• Create a new database called ‘multi_county_db’.
• Add the postgis extension.
INSTALLING DJANGO, GEODJANGO AND
DJANGO-TENANTS
• Open the terminal and run
• Install pip and django:
sudo apt-get install python3-pip
sudo pip3 install django
• Install python bindings for postgres:
sudo apt-get install python3-psycopg2
• Install Django-tenants:
sudo pip3 install django-tenants
CREATING THE PROJECT
• Open the terminal and run
• Create the project
django-admin startproject multi_county
• Open the project and create apps
cd multi_county
python3 manage.py startapp public_app
python3 manage.py startapp tenant_app
• Replace contents of multi_countysettings.py with
https://raw.githubusercontent.com/anushamc/foss4guk-django-
tenants/master/multi_county/multi_county/settings.py
• Replace contents of public_appmodels.py with
https://raw.githubusercontent.com/anushamc/foss4guk-django-
tenants/master/multi_county/public_app/models.py
CREATING THE PROJECT
• Open the terminal and run
python3 manage.py migrate_schemas –-shared
• Replace contents of tenant_appmodels.py with
https://github.com/anushamc/foss4guk-django-
tenants/blob/master/multi_county/tenant_app/models.py
• Open the terminal and run
python3 manage.py makemigrations
python3 manage.py migrate_schemas
CREATING THE TENANTS********
• In the same folder as manage.py, download the file
create_tenants.py from
• Open the terminal and run
python3 manage.py shell < create_tenants.py
IMPORTING THE DATA
• Download the data for the schemas from
https://github.com/anushamc/foss4guk-django-
tenants/tree/master/data
• Go to PG Admin III and expand the schemas Lancashire, cumbria
and london
• Right-click the tenant_app_accident table for each county schema,
and select Import…
• In File Options tab, change type to csv and choose the relevant csv file
• In Columns uncheck id and geom
• In Misc. Options check header
• Click Import button
• Do this for all 3 county schemas
IMPORTING THE DATA
• From PG Admin III Run the following sql command on the database:
UPDATE antrim.tenant_app_accident SET geom=ST_GeomFromText('POINT(' ||
location_easting_osgr || ' ' || location_northing_osgr || ')',27700);
UPDATE lancashire.tenant_app_accident SET geom=ST_GeomFromText('POINT(' ||
location_easting_osgr || ' ' || location_northing_osgr || ')',27700);
UPDATE london.tenant_app_accident SET geom=ST_GeomFromText('POINT(' ||
location_easting_osgr || ' ' || location_northing_osgr || ')',27700);
CREATING THE TEMPLATE
• Create a new folder called static in tenant_app folder, and extract into it
javascript-libraries.zip from https://github.com/anushamc/foss4guk-django-
tenants/blob/master/javascript-libraries.zip?raw=true
• Create a new folder called templates in tenant_app folder and place file
index.html from https://raw.githubusercontent.com/anushamc/foss4guk-
django-tenants/master/multi_county/tenant_app/templates/index.html
• Create a new folder called js in tenant_appstatic folder and place file
accidents.js from https://raw.githubusercontent.com/anushamc/foss4guk-
django-tenants/master/multi_county/tenant_app/static/js/accidents.js
CREATING THE TEMPLATE
• Create a new folder called css in tenant_appstatic folder and
place files themes.min.css and accidents.css from
https://raw.githubusercontent.com/anushamc/foss4guk-django-
tenants/master/multi_county/tenant_app/static/css/theme.min.css
and https://raw.githubusercontent.com/anushamc/foss4guk-django-
tenants/master/multi_county/tenant_app/static/css/accidents.css
CREATING THE VIEW
• Replace the contents of the tenant_app/views.py file with
https://raw.githubusercontent.com/anushamc/foss4guk-django-
tenants/master/multi_county/tenant_app/views.py
• Replace the contents of the multi_county/urls.py file with
https://raw.githubusercontent.com/anushamc/foss4guk-django-
tenants/master/multi_county/multi_county/urls.py
• Open the terminal and run
python3 manage.py runserver
• Open mainsite.com:8000 to get an empty map,
cumbria.mainsite.com:8000 to get the accidents points layer from Cumbia,
london.mainsite.com:8000 to get London, and
lancashire.mainsite.com:8000 to get the data from Lancaster
Thank you for your time!

More Related Content

PPTX
An Overview on Nuxt.js
PDF
Nuxt.JS Introdruction
PPT
Multi Tenancy With Python and Django
PDF
2020 07-30 elastic agent + ingest management
PDF
PSU Security Conference 2015 - LAPS Presentation
PPTX
Node.js Express
PDF
AWSのログ管理ベストプラクティス
PPTX
Microsoft LAPS - Local Administrator Password Solution
An Overview on Nuxt.js
Nuxt.JS Introdruction
Multi Tenancy With Python and Django
2020 07-30 elastic agent + ingest management
PSU Security Conference 2015 - LAPS Presentation
Node.js Express
AWSのログ管理ベストプラクティス
Microsoft LAPS - Local Administrator Password Solution

What's hot (20)

PDF
Why Vue.js?
PDF
Why Task Queues - ComoRichWeb
PDF
Next.js Introduction
PPTX
React Workshop
PPTX
Active Directoryドメインを作ってみよう ~フォレストに新しいツリーのドメインを追加~
PDF
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
PDF
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
PDF
Introduction to RxJS
PPTX
RESTful API Design Best Practices Using ASP.NET Web API
PDF
Nuxt.js - Introduction
PDF
AWS Black Belt Techシリーズ Amazon EBS
PDF
#idcon vol.29 - #fidcon WebAuthn, Next Stage
PDF
単なるキャッシュじゃないよ!?infinispanの紹介
PDF
introduction to Vue.js 3
PDF
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
PPTX
Angular 2.0 forms
PPTX
Spring boot
PDF
How To Set Up SQL Load Balancing with HAProxy - Slides
PDF
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
PDF
Monitoring Kubernetes with Elasticsearch Services - Ted Jung, Consulting Arch...
Why Vue.js?
Why Task Queues - ComoRichWeb
Next.js Introduction
React Workshop
Active Directoryドメインを作ってみよう ~フォレストに新しいツリーのドメインを追加~
20200303 AWS Black Belt Online Seminar AWS Cloud Development Kit (CDK)
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
Introduction to RxJS
RESTful API Design Best Practices Using ASP.NET Web API
Nuxt.js - Introduction
AWS Black Belt Techシリーズ Amazon EBS
#idcon vol.29 - #fidcon WebAuthn, Next Stage
単なるキャッシュじゃないよ!?infinispanの紹介
introduction to Vue.js 3
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
Angular 2.0 forms
Spring boot
How To Set Up SQL Load Balancing with HAProxy - Slides
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
Monitoring Kubernetes with Elasticsearch Services - Ted Jung, Consulting Arch...
Ad

Viewers also liked (20)

PDF
Developing Software As A Service App with Python & Django
PDF
Moving from Django Apps to Services
PDF
¿Porqué Python? ...y Django
PDF
2012 07 making disqus realtime@euro python
PPT
Django multi-tier
ODP
PDF
Criando websites a jato com Django
PDF
Django: desenvolvendo aplicações web de maneira simples e rápida!
PDF
Modelo, vista, controlador
PPTX
MODELO VISTA CONTROLADOR
PDF
ZCA: A component architecture for Python
PDF
Cursos Isla 2007: Administración Avanzada Linux (DHCP)
PDF
Django: Desenvolvendo uma aplicação web em minutos
PPTX
Dev/Test Scenarios in the DevOps World
PDF
Intro django
PDF
LCNUG 2015 - what's new for agile teams in TFS 2015
PDF
Why Django
PDF
Django Multi-DB in Anger
PDF
Database Considerations for SaaS Products
Developing Software As A Service App with Python & Django
Moving from Django Apps to Services
¿Porqué Python? ...y Django
2012 07 making disqus realtime@euro python
Django multi-tier
Criando websites a jato com Django
Django: desenvolvendo aplicações web de maneira simples e rápida!
Modelo, vista, controlador
MODELO VISTA CONTROLADOR
ZCA: A component architecture for Python
Cursos Isla 2007: Administración Avanzada Linux (DHCP)
Django: Desenvolvendo uma aplicação web em minutos
Dev/Test Scenarios in the DevOps World
Intro django
LCNUG 2015 - what's new for agile teams in TFS 2015
Why Django
Django Multi-DB in Anger
Database Considerations for SaaS Products
Ad

Similar to SaaSy maps - using django-tenants and geodjango to provide web-gis software-as-a-service (20)

PDF
Strategies for refactoring and migrating a big old project to be multilingual...
PDF
GeoDjango & HTML5 Geolocation
PDF
Powerful geographic web framework GeoDjango
PDF
Scaling Multi-Tenant Applications Using the Django ORM & Postgres | PyCaribbe...
DOCX
Location Based System Documentation.docx
PPTX
Geo django
PPTX
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
PDF
Building a multitenant application with Django
PDF
GDG Addis - An Introduction to Django and App Engine
PPTX
PDF
A travellers guide to mapping technologies in django
PDF
Django Overview
PDF
Data herding
PDF
Data herding
PPT
Mini Curso Django Ii Congresso Academico Ces
KEY
國民雲端架構 Django + GAE
PDF
PDF
The Best (and Worst) of Django
PDF
Scaling Multi-tenant Applications Using the Django ORM & Postgres | PyCon Can...
KEY
Scaling Django for X Factor - DJUGL Oct 2012
Strategies for refactoring and migrating a big old project to be multilingual...
GeoDjango & HTML5 Geolocation
Powerful geographic web framework GeoDjango
Scaling Multi-Tenant Applications Using the Django ORM & Postgres | PyCaribbe...
Location Based System Documentation.docx
Geo django
Corinne Hutchinson's 7/8/2015 PuPPy Presentation on GeoDjango
Building a multitenant application with Django
GDG Addis - An Introduction to Django and App Engine
A travellers guide to mapping technologies in django
Django Overview
Data herding
Data herding
Mini Curso Django Ii Congresso Academico Ces
國民雲端架構 Django + GAE
The Best (and Worst) of Django
Scaling Multi-tenant Applications Using the Django ORM & Postgres | PyCon Can...
Scaling Django for X Factor - DJUGL Oct 2012

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
A Presentation on Artificial Intelligence
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
KodekX | Application Modernization Development
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
A Presentation on Artificial Intelligence
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Monthly Chronicles - July 2025
Network Security Unit 5.pdf for BCA BBA.
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced methodologies resolving dimensionality complications for autism neur...
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The AUB Centre for AI in Media Proposal.docx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

SaaSy maps - using django-tenants and geodjango to provide web-gis software-as-a-service

  • 1. SAASY MAPS - USING DJANGO- TENANTS AND GEODJANGO TO PROVIDE WEB-GIS SOFTWARE-AS-A- SERVICE Anusha Chickermane
  • 2. OBJECTIVES • create a semi-isolated multi-tenant architecture using django- tenants+postgresql • build on top of it using geodjango+postgis+openlayers to provide individualised web mapping services to different clients • performance and security implications of this approach • We achieve this by creating a website that shows accident point locations for three different counties and brings up the associated attributes of date_of_accident and number_of_vehicles • Code and this presentation at https://github.com/anushamc/foss4guk- django-tenants
  • 3. SOFTWARE AS A SERVICE • SaaS - software deployment model where applications are remotely hosted by the service provider and made available to customers on demand • Eg. github.io, has multiple tenants • tombatossals.github.io/angular- openlayers-directive/ – user tombatossals example page • blueimp.github.io/jQuery-File-Upload/ - user bluimp’s example page • We look at the top 2 layers of the SaaS architecture – Saas apps and Application services
  • 4. SAAS SECURITY CONCERNS • SaaS deployment model – Aws or self-hosted? • Data security(encryption, app vulnerability) – Django+postgres • Network security (SSL) – Django • Regulatory compliance • Data segregation – tenant-schemas • Availability • Backup • Identity management and sign-on process - Django
  • 5. DATA SEGRATION • django-tenants lies in the middle: shared database, separate schemas • Isolated – more secure, but costlier to implement and maintain, and lower performance • Shared – less secure, but easier to implement and better performance • The right choice on the spectrum depends on business requirements and sensitivity of the data
  • 6. PERFORMANCE • Not as memory intensive as having separate databases • As the number of schemas (i.e. tenants) grows, propagating model (i.e. database structure)changes will take longer – parallel migrations help reduce this performance hit • Since the same database models are used across tenants, customisation of each tenant is limited to only changing the look & feel via templates – i.e cant have one geometry field for one tenant and two for another in the same model • If using main-domain and subdomain, eg github.io and bluimp.github.io, need to watch out for cookie attacks across subdomains
  • 7. THE DJANGO FRAMEWORK • MVT – Model View Template • Model – defines the data structure and handles the database queries • View – determines what data from the model should be returned in HTTP response • Template – renders data in HTML(or JSON or XML) and makes it look pretty
  • 8. A TYPICAL DJANGO PROJECT • mysite/ • manage.py • mysite/ • settings.py • urls.py • wsgi.py • app/ • admin.py • migrations/ • models.py • static/ • css/ • js/ • templates/ • Index.html • tests.py • views.py • manage.py – runserver, makemigrations, migrate • settings.py – database and site settings • urls.py – urls mapped to views • admin – to create the admin interface • Models – define the database structure • Templates – html files with Django tags • Views – handle get and post requests
  • 9. DJANGO-TENANTS APP • public_app – accessed from the main domain i.e. www.mainsite.com • tenant_app – accessed from the tenant’s sub-domain • mysite/ • manage.py • mysite/ • settings.py • … • public_app/ • admin.py • migrations/ • … • tenant_app/ • admin.py • migrations/ • …
  • 10. SETUP • Boot from OS-Geo-Live • Insert disk into CD drive, restart system and hold down F12 to access boot options • For windows 8 and above – Click on the power option (either on the Start Screen or the Charms Bar) and then hold down the shift key while clicking on Restart.
  • 11. MODIFYING THE HOSTS FILE TO SIMULATE DIFFERENT TENANTS • Open the terminal and run the following command: sudo vim /etc/hosts • Near the top of the file, add the following lines: 127.0.0.1 mainsite.com 127.0.0.1 cumbria.mainsite.com 127.0.0.1 lancashire.mainsite.com 127.0.0.1 london.mainsite.com • To exit the editor, press ESC and then type :wq
  • 12. CREATING THE DATABASE • Open pgAdmin III. • Create a new database called ‘multi_county_db’. • Add the postgis extension.
  • 13. INSTALLING DJANGO, GEODJANGO AND DJANGO-TENANTS • Open the terminal and run • Install pip and django: sudo apt-get install python3-pip sudo pip3 install django • Install python bindings for postgres: sudo apt-get install python3-psycopg2 • Install Django-tenants: sudo pip3 install django-tenants
  • 14. CREATING THE PROJECT • Open the terminal and run • Create the project django-admin startproject multi_county • Open the project and create apps cd multi_county python3 manage.py startapp public_app python3 manage.py startapp tenant_app • Replace contents of multi_countysettings.py with https://raw.githubusercontent.com/anushamc/foss4guk-django- tenants/master/multi_county/multi_county/settings.py • Replace contents of public_appmodels.py with https://raw.githubusercontent.com/anushamc/foss4guk-django- tenants/master/multi_county/public_app/models.py
  • 15. CREATING THE PROJECT • Open the terminal and run python3 manage.py migrate_schemas –-shared • Replace contents of tenant_appmodels.py with https://github.com/anushamc/foss4guk-django- tenants/blob/master/multi_county/tenant_app/models.py • Open the terminal and run python3 manage.py makemigrations python3 manage.py migrate_schemas
  • 16. CREATING THE TENANTS******** • In the same folder as manage.py, download the file create_tenants.py from • Open the terminal and run python3 manage.py shell < create_tenants.py
  • 17. IMPORTING THE DATA • Download the data for the schemas from https://github.com/anushamc/foss4guk-django- tenants/tree/master/data • Go to PG Admin III and expand the schemas Lancashire, cumbria and london • Right-click the tenant_app_accident table for each county schema, and select Import… • In File Options tab, change type to csv and choose the relevant csv file • In Columns uncheck id and geom • In Misc. Options check header • Click Import button • Do this for all 3 county schemas
  • 18. IMPORTING THE DATA • From PG Admin III Run the following sql command on the database: UPDATE antrim.tenant_app_accident SET geom=ST_GeomFromText('POINT(' || location_easting_osgr || ' ' || location_northing_osgr || ')',27700); UPDATE lancashire.tenant_app_accident SET geom=ST_GeomFromText('POINT(' || location_easting_osgr || ' ' || location_northing_osgr || ')',27700); UPDATE london.tenant_app_accident SET geom=ST_GeomFromText('POINT(' || location_easting_osgr || ' ' || location_northing_osgr || ')',27700);
  • 19. CREATING THE TEMPLATE • Create a new folder called static in tenant_app folder, and extract into it javascript-libraries.zip from https://github.com/anushamc/foss4guk-django- tenants/blob/master/javascript-libraries.zip?raw=true • Create a new folder called templates in tenant_app folder and place file index.html from https://raw.githubusercontent.com/anushamc/foss4guk- django-tenants/master/multi_county/tenant_app/templates/index.html • Create a new folder called js in tenant_appstatic folder and place file accidents.js from https://raw.githubusercontent.com/anushamc/foss4guk- django-tenants/master/multi_county/tenant_app/static/js/accidents.js
  • 20. CREATING THE TEMPLATE • Create a new folder called css in tenant_appstatic folder and place files themes.min.css and accidents.css from https://raw.githubusercontent.com/anushamc/foss4guk-django- tenants/master/multi_county/tenant_app/static/css/theme.min.css and https://raw.githubusercontent.com/anushamc/foss4guk-django- tenants/master/multi_county/tenant_app/static/css/accidents.css
  • 21. CREATING THE VIEW • Replace the contents of the tenant_app/views.py file with https://raw.githubusercontent.com/anushamc/foss4guk-django- tenants/master/multi_county/tenant_app/views.py • Replace the contents of the multi_county/urls.py file with https://raw.githubusercontent.com/anushamc/foss4guk-django- tenants/master/multi_county/multi_county/urls.py • Open the terminal and run python3 manage.py runserver • Open mainsite.com:8000 to get an empty map, cumbria.mainsite.com:8000 to get the accidents points layer from Cumbia, london.mainsite.com:8000 to get London, and lancashire.mainsite.com:8000 to get the data from Lancaster
  • 22. Thank you for your time!

Editor's Notes

  • #4: Image from http://www.infosectoday.com/Articles/Securing_SaaS_Applications.htm
  • #7: Cookie attacks - https://github.com/blog/1466-yummy-cookies-across-domains
  • #8: Image from - http://brionas.github.io/2013/11/15/share-django/
  • #9: Structure based on https://docs.djangoproject.com/en/1.9/intro/tutorial01/
  • #13: Right click Databases to create a new database Open Plugins>PostGIS Shapefile Import/Export Manager