Skip to content

A world currency collection tracker app I made for my son.

License

Notifications You must be signed in to change notification settings

kaido1224/currencytracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currency Tracker

A compact Django project built to keep track of a world currency (money) collection for my son.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage

About The Project

Home Page Screen Shot

My oldest son has recently acquired an interest in money from around the world and started building a collection. When it got beyond a collection of 30 different coins in various langauges, it became difficult for us to keep track of which coins came from where. So I built this compact project for my son to keep track of what currency he already has and what countries he still needs for his collection.

On the home page, you can see a visual representation of the countries already in your collection as well as a table that displays a listing of the countries that you are missing from your collection.

Getting Started

Below are instructions for setting up this project on your local machine. The shell commands below are written with Linux Ubuntu in mind. If you are using a different operating system, your instructions may vary.

Prerequisites

  • Python 3.6+
  • Python 3.6+ virtual environment
    sudo apt install python3-venv

Installation

  1. Clone the repo

    git clone https:/kaido1224/currencytracker.git
  2. Navigate to the project directory created.

    cd currencytracker
  3. Setup Python virtual environment

     python3 -m venv ve
  4. Activate the new virtual environment

    . ve/bin/activate
  5. Update pip

     pip install -U pip
  6. Install the requirements file

     pip install -r requirements.txt
  7. If you didn't already have Postgres installed, follow the instructions below to set it up.

     sudo -u postgres createuser --superuser --createdb --pwprompt usernamehere
  8. Create a database for CurrencyTracker in Postgres, assign it to your user.

     psql
     create database currency with owner usernamehere;
     \q
  9. Create a secrets.py file under settings.

     sudo vim currency/settings/secrets.py

    Inside of the file, create a secrets dictionary similar to the below:

    secrets_dict = {
        "SECRET_KEY": "DJANGOSECRETKEYHERE",
        "DB_USER": "YOURPOSTGRESUSERHERE",
        "DB_PASSWORD": "YOURPOSTGRESUSERPWHERE"
    }

    After that, save and exit.

  10. Apply database migrations. If you want prepopulated data, access myapp.0002_auto_20211210_0311.py under myapp/migrations and uncomment out the book creation and currency bulk_create sections.

     ./manage.py migrate
  11. Create a superuser to log into the project.

    ./manage.py createsuperuser
  12. If done correctly, you should now be able to run CurrencyTracker in a development environment.

    ./manage.py runserver
  13. In your browser, navigate to http://127.0.0.1:8000, you should see a login screen. Use the credentials you created in step 11 to login.

    Login Screen Shot

(back to top)

Usage

This project currently has three main pages. The first, is the home page already discussed above. The other two pages, book management and collection management, both contain similar sub pages and can be accessed in the left-hand navigation menu. A more detailed explanation of these two management pages, and their underlying models is described below.

Book Management

Before you create entries into your collection, you must first create a book that you can assign your collection entries to. On the book management page you can view your existing collection books, add a new one, edit existing book details or delete books and their associated collections.

Book Management Page Screen Shot

Below is a brief description of the fields associated to a book.

Field Value Description Required?
Description String, up to 100 characters You can enter the title of the book here. Otherwise, if you are like my son, whose collection books don't have a title, enter a description of the book instead. Yes
Pages Integer The number of pages in the book. At this time, this isn't used for anything. No
Rows Per Page Integer The number of rows on a given page. At this time, this isn't used for anything. No
Columns Per Row Integer The number of columns on a given row on a page. At this time, this isn't used for anything. No

Collection Management

Once you've created a book for your collection, you can begin using the collection management page. On this page, similar to the book management page, you can view your existing collection entries, add a new one, or edit or delete existing entries.

Collection Management Page Screen Shot

Below is a brief description of the fields associated to a collection entry. Most of the fields are not required to allow you to fill in the information that you know now and can fill in the rest of the information later.

Field Value Description Required?
Book Book ID The book the collection entry is located in. Yes
Page Integer The page in the book the entry is located in. No
Row Integer The row on the page the entry is located in. No
Column Integer The column in the row the entry is located in. No
Currency String, up to 100 characters The name of the currency, such as a Euro Cent or Peso. No
Value Decimal The value of the currency. No
Type String, 4 characters. What type of currency this is. Should be either a bill or coin. No
Country String, 2 character ISO code for the country. The country that this currency came from. No

There are certain countries that share a currency with several others and are grouped together as a different country entry. These special exceptions are shown below.

Country Name Affiliated Countries
Central Africa CFA Cameroon, Central African Republic, Chad, Equatorial Guinea, Gabon, Republic of the Congo
Eastern Carribean Islands Anguilla, Antigua and Barbuda, Dominica, Grenada, Montserrat, Saint Kitts and Nevis, Saint Lucia, Saint Vincent and the Grenadines
West Africa CFA Benin, Burkina Faso, Côte d'Ivoire, Guinea-Bissau, Mali, Niger, Senegal, Togo

(back to top)

About

A world currency collection tracker app I made for my son.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published