Shurl is a URL shortening application built with Django. It allows users to create short URLs for their long URLs.
- Shorten long URLs
- Redirect to the original URL using the shortened URL
- User authentication and registration // TODO
- URL statistics // TODO
Clone this repository:
git clone https://github.com/GuilhermeCAz/shurl_django.git
cd shurl_django
Create a .env file according to .env.example.
To build the Docker images and start the project in detached mode, use the following command:
docker compose up --build --detach
Using Make:
make up
Make Migrations
docker compose run web python manage.py makemigrations
docker compose run web python manage.py migrate
Using Make:
make migrate
Optional: To create a superuser for the Django admin, run:
docker compose run web python manage.py createsuperuser --noinput
Using Make:
make superuser
You'll need to set the necessary environment variables for the superuser credentials beforehand.
- Visit the Shurl homepage:
http://localhost:8000
- Paste a long URL into the input field and click "Shorten".
- Copy the shortened URL and use it to share with others.
- Click the shortened URL to be redirected to the original URL.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
Create .venv
python -m venv .venv
Activate the virtual environment
.venv/scripts/activate
Install dependencies
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
This project is licensed under the MIT License. See the LICENSE file for details.