Skip to content

A URL management application built with python, django and bootstrap. Shortly is simlar to Bitly a popular URL management application.

Notifications You must be signed in to change notification settings

Aby-Sebastian/Shortly

Repository files navigation

Shortly

A URL management application built with python django PostgreSQL. Shortly is simlar to Bitly a popular URL management application.

A simple, reponsive website. Built with:

  • Python 🐍
  • Django 🎸
  • Bootstrap 4 🌈
  • PostgreSQL
  • Redis (for cacheing)
  • Vanilla JS - ES6
  • JQuery
  • ChartJS
  • HTML
  • CSS

Features

  • ability to shorten url as anonymous user from index page
  • URL shortening
  • ability to customize the shortened URL
  • shows analytic data in charts based on clicks on short urls
  • QR code generation on shortened URL
  • share shortened URL in social medias
  • can add Tags to categoriza links
  • search functionality
  • authentication
  • sends email when new user registers to the application
  • shows last 7 days total clicks in dashboard

How to run this project (Ubuntu 18.04)

  1. Clone the project
git clone https://github.com/Aby-Sebastian/Shortly.git
  1. Make sure you are in Shortly folder

  2. Install all dependencies

    pip install -r requirements.txt
  3. Install PostgreSQL in your Ubuntu 18.04

    1. Enable PostgreSQL Apt Repository

      sudo apt-get install wget ca-certificates
      
      wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
      
      # Now add the repository to your system.
      
      sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
    2. Install PostgreSQL on Ubuntu

      sudo apt-get update
      sudo apt-get install postgresql postgresql-contrib
    3. Connect to PostgreSQL

      sudo su - postgres
      psql

      Now you are logged in to PostgreSQL database server. To check login info use following command from the database command prompt.

      postgres-# \conninfo
    4. Create a database

      CREATE DATABASE shortly;
    5. Create user

      CREATE USER pks WITH PASSWORD 'abc123!';
  4. Run Migrations

python manage.py makemigrations
python manage.py migrate
  1. Run Server
python manage.py runserver 

And you are good to go.

To run with SQLite only

Go inside the 'shortly' folder and open 'settings.py' file and replace

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'shortly' ,
        'USER': 'pks',
        'PASSWORD': 'abc123!',
        'HOST':'localhost',
        
    }
}

To:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

This is the default configuration of Django database.

Backend

For Database I have used Postgres Database Name: shortly

Note: Please change those gmail credentials from real_estate folder you will get settings.py inside that file you will see username and password mentioned as place your Username and Password. Also do that same thing from Contacts folder views.py you will see YourEmail mentioned on line number 33.

Screenshots

  • HOME

Home

  • Register

Register

  • Login

Login

  • Dashboard

Dashboard

Dashboard

  • Links

Links

Links

Links

Links

Links

Links

  • Tags

Tags

Tags

  • Files

Files

  • Gallery

Gallery

  • Settings

Settings

Settings

References

  1. https://www.djangoproject.com/

About

A URL management application built with python, django and bootstrap. Shortly is simlar to Bitly a popular URL management application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published