Giter Club home page Giter Club logo

sprint-challenge--django-i's Introduction

Sprint-Challenge--Django-I

For this sprint challenge, you'll be exploring some test data in our Django RPG. Start by pulling and checking out the testdata branch from the main repo: https://github.com/lambdaschool/django-rpg

In this branch, rpg/db.sqlite3 has been populated with dozens-to-hundreds of randomly generated characters across the base classes (Fighter, Mage, Cleric, and Thief) as well as some a few Necromancers. Also generated are Items, Weapons, and connections from characters to them. Note that, while the name field was randomized, the numeric and boolean fields were left as defaults.

Your main goal is to write Python code that uses the Django ORM to answer:

  • How many total Characters are there?
  • How many of each specific subclass?
  • How many total Items?
  • How many of the Items are weapons? How many are not?
  • On average, how many Items does each Character have?
  • On average, how many Weapons does each character have?

You can experiment/execute our code using the Django shell. Please turn in a file queries.py with your code along with comments for your answers.

Stretch goals:

  • Answer the same questions using the Django db shell/SQL (turn in queries.sql)
  • Add views/templates for a "dashboard" that reports the stats (pulling data from the database, so it updates if that data changes)
  • Using tables or charts, summarize answers to the above
  • Slice the Items/Weapon distribution by Character subclass
  • Play with populating your own test data - this data was generated using https://github.com/volrath/django-autofixture (this fork is compatible with Django 2.0 and is installed by the requirements.txt in the testdata branch, but you may still need dependencies such as gdal-bin (search for how to install this for your specific platform))

In general, this exercise is meant to test your ability to navigate and investigate data in a Django application. If you get to the stretch goal of using autofixture, the practical application here is testing - you can have tests that generate unique random data each time, ensuring the robustness of your application.

sprint-challenge--django-i's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.