A lightweight, yet neat tool for shortening URLs, and keeping track of their redirects.
Clone the project
git clone https://github.com/glowsquid/Flask-URL-Shortener.git
Create and activate a virtualenv
Install the requirements
pip install -r requirements.txt
Update settings.py with your own MySQL credentials
Create the database in MySQL
CREATE DATABASE shortener;
python create_db.py to set up the table
Then alter the database in MySQL to make characters case-sensitive:
ALTER DATABASE shortener CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE url CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
View the full source code at the github repository.
Licence is GPLv3, feel free to fork the project.