A Django web app that shortens long urls. User may select from a list of available hosts.
- Tinyurl
- Is.gd
- Bit.ly
- Google URL Shortener
- Rebrand.ly
Virtualenv - Install required packages in a virtual environment. Not necessary, but recommended.
virtualenv YOURENVNAME
- Create new virtualenv for this project- Navigate to directory containing 'requirements.txt'
pip install -r requirements.txt
- Install required packages
On first usage you'll need to apply database migrations: python manage.py migrate
Otherwise run development server using: python manage.py runserver
Tests are run using pytest
For more information: pytest
- Create a fork and then clone your fork of the repo
- Follow steps for Installation
- Ensure project runs: Usage
- Ensure tests pass: Testing
- Implement your changes along with tests for your change
- Push changes to your fork and submit a pull request
This project uses the pyshorteners library for url shortening, read their documentation for more information on implementing a new host: pyshorteners
- Clone repository
- Make sure you have execute permission on run.sh and Docker is installed (Linux, 'chmod +x run.sh' in the repo)
- Run run.sh like ' ./run.sh '
- Visit localhost:8000 and watch it run