Instant download Flask Blueprints 1st Edition Joel Perras pdf all chapter
Instant download Flask Blueprints 1st Edition Joel Perras pdf all chapter
com
https://ebookname.com/product/flask-blueprints-1st-edition-
joel-perras/
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/node-js-blueprints-tsonev/
ebookname.com
https://ebookname.com/product/elasticsearch-blueprints-1st-edition-
vineeth-mohan/
ebookname.com
https://ebookname.com/product/arduino-android-blueprints-1st-edition-
schwartz/
ebookname.com
https://ebookname.com/product/geoffrey-hill-and-his-contexts-1st-new-
ed-edition-pennington/
ebookname.com
The Counterterrorism Handbook Tactics Procedures and
Techniques 2 ed 2nd Edition Bolz Frank Jr.
https://ebookname.com/product/the-counterterrorism-handbook-tactics-
procedures-and-techniques-2-ed-2nd-edition-bolz-frank-jr/
ebookname.com
https://ebookname.com/product/posters-of-the-first-world-war-1st-
edition-david-bownes/
ebookname.com
https://ebookname.com/product/evolutionary-psychology-david-buss/
ebookname.com
Economy and society in the age of Justinian Emperor Of The
East Justinian I
https://ebookname.com/product/economy-and-society-in-the-age-of-
justinian-emperor-of-the-east-justinian-i/
ebookname.com
Flask Blueprints
Joël Perras
BIRMINGHAM - MUMBAI
Flask Blueprints
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-78439-478-3
www.packtpub.com
Credits
Reviewers Proofreader
Shalabh Aggarwal Safis Editing
Christoph Heer
Andreas Porevopoulos Indexer
Monica Ajmera Mehta
Commissioning Editor
Julian Ursell Graphics
Disha Haria
Acquisition Editor
Meeta Rajani Production Coordinator
Nilesh R. Mohite
Technical Editor
Bharat Patil
Copy Editor
Tasneem Fatehi
About the Author
Currently, his days are spent building infrastructure and Python applications with
the incredible people at Fictive Kin, writing open source code, and trying to lift
heavy weights over his head on a regular basis.
I'd like to thank Sara for her infinite patience throughout the
process of writing this lengthy technical manual and my coworkers
at Fictive Kin for dealing with my particularly bad sense of humor
on a daily basis.
About the Reviewers
The agile practices that he uses for all his developing/deploying needs are Git,
Ansible, Vagrant, and Docker.
www.PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.
com and as a print book customer, you are entitled to a discount on the eBook copy.
Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser
[ ii ]
Table of Contents
[ iii ]
Preface
The setting is familiar enough: you're a web developer who has worked with a
few programming languages, frameworks and environments, and decided to learn
enough Python to make a few toy web applications. Maybe you've already used
some Python web frameworks to build an application or two, and want to explore a
few of the alternative options that you keep hearing about.
As a microframework, Flask is built to help you and then get out of your way.
Taking a very different approach from most other general-purpose web frameworks,
Flask consists of a very small core that handles the processing and normalization
of HTTP and the WSGI specification (via Werkzeug) and provides an exceptionally
good templating language (via Jinja2). The beauty of Flask lies in its intrinsic
extensibility: as it was designed from the start to do very little, it was also designed
to be extended very easily. A pleasant consequence of this is that you are not
beholden to a particular database abstraction layer, authentication protocol, or
caching mechanism.
Learning a new framework is not simply about learning the basic functions and
objects that are provided to you: it's often as important to learn how the framework
can be adapted to help you build the specific requirements of your application.
This book will demonstrate how to develop a series of web application projects with
the Python web microframework, and leverage extensions and external Python
libraries/APIs to extend the development of a variety of larger and more complex
web applications.
[v]
Preface
Chapter 2, Small to Big – Growing the Flask Application Structure, explores the various
baseline layouts and configurations that you might consider for a Flask application.
The pros and cons of each approach are outlined as we progress from the simplest one-
file application structure to the more complex, multipackage Blueprint architecture.
Chapter 3, Snap – the Code Snippet Sharing Application, builds our first simple
Flask application centered around learning the basics of one of the most popular
relational database abstractions, SQLAlchemy, and several of the most popular Flask
extensions: Flask-Login to handle authenticated user login sessions, Flask-Bcrypt
to ensure that account passwords are stored in a secure manner, and Flask-WTF to
create and process form-based input data.
Chapter 4, Socializer – the Testable Timeline, builds a very simple data model for a
social web application where the main focus is on unit and functional testing using
pytest, the Python testing framework and tools. We will also explore the use of
the application factory pattern, which allows us to instantiate separate versions of
our application for the purposes of simplifying testing. Additionally, the use and
creation of often-omitted (and forgotten) signals, provided by the Blinker library, are
described in detail.
[ vi ]
Another Random Document on
Scribd Without Any Related Topics
CHAPTER VI. MOKUNA VI.
Sometime after the battles spoken of in Chapter V were Mahope mai o kela mau hoouka kaua ana i ole
fought, where Kualii maintained his title of king of Oahu, V, a me ko Kualii lanakila ana, a pau ka hoopo
after the land matters were satisfactorily arranged, he aina, alaila, holo hou aku la o Kualii i Hawaii, a
again set sail for Hawaii and landed in Hilo where he ai. A liuliu kona noho ana malaila, alaila, kui a
took up his residence for some time. While there word kaua ma Molokai, ua kaua aku a kaua mai a p
was brought to him of wars on Molokai, where several o na ’lii. No ka mea, o na ’lii o Koolau o Moloka
pitched battles had been fought and the chiefs were in loa lakou e lilo Kekaha ia lakou, mai Kawela a
conflict with one another all the time. The cause of all mea, o ka ia ke kumu o ko lakou manao nui a
the trouble was this: The chiefs on the Koolau side of ua paa no i na ’lii o Kekaha, a nolaila i kipi ai n
Molokai were anxious to get possession of Kekaha, a manawa.
stretch of country from Kawela to Maamomi; and the
reason why these chiefs were so desirous of getting
possession of this section of country was on account of
the fishing. But the chiefs of Kekaha, knowing the value
of these fishing grounds, were determined to hold on to
them; so this determination on their part caused a
general internal conflict at this time.
When Kualii heard of this general conflict on Molokai, he A no keia mea, lohe ae la o Kualii i keia kaua m
left Hilo and set sail for Molokai. On the way Kualii aku la oia ia Hilo, a holo mai la i Molokai. Hiki
touched at Honokawai in Kaanapali, Maui, where a chief Honokawai, i Kaanapali ma Maui, ua puka aku
by the name of Paepae arrived at the same time. This Kanapaali ia manawa. O ua Paepae nei, oia ke
Paepae was one of the chiefs of Kekaha, and the reason manawa. A o ke kumu o kona hiki ana i Maui,
why he had come to Maui was to enlist Kauhi, one of kekahi alii o Maui, he keiki ua o Kauhi na Kauh
the chiefs of Maui, to come to their aid. This Kauhi was Kamalalawalu. Ia Paepae i hiki mai ai ma Kaan
the son of Kauhiakama, the younger brother of lohe ae la oia o Kualii keia, ua hiki aku ma Kaa
Kamalalawalu. Upon Paepae’s arrival at Kaanapali he oia e ike maopopo ia Kualii, no ka mea ua kau
was told that Kualii had already arrived there. Upon ikaika, a oia wale no ke kumu o ko Paepae he
hearing this he went to ascertain whether it was really maopopo. [419]
the Kualii who was noted for his great strength. That
was the sole purpose of Paepae’s visit to see and be
assured that it was Kualii. [418]
When Paepae saw for himself that it was indeed Kualii A ike aku la o Paepae o Kualii io keia, nolaila,
he decided there and then to abandon his first idea of manao mua e kii ia Kauhi. A no keia mea, hoi
enlisting Kauhi’s aid, and left in haste for Kekaha to aku la i kekahi mau alii o Kekaha, o Kualii keia
notify the chiefs of his discovery and to ask their ma Kaunakahakai, aia na ’lii a pau o Kekaha m
consent to the change in the programme. Upon his hoomakaukau ana no ka hoouka kaua ke hiki
arrival at Kaunakakai he found that all the chiefs of Paepae i hiki aku ai ma Kalamaula, ike mai la n
Kekaha had gone to Kalamaula preparing for another
battle to commence upon the arrival of Kauhi. But when Paepae; a no ia mea, nana mai la na ’lii i ka ho
Paepae arrived at Kalamaula the chiefs saw that Paepae olelo.
had returned alone and so were anxious to hear what he
had to say about his mission.
When Paepae came up to the chiefs he was asked: A halawai o Paepae me na ’lii ninau mai la lako
“Where is Kauhi, the chief?” Paepae replied: “I left here Kauhi?” I aku la o Paepae: “Ua hele aku nei au
with my mind fully made up to procure Kauhi, but upon Kauhi, aka, halawai koke aku nei wau me ke a
my arrival at Kaanapali I met Kualii, the king of Oahu, so ma Kaanapali, nolaila hoi mai nei wau e hai ak
I returned to inform you of this fact and to urge upon ia Kualii e lawe mai ma ko kakou aoao, o lilo e
you to try and enlist him on our side, else the Koolau Koolau mau alii.” A no ia mea, hoolale hou na
chiefs will get him first.” When the chiefs heard this they a hoouna pu aku la ia Kapolei ke kaikamahine
urged upon Paepae to again set sail, and also sent mea hoolealea ia Kualii.
Kapolei, daughter of Keopuolono, to entertain Kualii.
Early that morning Paepae reached Kaanapali, but to his
surprise found that Kualii had already left for Molokai at
dawn.
Upon hearing that Kualii had already left for Molokai, he Ma ia wanaao no hiki aku la o Paepae i Kaana
boarded his canoes again and returned in haste. While mai o Kualii ia wanaao no i Molokai. A lohe o P
in mid-channel he saw the flapping of the sails of canoes o Kualii, hoi hou mai la no oia, a iwaena moan
inside of the reef at Kamalo, so Paepae followed in. kilepalepa ana ka pea o ka waa, maloko o kua
Before the several things in Kualii’s canoes could be malaila no o Paepae i hiki mai ai. Aole i pau na
taken ashore and before the canoes could be hauled on Kualii i ka lawe i uka, e hekau ana no i kai no
the beach, Paepae arrived and moored his canoe at the ana o Paepae a hekau pu na waa me ko Kualii
stern of Kualii’s canoes. Without further delay Paepae waa.
told Kualii the object of his errand in the following
words: “I have come to entreat you to come to our Ia manawa, hoomaka koke no o Paepae e hai
rescue. The chiefs of Koolau have taken up arms against aku ai ia Kualii, me ka i aku: “I kii mai nei wau
us with the intention of taking away from us our lands makou. Aia na ’lii la o Koolau, ua kipi mai nei i
from Kawela to Maamomi. Because of this desire on ko Koolau mau alii, e lilo ko makou mau aina m
their part we have had several disputes and a battle is Maamomi; a nolaila, ua kue aku a kue mai ma
about to commence. A minor engagement has already ke kaua wale no koe; ua hoomaka mua iho ne
taken place, however, in which we were beaten. The ua hee makou, o ka nui o na ’lii aia iluna o Ma
majority of the chiefs are encamped on the top of ai.”
Maunaloa.”
When Kualii heard this he immediately gave his consent A lohe o Kualii i keia olelo o ka ae koke no ia,
and the canoes were again put to sea and they set sail a kau ma Kaunakahakai, a kukakuka ae la me
for Kaunakakai where they arrived in due time. A council kuka ana, o ka hele koke iho la no ia, maluna
was then held by the chiefs, at the close of which they kanaka, mauka na ’lii o Molokai me Kualii, a hi
set out. The men were embarked on the canoes, while malaila kau aku la o Kualii ma me na ’lii malun
the Molokai chiefs and Kualii went by land until they Kalaupapa.
reached Maamomi, where Kualii and the chiefs took the
canoes and set sail for Kalaupapa.
When the chiefs of Koolau heard that the war was to be I ka lohe ana aku o na ’lii o Koolau ua hiki aku
carried into Kalaupapa, the war canoes were put out Kalaupapa, nolaila holo mai la na waa kaua m
from Halawa and from all the Koolau side to go to Koolau a puni no ka hoouka kaua. Aka, ua hoo
battle. But Kualii and his chief warriors, Maheleana and Kualii me kona mau pukaua me Maheleana a m
Malanaihaehae, with two other warriors had already me kekahi mau pukaua e ae elua. A make pio
encountered the chiefs residing at Kalaupapa and had ana ma Kalaupapa ia manawaa. A hiki mai la k
defeated these chiefs. But other chiefs of Koolau and o Koolau a mai Kona mai kekahi mau alii me n
Kona with their men arrived soon after this who were makaukau no ka hoouka kaua i na ’lii o Kekah
prepared to continue the battle against the chiefs of kaua ana no, alaila ua oi aku ko Paepae ikaika
Kekaha. In this battle Paepae was very conspicuous both mamua o na pukaua a Kualii. A lanakila ae la o
in strength and bravery, so much so that he and his o na ’lii o Molokai a puni, a lilo ae la ka aina ia
force surpassed the chief warriors of Kualii. When Kualii Koolau.
and his followers were victorious over all the chiefs of
Molokai all the lands on the Koolau side came into Aka, aole me ka luku i ka laau palau kela lana
Paepae’s possession. This victory was not, however, i ka luku ana a Kualii me ka maka o ke koi ana
gained through the use of the war clubs, but through inoa, he koi pohaku. A penei ka moolelo o ka
the use of Kualii’s stone axe named Haulanuiakea. ka maka o ke koi. [421]
Following is the story of the destruction of the enemy by
Kualii with the blade of the axe. [420]
While Kualii and his followers were floating in their Ia Kualii ma e lana ana ma kahi one i Kalaupa
canoes over the sand bar at Kalaupapa the soldiers from koa, a lalau i ka waa o Kualii e hoopio, he mau
Koolau swam out to the canoes of Kualii with the nui, a auamo ae la i na waa o Kualii. Ia wa, ku
intention of capturing them; there were some forties in kana koi a hili iho la me ka maka o ke koi ma
number. When they got to the canoes they took hold of waa, a hio aku la kekahi waa i lalo oiai ua amo
them and lifted them onto their shoulders. While this mai la hoi o Malanaihaehae, ua pau na kanaka
was being done Kualii rose with his axe in hand and make. Alaila, ku ae la ua Malanaihaehae nei, a
swung it along one side of the canoes killing those on ma ko Kualii lima e paa ana, a oki iho la ma ke
that side, which caused the canoes to lean toward that aku la na kanaka i ka make, a haule iho la na
side as the canoes were then on the shoulders of the e like me mamua.
men. When Malanaihaehae saw that the people on one
side of the canoes were all slain, he rose and reached
for the axe which was being held in Kualii’s hand and
swung it along the other side of the canoes, which slew
all the people on that side; and the canoes again fell on
even keel in the sea and floated as before.
Not very long after this some more of the enemy came Aole no i liuliu, hiki hou mai la no he mau kana
along, equal in number to those that had been slain, ka nui me na kanaka mua i make, a lawe ae la
and again lifted up the canoes of Kualii just as the Kualii iluna e like me ka auamo mua ana no a
others had done, without any signs of fear, although the makau ole mai i keia poe e make ana. Ia mana
others were floating around dead. Again the axe was la no me ka maka o ke koi, a lanakila hou ae l
used with deadly effect and again Kualii and his maka o Haulanuiakea. Pela mau no ka luku an
followers were victorious by the use of the blade of kanaka i ka make. A i ka hoouka kaua hope lo
Haulanuiakea. This was kept up until the whole army hookuu aku la o Kualii i ka luku ia Paepae me
was slain. lanakila ae la o Paepae maluna o na koa a pau
ka luku ana ma Pelekunu, ku aku ai o Paepae
At the final battle which was fought at Pelekunu, Kualii iluna o na waa me ka i aku: “Ua pau oukou i k
left the fighting to Paepae and Malanaihaehae. Again palau a Kualii.”
Paepae showed his quality by routing the whole army.
After this great slaughter at Pelekunu, Paepae stood up Ia huaoleio, alaila akahi no lakou a lohe o Kua
in the canoe and spoke to the people in a boastful manawa, haawi ae la na ’lii o Koolau i ka aina
manner saying: “You are all slain by the war club of Kualii. A ma keia kaua ana, o keia ke kaua i ol
Kualii.” At these words the people were for the first time
made aware of the fact that it was Kualii that had killed mau lalani mele o ko Kualii inoa i hoike ia ma
their men. The chiefs of Koolau then gave up to Kualii me ka hai ana malalo iho penei:
the whole of Molokai. It was this battle that a few lines
of the Kualii mele speaks of in Chapter I, which run as
follows:
After Kualii completed the redivision of the lands of Mahope iho o ka pau o ka Kualii hooponopono
Molokai, those pertaining to the chiefs as well as to the me ka hooponopono ana i na ’lii a me na kana
people, he returned to Oahu accompanied by his o Kualii i Oahu me kona mau hoa hele, kana m
companions, his chief warriors. Upon arriving from hoi ana mai a Kualii mai Molokai mai, a noho m
Molokai he proceeded on his way to Kailua where he ana no nae ka pono o ka noho ana o na kanak
found that the chiefs and people were all living in peace. mau manawa mahope mai o ka noho ana ma
After residing on Oahu for some time Kualii again set out aku la o Kualii i Hawaii a noho hou ma Hilo, oi
for Hawaii and again took up his residence in Hilo, this hiki ana ma Hilo.
being the third time that he decided to go and live
there. After Kualii had been living in Hilo for some time Noho iho la o Kualii ma Hilo ia manawa, a he m
word was brought to him that war had broken out on mahope mai, lohe hou aku la no ua o Kualii he
Lanai, caused by Kauhi, son of Kauhiakama; the chief of Kauhi, keiki a Kauhiakama, no ka mea, ua kipi
Lanai having taken up arms against the son of Lanai i ke keiki a Kauhiakama kekahi kuhina o
Kauhiakama, one of Kamalalawalu’s ministers. Following penei ka moolelo o ke kaua ana. I kekahi man
is the story of this battle: Haloalena, a o ka puni punahele a ua alii la, o
manawa e hiki aku ai ka auhau manu a ke alii,
Haloalena, the chief of Lanai, was considered a very i ka luna a ua alii nei ka hele e kala aku i ka ol
good ruler. His great favorite pastime was the collection like me kona makemake. A penei e kala hele a
of the skeletons of birds. When the chief’s bird tax was
about due it was the usual custom of the agents to go
out and proclaim the chief’s wishes. Following was the
proclamation announced by the agents:
This was the king’s constant proclamation to the people Penei ke alii e kala aku ai imua o na kanaka, i
in order that they be informed of his law. After a person ko ke alii kanawai. Aia a pau ka ke kanaka han
has cleaned the skeleton of a bird it is then carried into alaila lawe ia aku la e kukulu maloko o kekahi
one of the king’s warehouses and there made to stand. elua, He mau manu iwi wale no, i lawe ia ka io
These skeletons are picked clean of their meat and are like aku la iloko o ka halau. Aia a makaukau ko
stood up in rows in their storehouses. After the king’s alaila kii aku la ke kanaka i ke alii e hele mai e
wishes are carried out he is then sent for to come and manu iwi. Ia manawa a ke alii e hele aku ai e
look at the skeletons. After looking through one house a na manu iwi maloko o ka halau; aia a pau ae
he would go to the next one and inspect the skeletons in halau manu, aiaila komo aku ana he halau hou
that house. This was Haloalena’s usual way of passing mau ai o Haloalena. I ka pau ana ae o ka ke a
his time. After inspection the king would retire to his alaila hoi aku la ke alii i ka hale.
house.
Once upon a time Kauhi happened to be in Lanai and Aia a lohe o Kauhi ua hoi o Haloalena i ka hale
saw the king returning to his house one day after komo aku ai o Kauhi iloko o ka hale manu a H
inspecting his skeletons. Kauhi then went into laau loihi, a hili aku la i na manu iwi, a pau loa
Haloalena’s storehouses with long poles and knocked oia e hana mau ai a pau na halau manu o ke a
down all the skeletons from their places, and he kept manawa lohe aku ke alii nana na halau manu
this up until he had gone through all the storehouses of haihai ia e Kauhi, alaila, hele mai la o Haloalen
the chief of Lanai. When the king heard that Kauhi had keiki a Kauhiakama: “Nawai ke kapu [425]o oe?
entered the storehouses and had destroyed all his Kauhi me ka makau ole, me he koa la: “Na Ka
skeletons he sent for the son of Kauhiakama and asked hou aku la o Haloalena: “Na Kauhiakama no o
him: “Whose mischievous son [424]art thou?” Kauhi haihai i kuu mau halau manu?” Alaila olelo ma
answered without fear: “Kauhiakama’s.” Haloalena again olelo mai o Kauhiakama ia’u e hele mai e haih
asked him: “Was it Kauhiakama that told you to destroy manu. Aka, eia kana mea i olelo mai ia’u, e he
all my skeletons?” Kauhi replied: “Kauhiakama did not a e koa hoi, oia wale no kana i olelo mai ia’u;
tell me to destroy the skeletons in your storehouses, but nei au e kolohe.” O keia ke kumu o ke kipi ana
what he told me was to come and act in a mischievous ko Maui, me ka manao, e kuokoa o Lanai aole
manner and to be fearless. This was all he told me; Maui. No ka mea, o ka noho ana o na alii o La
therefore I came and acted mischievously.” This was the o Kamalalawalu ko Maui alii nui.
cause of the hostilities between the king of Lanai and
the king of Maui, and the reason why the king of Lanai
wanted to be independent and not be any longer under
the king of Maui. At this time the chiefs of Lanai were
under the control of Kamalalawalu, king of Maui.
When Kualii heard of this proposed war he set sail from A lohe o Kualii i keia haunaele kaua, ia manaw
Hilo and first touched at Kaupo where he found that the mai Hilo mai a hiki ma Kaupo, ua pau mai na ’
Maui chiefs had gone to Lanai. Upon hearing this Kualii lohe o Kualii ua pau na ’lii o Maui i Lanai, nola
continued on his way to Lanai and landed at Wailehua. oia a pae i Wailehua. I nana aku auanei ka ha
Upon his arrival at this place Kualii saw a fleet of war hoomoana mai ana na waa kaua o Lanai i Kek
canoes in Kekaa. Kamalalawalu at this time was on Lanai Kamalalawalu hoi aia kela me kona puali alii i
with his army waiting for the return of Haloalena when Haloalena o ka hoi aku, alaila hoouka ke kaua
the fight would commence. When Haloalena heard that ana o Haloalena e hiki aku ana o Kualii i keia k
Kualii was on his way to this war he decided to wait with kali ai na waa o Haloalena ma Kekaa. I kekahi
his fleet of war canoes at Kekaa. On the next day the lono o Kualii no kona hiki ana a noho ma Waile
news of Kualii’s arrival at Wailehua was carried to ke kii ana mai a Haloalena ia Kualii e lawe e ka
Haloalena. Immediately upon hearing this he started off Kamalalawalu.
to meet Kualii and entreat him to take up his cause and
fight Kamalalawalu.
That night Kualii and the chiefs of Lanai sailed under the Ia po iho holo aku la o Kualii me ko Lanai mau
lee side of Kaena as directed by the people who were ka holo ana, e like me ke alakai a na kamaaina
acquainted with the place. All that night until the next hoomoana mua na waa o Kualii i kai o Manele
day Kualii’s canoes were moored along the beach at Kamalalawalu elele, hoouna ia aku la oia e hel
Manele. [In the meantime Kamalalawalu was still waiting
for Haloalena.] After a time Kamalalawalu grew anxious Ma ia hele ana, ike aku la o Hinau e lana mai a
and sent for his messenger Hinau and instructed him to ma i Manele, a i ka ike ana aku a Hinau, he m
make a circuit of Lanai. When Hinau arrived at Manele ano, nolaila, hookokoke loa aku la o Hinau e ik
he saw Kualii’s fleet of canoes moored there, and Aka, aole i ike ia o Haloalena me Kualii, ma na
according to their appearance judged them to be war ia Haloalena, a ma na waa hoi ka ike ana ia Ku
canoes. Upon making this discovery Hinau drew closer
with the intention of ascertaining if they were
Haloalena’s. He did not, however, see Haloalena and
Kualii, but by the paddlers he recognized Haloalena’s
canoes, and by the shape and appearance of the others
he was positive they belonged to Kualii.
Upon making this last discovery Hinau returned to Nolaila hoi aku la o Hinau a hai aku la ia Kama
Kamalalawalu and informed him of what he had seen in i ike ai, me ka i aku: “Holo aku nei au ma Mau
the following words: “I ran by way of Maunalei to Kaena aole au i ike iki i ke alii, hele hou mai au a hiki
without seeing the king. From this last place I continued au, he mau waa ke lana mai ana, he waa ano
to Manele and there I saw some canoes moored along kaua. Alaila hele loa aku la au e ike pono, aole
the beach which had the appearance of war canoes. nona na waa, aka, o na hoewaa o ke alii ka’u
Upon making this discovery I drew closer so as to me ko Haloalena mau hoewaa, a o kekahi mau
ascertain their true character. I did not, however, see the waa o Kualii, aole nae au i ike ia Kualii.”
chiefs who owned the canoes, but I saw the king’s
paddlers; they appeared to me to be Haloalena’s men,
and the other canoes looked like those of Kualii. I did
not, however, see Kualii.”
When Kamalalawalu heard Hinau speak of Kualii, he A lohe o Kamalalawalu i ka olelo a Hinau no K
immediately sent for some soldiers and ordered them to ae la o Kamalalawalu i kekahi mau koa, e kii a
go and bring Kualii. When Kauhi heard the orders given lohe ana nae ka Kauhi i ka huaolelo kena no k
to the soldiers he thereupon set out and ran to Manele alaila, puka aku la o Kauhi a holo aku la ma M
to meet Kualii without receiving any orders from Kualii, me kona kena ole ia aku e Kamalalawal
Kamalalawalu to do so, but took it upon himself to be ia Kauhi ke kii e ia Kualii.
the first person to bring Kualii. When Kauhi arrived at
the place where the canoes moored he first looked for Ia Kauhi i hiki aku ai ma kahi a Kualii ma e lan
Haloalena’s canoes and upon ascertaining which canoes hekauia na waa iuka. Aka, o ua Kauhi nei, iaia
were his, this mischievous son of Kauhiakama kahi e hekau ana na waa, nana pono ae la ia,
unfastened the rope that held Haloalena’s canoes [426]to Haloalena, alaila wehe ae la ua keiki kolohe ne
the shore and dropped it in the sea. At this time a [427]i ke kaula hekau o na waa o Haloalena a k
strong breeze was blowing and the canoes were carried ke kai; e pa ana nae ka makani ia manawa, ua
out to sea, leaving Kualii’s canoes by themselves at their iwaho, a haalele mai la i ke kaulike pu ana me
mooring place. Kauhi next took up the rope which held
A o ko Kualii mau waa hoi, lawe ae la keia i ke
Kualii’s canoes to the shore and pulling on it drew them
iuka, a hukihuki mai la i ke kaula hekau, a kau
toward him and when near he jumped aboard,
waa o Kualii, hele aku la ua o Kauhi, a noho ih
approached Kualii and sat on his lap. By the action of
o Kualii. Ia wa, maopopo ae la ia Kualii he keik
the boy Kualii knew he was a mischievous fellow and
Nolaila ninau aku oia: “Nawai ke kupu o oe?” O
therefore asked him: “Whose mischievous son art thou?”
Kauhi replied: “Kauhiakama’s.” Kualii again asked him: “Na Kauhiakama.” Olelo hou o Kualii me ka nin
“Did Kauhiakama tell you to come and sit on my lap?” Kauhiakama no oe i olelo mai e hele mai a noh
Kauhi replied: “Yes, he told me to sit on your lap.” I aku o Kauhi: “Ae, nana no i olelo mai ia’u e n
Because of these positive replies made by Kauhi, Kualii A no keia olelo a Kauhi, manao ae la o Kualii e
made up his mind to go to Kauhiakama and ask him pololei aku ia Kauhiakama. Alaila holo pu aku
directly on the matter. Kualii then set off with Kauhi on Kauhi, a hiki aku la i o Kamalalawalu, ninau ak
their way to meet Kamalalawalu. Upon coming up to Kauhiakama: “Nau no anei keia keiki o Kauhi?”
Kamalalawalu and his company, Kualii turned to Kauhiakama: “Ae, na’u ponoi.” Ninau hou aku
Kauhiakama and asked him: “Is this your son Kauhi?” anei i olelo aku, e hele ae e noho iluna o kuu u
Kauhiakama replied: “Yes, my own son.” Kualii again Kauhiakama: “Aole au i olelo aku ia keiki waha
asked him: “Was it you who told him to come and sit on noho iluna ou e ke alii.” I mai la o Kualii: “Ka!
my lap?” Kauhiakama replied: “I did not tell that olelo ae e noho iluna o’u.” I aku o Kauhiakama
deceitful boy to go and sit on your lap, O King.” Kualii wahahee; kii ia aku na keiki kolohe.” Kii ia aku
remarked: “He told me that you had told him to sit on mai la imua o Kauhiakama kona makuakane, n
my lap.” Kauhiakama then replied: “What a deceitful e Kauhi, he oiaio anei ua olelo aku nei oe i ke
boy; send for that mischievous boy.” Kauhi was then olelo aku e hele e noho iluna o ka uha o ke ali
sent for and he was brought in the presence of “Ae, nau no.” I aku la ka makuakane: “Nani ke
Kauhiakama his father and was then asked: “Say, Kauhi, oe. I nahea nei ka’u olelo ana aku ia oe pela?”
is it true that you told the king (Kualii) that it was I that
had instructed you to go and sit on his lap?” Kauhi
replied: “Yes, you told me to do it.” The father then said:
“You are indeed a deceitful boy. When did I tell you to
do such a thing?”
Kauhi then answered his father without fear: “Here is I mai o Kauhi me ka makau ole i kona makuak
what you told me. While I was teasing the boys and was olelo ia’u. Ia’u e paeha ana i na kamalii, a e uh
pulling up our newly planted fields till you had about opiopio o na mahinaai a kaua, a ana oe i kuu
enough of my mischievous capers, you then spoke to penei: ‘Akahi ke ana ia oe e ke keiki i ke koloh
me in the following words: ‘At last I am sick and tired of ke alo alii e kolohe ai, ilaila e ku ai kau kolohe
your capers; the best thing for you to do is to go and iau; a nolaila au i hele aku ai e kolohe ia Kuali
behave this way in the presence of the king, there you
can cut as much of your capers as you like.’ These were
your very words to me, and that is the reason why I
acted the way I did to the king.”
Because Kauhi spoke the way he did to his father, Kualii A no keia olelo a Kauhi pela i kona makuakane
made up his mind that Kauhi had in him the makings of la o Kualii he kanaka koa o Kauhi, alaila, lawe
a brave soldier, and thereupon took him as one of his Kauhi i koa nona; a lilo ae la o Kauhi i pukaua
soldiers. In course of time Kauhi proved to be what maluna o Maheleana a me Malanaihaehae.
Kualii had predicted of him and was made his chief
warrior, even over Maheleana and Malanaihaehae.
The battle prepared by Haloalena was declared off by Aka, o ke kaua i hoomakaukau mua ia e Haloa
Kualii, and Lanai once more came under the rule of aku la o Kualii ia kaua ana, a hui hou ae la ma
Kamalalawalu. Shortly after this, Kualii returned to Oahu Kamalalawalu. A hoi aku la o Kualii i Oahu, law
taking Kauhi along with him.
CHAPTER VIII. MOKUNA VIII.
In most of the battles fought by Kualii it was customary He mea mau i na hoouka kaua ana a pau a Ku
for him to accompany his soldiers. But later on when me na koa. Aka, no ko Kualii ike ana aku i kon
Kualii saw that his soldiers were proficient and that they makaukau, a ikaika no hoi, nolaila, hookuu ak
showed great strength he decided to let them go to war ke kaua o kona mau koa wale. He nui na kaua
by themselves, while he stayed behind at Kailua. But ai i kona mau koa, noho no nae oia ma Kailua
nevertheless, his soldiers usually told him the time and hoi i [429]na koa o Kualii ka hele aku e hai i ke
place the battles were to be fought, so as to keep the hoouka ai ke kaua, a me ke kahua hoi kahi e h
king informed. This was the [428]practice regularly maopopo ai i ke alii. A pela mau no ka hana a
observed. Kualii, however, often went to witness these o Kualii e makaikai i ke kaua a kona mau koa,
battles without the knowledge of his soldiers. In these mai. Iloko nae o kona manawa e hele ana e n
secret tours of his, he always took part in the battles luku aku la no oia i ke kanaka, a lawe mai i ka
against his enemies and carried away the feather cloaks. pinepine o Kualii e hele ai i na kaua, aka, he m
Kualii often went out to battle in this secret way and the na koa o Kualii. Aia a hoomaka iho ka hoouka
soldiers were puzzled at certain things they saw which aoao elua, aia aku la o Kualii ma kela aoao ka
they were not able to unravel. Every time an kaua e kue mai ana i ko ia nei poe kaua. Aia a
engagement occurred Kualii was there, fighting those o ke kaua, he ike ana ka i ka oili a keia kanaka
who were opposed to his men. At the close of the battle mailoko aku o ka poe kaua, o ka puka aku la n
the men would then see some one come out of the aku la i Kailua; eia no ka o Kualii.
conflict bearing a feather cloak who would disappear on
the way to Kailua. It was no one else but Kualii.
After a while Kualii’s soldiers became very anxious to A no ka uluhua mau o na koa o ua o Kualii i ke
know who this person was that always came out from nei me ka ahuula, nolaila manao ae la na koa
the ranks of the enemy carrying a feather cloak on his kanaka, i ike ai lakou i keia kanaka koa e puka
arm. So the soldiers made up their minds to seize him, ke kahua kaua. Ua nui na hoouka kaua ana i h
so that they would be able to find out who this brave Kualii me ka ike ole ia. A nolaila, ua ninau wale
soldier was. Several battles were fought after this where “O Kualii no paha keia? Owai la?” Nolaila, kuka
Kualii joined in without being recognized by his men, na mea e hiki ai ke hana ia aku nona.
and the soldiers began to question amongst themselves:
“Is it possible that this is indeed Kualii? Who can it be?”
The soldiers therefore held a council to decide what
must be done to him.
One early morning just before dawn Kualii set out from I kekahi kakahiaka ma ka manawa e molehule
Kailua; leaving Kaneohe he went by sea and the sea was no o Kualii mai Kailua mai; a hiki ma Kaneohe,
dried up. When Kualii arrived at Kahaluu that same ke kai, maloo ke kai. A hoea oia i Kahaluu, ma
morning he was seen by a certain boy at Kualoa. The ia manawa ike mai la kekahi keiki i Kualoa, ma
boy resided at Kaoio Point. Upon seeing Kualii the boy i noho ai. I aku la ua keiki nei i ke kupunawah
remarked to his grandmother: “Say, how swiftly that keia kanaka e holo mai nei maloko o ke kai.” I
man runs along the sea.” The grandmother replied: kupunawahine: “Nana pono ia aku, aole na he
“Watch him closely; it cannot be anybody else; it must aku la na, o Ku.” I aku la ka moopuna: “Aia a
be the king, Ku.” The grandson then remarked: “When alaila, alualu au mahope.” I aku ke kupunawah
the king arrives I am going to follow him.” The oe e ukali i ko hanai, e paa aku oe i ka wahi o
grandmother replied: “If you are thinking of following ke alii. Malia o hele kela a alawa iho mahope,
your lord you must carry along these shrimps wrapped peahi, ninau iho ia oe, alaila hai aku oe. Mai h
in ti-leaf together with the king’s fan. It is possible that nae oe, o ae kou aka iluna o ke alii, a mai hele
the king may look behind him and see the fan and malu, o ae oe iluna o ke aka o ke alii; hoomam
would like to know who you are; then make yourself
known to him. Don’t go near him, however; your
shadow may pass over the king; and don’t go on his lee
side for you may step over the king’s shadow, but keep
at a little distance away from him.”
Just as the grandmother concluded her instructions Pau no hoi ka ke kupunawahine olelo ana, hel
Kualii passed by. The boy then followed. Kualii kept on o lakou nei. Ia manawa, ukali pu aku la ua kei
running and passed Kaaawa, then along and over Kualii, a hala o Kaaawa, a ae iluna o na Makau
Makaua and as he was going up the rise from which aku e nana aku ai ia Kahana. I alawa iho auan
place you can see Kahana, Kualii looked behind and saw e pili ana keia keiki mahope o ia nei. I iho la k
a boy following him. The king then remarked: “I see keia mahope.” A no ka makemake ole o Kualii
there is a boy following me.” As the king did not wish to ike ia auanei kana hele ana i ke kaua; nolaila,
be followed for fear that his intention of going to battle Kualii me ka manao o ke one o Kahana kahi e
might be known, he ran much faster with the idea that ua keiki nei.
when they reached the sands of Kahana he would
outrun the boy. When Kualii reached the sands of A hiki o Kualii i ke one o Kahana, holo mama l
Kahana he then ran at great speed along the sea, with ke kai, o ke keiki aku no mahope; a hiki o Kua
the boy close behind; when Kualii got on the other side Kahana e pili aku ai me Punaluu, i alawa iho a
of Kahana which adjoins Punaluu he looked around and e kau aku ana no ke keiki mahope ona. Ia ma
saw the boy still close behind him. The king then ana o Kualii i kona mama, a hala o Punaluu, a
remarked to himself: “Surely this boy is a fast runner.” ana iluna o Kaipapau, i alawa mai auanei o Ku
Passing Punaluu, Kaluanui and up the summit of ua keiki nei mahope. I iho la ke alii: “He oi ka
Kaipapau, the boy kept on following close behind till the mama.” Pela ka uhai holo ana o ua keiki nei m
king reached Waimea; Kualii continued down the slope hiki i Waimea. Iho aku la o Kualii a ma kela ao
and sat down on the other side of the Waimea stream; a o ua keiki nei pili aku la ma keia aoao ma ka
but the boy remained on this side at a place called Piliaama, a malaila [431]oia i noho ai, no ka me
Piliaama where he sat down, as the sun had now risen. la. Manao ua keiki nei e hookokoke aku i kahi
The boy wanted to get nearer to the king, but was aka, manao keia o ae ke aka o ua keiki nei ilun
afraid his shadow might pass over him, so he concluded i pili ai ua keiki nei malaila.
to stay where he was. [430]
While they were at Waimea, Kualii looked and saw that Ia laua me Kualii malaila, nana aku la o Kualii
the boy was holding his fan; he then watched the boy to peahi o ua o Kualii e ua keiki nei; kali aku la n
see if he would use it, but the boy did not, because he mai o ke keiki, aole oia i peapeahi, no ka mea
knew that the fan belonged to the king. Had the king (keiki) no ke alii ka peahi. Ina e ike aku o Kua
seen the boy use the fan the boy would have been peahi ia ana ua peahi nei, ina ua make ua keik
killed. After waiting for a while the king called for the Kualii kali ana, alaila, kahea aku la o Kualii i ke
boy and the boy stood up and went over to meet the a halawai me ke alii. Ninau aku la ke alii: “Naw
king. The king then asked him: “Who gave you that peahi ia oe?” Hai aku la ua keiki nei: “Na ko ka
fan?” The boy answered: “Your honored servant.” Kualii la o Kualii i ke keiki: “E hele ana oe i hea?” I a
again asked the boy: “Where are you going to?” The boy ukali mai nei au i ke alii.” I hou aku ke alii: “In
replied: “I am following the king.” The king again asked ka ahuula, hopu no oe?” I aku la ke keiki: “Ho
him: “If I should run and grab hold of a feather cloak, ahuula.” I hou aku o Kualii: “A ina e hopu au i
would you grab one too?” The boy answered: “I would oe?” “Ae, hopu no au.” Pela aku ke keiki. A no
grab a feather cloak too.” Kualii again asked him: “If I ae la o Kualii, he keiki koa keia.
should seize hold of a man, would you seize one too?”
“Yes, I would seize one too,” replied the boy. After
hearing the boy answer all his questions, Kualii made up
his mind that this must be a very brave boy.
Upon their arrival at Lihue they heard that the two Ma ia hele ana a laua nei a hiki iuka o Lihue, i
armies were encamped at Kalakoa, so they kept right on hoomoana ke kaua i Kalakoa. A nolaila, hele lo
and went into the battle. This is known as the battle of komo iloko o ke kaua, oia ke kaua i olelo ia o
Kukaniloko. When they drew close to the enemy, Kualii nei i hookokoke aku ai, komo aku la o Kualii ilo
entered into the thickest part of the fight with the boy kaua, a komo pu aku la no hoi me ua keiki nei
behind him. Kualii, upon entering into the fight, left his
own men far behind him, but he and the boy kept on A hala na koa ponoi o Kualii mahope o laua, a
with the desire of again encountering the enemy at Paia loaa ke kaua a Paia. Ike aku la o Kualii i ke alii
where another battle was being fought. Upon reaching ka ahuula, hopu aku la o Kualii i ka ahuula a la
Paia, Kualii saw the opposing king dressed in a feather i lawe mai ai i ka ahuula, hopu aku la no hoi u
cloak. Kualii then drew near to the other king and after manamana lima iki a lawe mai la, lalau aku la
killing him seized the feather cloak and took it. While kekahi pepeiao o ua kanaka nei no nona ka ah
Kualii was carrying off the feather cloak the boy cut off
one of the man’s small fingers and took it. The boy also
cut off one of the man’s ears and took it.
After getting the feather cloak Kualii returned with the Hoi mai la o Kualii me ka manao aole e hiki ma
idea that the boy would not be able to follow him out of Ia hoi ana o Kualii me ka manao oia wale no k
the fight. While Kualii was on his way to Kailua with the Kailua, aka, i alawa ae ka hana o Kualii i hope,
idea that he was all by himself, he thought he would keiki mahope ona. Nolaila, kali iho la ua o Kua
look behind him; when he did, he saw to his surprise keiki. Ia hiki ana mai, ninau aku la ke keiki: “P
that the boy was still behind him. When Kualii saw the Kualii: “Oia mau no.” Ninau aku la hoi o Kualii;
boy following he stopped and waited for the boy to kanaka?” I aku la ke keiki: “Ia oe no i lawe ma
come up to him. When the boy got up to him, the boy mai la ia’u ka manamana lima iki me kekahi pe
asked him: “How are you?” Kualii replied: “Just as
usual.” Kualii then asked the boy: “Where is your man?”
The boy replied: “When you took the feather cloak, I
took the small finger and one of his ears.”
When the boy made this answer, Kualii made up his A no keia olelo a ke keiki, manao ae la o Kuali
mind that this must be a brave lad. They then resumed Nolaila, hoi aku la laua a hiki ma ka lae o Kaoi
their journey until they reached Kaoio Point at Kualoa, aku la i ka malo i kona kahu. A haawi lilo ia m
where the king asked his servant for his malo. Upon Kualii i ke keiki, a hoahume pono aku la no o K
receiving it he gave it to the boy to be his own, and he keiki, alaila, hoi aku la laua a hiki ma Kailua, K
fastened it to the boy with his own hands. 321 They then ane hiki aku ai ma ka hale, hoonoho iho la o K
returned to Kailua in Koolaupoko. me ka i iho: “E noho oe maanei, e hele au imu
pahu, alaila he okoa kou mea nana e kii mai.”
While they were approaching near the houses, Kualii Kualii, a komo aku la imua, a mahope kani ana
told the boy to stay where he was. “You stay here while la ua keiki nei. [433]
I go on ahead to the mua. 322 When you hear the beating
of the drum, then someone will come and bring you
along.” With these words Kualii went on and entered the
mua. Soon after this the boy heard the beating of the
drum and saw someone coming for him. [432]
SUPPLEMENTARY. HE PAKUI.
The Royal Kolowalu Statute. 323—This was the best law O ke Kanawai Niaupio Kolowalu. O ke kanawai
during the reign of Kualii Kuniakea loa i ke au o ka noho aupuni ana o Kualii Kunia
Kuikealaikauaokalani. 324 It was strict, unvarying and Kuikealaikauaokalani, he paa, he luli ole he oia
always just. It was for the care and preservation of life; ka pomaikai, o ka hele o ka elemakule ame ka
it was for the aged men and women to lie down in the ala, o ka kokua i ka poe mahiai ame ka poe la
road with safety; it was to help the husbandmen and the ka poe malihini, o ka hanai i ka poe pololi i ka
fishermen; to entertain (morally) strangers, and feed the ke kanaka he pololi au i ka ai, e hanai aku i ka
hungry with food. If a man says, “I am hungry for food,” kau mai, a hoohiki mai i ke kanawai ma kona w
feed [him] with food, lest he hungers and claims his ua laa kela ai ma ke kanawai, aole e hiki i ka m
rights by swearing the kolowalu law by his mouth, aua, ua lilo ma ke kanawai, o ka uku ka pono.
whereby that food becomes free, so that the owner mea nana e hoohiki i ke kanawai o pili ia ia ke
thereof cannot withhold it; it is forfeited by law. It is hoohiki ai i ke kanawai o ka Moi me ka hewa o
better to compensate. He who swears must observe the ka uku hoopai. Ina he makaha wale i ka hai ai
law faithfully, lest he be accountable to the law of the alaila, maluna o ka mea nana i lawe wale i ke
king which he has sworn to observe, 325 and the kaumaha. O ke kanaka lawelawe a he kanaka
punishment be upon him. If it is simple robbery of kauia e keia kanawai, ua hookuuia oia mai kon
others’ food, or of others’ property, then severe lawehala hoi. O ka pololei o kona kanawai ame
punishment shall be meted out to the person who malama ana i ke aupuni, ua malama mai ke ak
violated the law. A transgressor, 326 or one who is about kona ola ana, a nona ke ola kaulana ma ka mo
to die, is, under the application of this law exonerated of kahiko. No ka Moi alii o Oahu, ua ola oia i na m
his death or other penalty. Through the uprightness of me umikumalima makahiki. Ua hele a kolopup
his [Kualii’s] law, and the honesty with which he haumakaiole, a palalauhala, a kauikapuaneane
administered the government, God preserved him, so ka aumaka make oia ma Kailua i Koolaupoko i
that he lived a long life, and his is that notable life mau makahiki o ke ola ia. Ua ana he 175.
spoken of in the annals of the ancient people, of the
king of Oahu, who lived four times forty and fifteen
years. In the last stage of life he was bent with age and
withered, with the eyes reddened and bedimmed; and
was carried about in a netting. He died at Kailua, in
Koolaupoko, in a.d. 1730, in the one hundred and
seventy-fifth year of his life.
FORNANDER COLLECTION
OF
HAWAIIAN ANTIQUITIES
AND FOLK-LORE
THE HAWAIIAN ACCOUNT OF THE
FORMATION OF THEIR ISLANDS
AND ORIGIN OF THEIR RACE WITH
THE TRADITIONS OF THEIR
MIGRATIONS, ETC., AS GATHERED
FROM ORIGINAL SOURCES
BY
ABRAHAM FORNANDER
Author of “An Account of the Polynesian
Race”
With Translations Revised and Illustrated
with Notes by
THOMAS G. THRUM
Honolulu, H. I.
Bishop Museum Press
1917
[Contents]
CONTENTS
PAGE
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com