A simple URL Shortener built with Django that allows users to shorten long URLs and redirect them using a short URL.
- Generate short URLs from long URLs
- Store generated URLs in a database
- Redirect users from short URLs to original long URLs
- Django-based backend with form handling, using Forms.py
- Backend: Django, Python
- Database: SQLite (default) / MySQL / PostgreSQL (configurable later)
- Frontend: HTML (only for the First basic Utility , will be changed soon)
git clone https://github.com/trixsearch/linkbanale.git
cd linkbanalepython -m venv .venv
source .venv/bin/activate # For macOS/Linux
# OR
.venv\Scripts\activate # For Windowspip install -r requirements.txtpython manage.py makemigrations
python manage.py migratepython manage.py runserverNow, open your browser and visit http://127.0.0.1:8000/.
- Enter a long URL in the input field.
- Click on "Shorten URL."
- Copy the generated short URL.
- Use the short URL to get redirected to the original URL.
/url-shortener-django
│── /shortner
│ ├── migrations/
│ ├── templates/
│ ├── static/
│ ├── __init__.py
│ ├── admin.py
│ ├── apps.py
│ ├── forms.py
│ ├── models.py
│ ├── tests.py
│ ├── urls.py
│ ├── views.py
│── /templates
│── /static
│── manage.py
│── requirements.txt
│── README.md
| Method | URL Pattern | Description |
|---|---|---|
| GET | / |
Home page (Shorten URL form) |
| POST | / |
Submit URL for shortening hitting Enter if in Browser |
| GET | /<shortUrl>/ |
Redirect to original URL |
| GET | /detail/<id>/ |
View details of a short URL |
- Add user authentication for tracking URLs
- Implement an API for generating short URLs
- Integrate analytics for tracking URL clicks
- Deploy on cloud platforms like Python Anywhere
I Basically developed the project to make basic Understanding , later I'm going to use the project in my upcoming projects & that's gonna be trixsearch
👤 trixsearch
📧 Email: inforatme@gmail.com
🔗 GitHub: trixsearch
Let me know if you want any modifications! 🚀