A simple Django-based URL shortener with a web interface.
Create virtual environment:
python -m venv venv
Activate virtual environment (Windows):
.\venv\Scripts\activate
Deactivate:
deactivate
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
python manage.py migrate -
Create superuser:
python manage.py createsuperuser -
Start the server:
python manage.py runserver -
Open http://localhost:8000 in your browser.
-
Shorten URLs:
Enter a long URL to generate a short URL.
(Frontend powered by Alpine.js) -
Expand URLs:
Enter a short URL to retrieve the original long URL.
(Frontend powered by Alpine.js) -
Redirection:
Accessinglocalhost/<10-character-hash>redirects to the original URL. -
Admin Panel:
Django admin enabled.
Superuser:admin(set password as needed) -
Prettified Forms:
Uses Bootstrap and django-crispy-forms for better UI.
- Add user authentication
- Analytics for shortened URLs
- Custom short URL aliases