Welcome to your quest

Adventurous Artifact Conqueror

You will be accompanied by your fearless companion

Feathers McGraw 🦜

Feel free to reach out to him for help without hesitation, as he is eager to provide guidance throughout the journey.

Chapter 1

Unleash the power of thy Django models

Ahoy, matey! In the vast expanse of your project, a legendary app known as 'pirateDatabase' has already set sail. Navigate the treacherous waters of 'settings.py' and ensure the app is duly registered, ready to be harnessed for our forthcoming adventures. Together, we shall delve into the depths of the 'pirateDatabase' and unravel its secrets in our quest for knowledge and plunder!

Quest 1.1

Ah, the 'Pirate' Model, a treasure trove of information! Within its mystical confines lies a hidden gem known as 'age_at_death.' This precious attribute can be derived from the essence of two other fields, blending their powers to reveal the age of the pirate at the time of their ultimate voyage into the great beyond. A test named 'test_age_at_death_calculated_automatically' awaits our attention, its purpose to ensure the flawless functioning of the 'age_at_death' field. Alas, it currently meets an unfortunate fate, plagued by failure. I embark you upon a quest to rectify this bug, restoring balance to the realm of tests.

Quest 1.2

On the high seas, many esteemed pirate mates have met their fate in thrilling adventures. But our Pirate's database be as empty as a deserted island. It's time to fill the database with the most famous pirates who ever sailed the seas. We shall fill the database up with an existing 'piratesFixture'. After that, we shall verify if the 'age_of_death' be correctly recalculated when the date of birth or date of death be modified using the trusty interactive interpreter of python. Though, the database be far from complete. We shall add a few more famous pirates to the database and create a new fixture file directly from the depths of Django's database.. Fair winds and aye to this quest!

Quest 1.3

What be a pirate without his crew! We shall create a blood bond between the pirates through a new model called 'PirateCrew' and and establish a relationship with the 'Pirate' model. Add some pirates to those crews! But beware, matey: a crew with more than five pirates be a recipe for riots and mutiny. It's something ye better prevent (by validation)!

Chapter 2

Behold the formidable might of the Query-Language

Ready to dock at the next port on our adventure, matey? We be explorin' the power of the query language, delvin' into complex queries, aggregations and annotations.

Quest 2.1

Aye, we be scribin' complex queries! Therefore, we shall create a simple view in our app, where we shall proudly display the pirate's information in a table. Fear not, this quest is not as slippery as a ships' deck! Create a table with all pirates that ...
  • ... have not joined a crew yet.
  • ... are part of a crew whose name contains the mighty symbol of "⚔️"
  • ... are part of a crew where only pirates who've reached the ripe age of 30 or more be present.

Quest 2.2

Aye, it be gettin' even more adventurous! We shall create a view to showcase the desired information in all its glory. May the winds of coding be favorable and guide us to success.
  • Calculate and display the average age of all the pirates.
  • Show the length of the name for each and every pirate.
  • Show the count of pirates for each and every crew.

Chapter 3

Unlocking the doors of privilege, or unleashing the tempest of chaos

Avast, me matey! Now we shall navigate on some administrative waters to ensure security and order aboard our ship. Let us attend to these duties with diligence and dedication, for the safety of our crew. Prepare the ship for the adventure that lies ahead!

Quest 3.1

Ensuring that only trusted individuals have access to the inner workings of our pirate community there are several tasks to be done:
  • Non-logged-in users must not be able to view any information about pirates.
  • Views are restricted only to users who possess a new right called 'filter_pirates'.
  • Creates a new group that also possesses this right, and add users to this group.

Hey, adventurer

Ye have navigated the high seas of this adventure with skill and courage, just like a mighty pirate. Ye have emerged victorious and now your journey has come to a triumphant end.