A world clock application built to demonstrate logging with Loguru.
Tutorial: A Complete Guide to Logging in Python with Loguru.
You must have the latest version of Python 3 installed on your machine. This project is tested against Python 3.10.0.
-
Clone this repo to your machine:
git clone https://github.com/betterstack-community/django-world-clock.git
-
cd
into the project directory:cd django-world-clock
-
Install Python virtual environment:
python3 -m venv env
-
Activate the virtual environment.
On Windows, run:
env\Scripts\activate
On Unix or macOS, run:
source env/bin/activate
-
cd
into thedjangoWorldClock
app directory:cd djangoWorldClock
-
Install the requirements:
python -m pip install -r requirements.txt
-
Run database migrations:
python manage.py migrate
-
Start the dev server:
python manage.py runserver
You should see the following output if the dev server is started successfully:
Watching for file changes with StatReloader
Performing system checks...
System check identified no issues (0 silenced).
September 18, 2022 - 18:21:58
Django version 4.1.1, using settings 'djangoWorldClock.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Open your browser and go to http://127.0.0.1:8000/
The code used in this project and in the linked tutorial are licensed under the Apache License, Version 2.0.