Giter Site home page Giter Site logo

guilhermecaz / shurl_django Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 66 KB

Shurl is a URL shortening application built with Django. It allows users to create short URLs for their long URLs.

License: MIT License

Python 77.10% Dockerfile 1.06% Makefile 6.89% HTML 13.48% CSS 1.48%
django docker docker-compose postgresql python url-shortener

shurl_django's Introduction

Shurl

License: MIT Django CI Python Version from PEP 621 TOML Django Docker PostgreSQL Make Ruff Checked with mypy OpenAPI Github Actions

Shurl is a URL shortening application built with Django. It allows users to create short URLs for their long URLs.

Features

  • Shorten long URLs
  • Redirect to the original URL using the shortened URL
  • User authentication and registration // TODO
  • URL statistics // TODO

Project Setup

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.

Usage

  1. Visit the Shurl homepage: http://localhost:8000
  2. Paste a long URL into the input field and click "Shorten".
  3. Copy the shortened URL and use it to share with others.
  4. Click the shortened URL to be redirected to the original URL.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

Installation (for development only)

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

License

This project is licensed under the MIT License. See the LICENSE file for details.

shurl_django's People

Contributors

guilhermecaz avatar marcelogcardozo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.