A simple tracker for the LoGet collectable cards for tourists in Japan. The official LoGet site is here.
Access the Tracker
·
Report Bug
·
Request Feature
Table of Contents
Here's a blank template to get started: To avoid retyping too much info. Do a search and replace with your text editor for the following: twitter_handle
, email_client
, email
, project_title
, project_description
Feel free to uitilize the already existing webpage for your needs. However, if you wish to self-host, follow the steps below.
We assume you are running on Ubuntu. As such, you will need to have the following set up:
- Python 3.6 or higher
- A Postgres database
- Apache, Nginx, or your favorite web server (we will assume you know how to set this up)
- _SECURITY WARNING: In
settings.py
, we have set the allowed_hosts to['_']
. This is not secure and should be changed to your domain name, or you need to have your web server checking for hostname.*
- _SECURITY WARNING: In
- From a back-end standpoint, there are no logs. This is for privacy reasons and is deemed acceptable for this low-security project. However, you may want to set up logging for your own purposes.
- There are also no tests for this project. This is because the project's scope is simple and future changes are not forseen. However, you may want to set up tests for your own purposes.
- Clone the repo
git clone https://github.com/dscpsyl/loget-japan-tracker.git
- Create a virtual environment and activate it
python3 -m venv .venv && source .venv/bin/activate
- Install the required packages
pip install -r requirements.txt
- Set up your environment variables in the Django project folder
You will need to set the following variables:
cd logettracker && touch .env
DJANGO-SECRET-KEY
- Setup your database connection. We want your Postgres to have a service named
logetcardtrackerdb_service
with the database nameloget_tracker
. In addition, create a.my_pgpass
in the Django project folder to connect to your database. You can change how you want to connect to your database in thesettings.py
file. - Make the migrations
python manage.py makemigrations tracker && python manage.py migrate
- Create a superuser
python manage.py createsuperuser
- Populate your cards table with the scraper.
cd ../logetscraper && python main.py
- If you are deploying to a production environment, make sure to run the deploy checks. Otherwise, enable DEBUG and remove other restrictions in the
settings.py
file for your own convenience.python manage.py check --deploy python manage.py collectstatic
- Finally, start the server
cd ../logettracker && python manage.py runserver
Usage is simple. Simply create an account on the website and login.
You will be redirected to the tracker page where you can select which cards you've already collected. Cards yet to be collected will be greyed out. You can also export your collection in the settings page. If at any time you wish to erase your existance from the site, you can delete your account in the settings page.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the AGPL-3.0 License. See LICENSE
for more information.