A simple URL shortening web app written in Python using Django
This web app includes the following functions:
- An endpoint that receives a URL and returns a new shortened URL
- An endpoint to retrieve the last 100 shortened URLs
- An endpoint to retrieve the top 10 most popular shortened domains in the past month
- An endpoint to retrieve the number of times a shortened URL has been visited.
(In the root folder of shortener)
- Install the python environment using
pipenv install
if you haven't had pipenv. - Enter Pipenv by
pipenv shell
. - Install Django by
pip install Django
. - Install mathfilters
pip install django-mathfilters
. - Run Django server by
python manage.py runserver
In your web browser, visit http://127.0.0.1:8000/ To exit the running server: Ctrl + C - To Exit pipenv, type
exit
.
To directly access the database: python manage.py dbshell