{"id":22832623,"url":"https://github.com/mmedoo/django-url-shortener","last_synced_at":"2026-06-15T21:31:51.605Z","repository":{"id":249934566,"uuid":"830250778","full_name":"mmedoo/django-url-shortener","owner":"mmedoo","description":"Simple Django URL Shortener App.","archived":false,"fork":false,"pushed_at":"2024-07-30T14:04:43.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-09T03:03:17.056Z","etag":null,"topics":["djnago","orm","python","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmedoo.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-17T22:53:38.000Z","updated_at":"2024-07-30T14:04:46.000Z","dependencies_parsed_at":"2025-11-09T03:02:12.380Z","dependency_job_id":null,"html_url":"https://github.com/mmedoo/django-url-shortener","commit_stats":null,"previous_names":["mmedoo/django-url-shortener"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmedoo/django-url-shortener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmedoo%2Fdjango-url-shortener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmedoo%2Fdjango-url-shortener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmedoo%2Fdjango-url-shortener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmedoo%2Fdjango-url-shortener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmedoo","download_url":"https://codeload.github.com/mmedoo/django-url-shortener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmedoo%2Fdjango-url-shortener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34381759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["djnago","orm","python","sqlite3"],"created_at":"2024-12-12T21:08:20.799Z","updated_at":"2026-06-15T21:31:51.584Z","avatar_url":"https://github.com/mmedoo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Django](https://img.shields.io/static/v1?label=Django\u0026message=4.2.3\u0026color=092E20\u0026labelColor=white\u0026logo=django\u0026logoColor=092E20)\n![SQLite](https://img.shields.io/static/v1?label=SQLite\u0026message=3.41.2\u0026color=white\u0026labelColor=black\u0026logo=sqlite\u0026logoColor=white)\n![Jupyter](https://img.shields.io/static/v1?label=Jupyter\u0026message=1.0.0\u0026color=orange\u0026labelColor=white\u0026logo=jupyter)\n![PIP](https://img.shields.io/static/v1?label=PIP\u0026message=23.1.2\u0026color=yellow\u0026labelColor=3775A9\u0026logo=pypi\u0026logoColor=white)\n\n# Django URL Shortener\n\n\n## Table of Contents\n\n- [🌟 Introduction](#introduction)\n- [⚙️ Installation](#installation)\n- [🚀 Usage](#usage)\n- [📦 Dependencies](#dependencies)\n- [🔧 Configuration](#configuration)\n- [📚 Documentation](#documentation)\n    - [Views](#views)\n    - [📬 API Endpoints](#api)\n    - [Jupyter Notebook](#jupyter-notebook)\n- [❗️ Troubleshooting](#troubleshooting)\n\n\n\n\u003ch2 id=\"introduction\"\u003e🌟 Introduction\u003c/h2\u003e\n\nDjango app to shorten URLs.\n\n\u003ch2 id=\"installation\"\u003e⚙️ Installation\u003c/h2\u003e\n\nTo get the project up and running locally on your machine, follow these steps:\n\n1. **Clone the repository:**\n    ```sh\n    git clone https://github.com/mmedoo/django-url-shortener.git\n    cd django-url-shortener\n    ```\n\n2. **Set up a virtual environment:**\n    ```sh\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n\n3. **Install dependencies:**\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n4. **Run migrations:**\n    ```sh\n    python manage.py migrate\n    ```\n\n5. **Start the development server:**\n    ```sh\n    python manage.py runserver\n    ```\n\n\t\n\t\n\u003ch2 id=\"usage\"\u003e🚀 Usage\u003c/h2\u003e\n\n### Shorten a URL\n1. Navigate to the home page.\n2. Enter the URL you want to shorten in the provided form.\n3. Click the \"Shorten URL\" button.\n4. The shortened URL will be displayed on the screen.\n\n### Retrieve a URL\n1. Enter the shortened key in the URL path (e.g., `http://localhost:8000/\u003cshortened-key\u003e`).\n2. You will be redirected to the original URL.\n\n\n\u003ch2 id=\"dependencies\"\u003e📦 Dependencies\u003c/h2\u003e\n\n- Django\n- Python 3.x\n- Other dependencies listed in `requirements.txt`\n\n\u003ch2 id=\"configuration\"\u003e🔧 Configuration\u003c/h2\u003e\n\n### Database\nBy default, this project uses SQLite. You can configure other databases (e.g., PostgreSQL, MySQL) by updating the `DATABASES` setting in `settings.py`.\n\n\u003ch2 id=\"documentation\"\u003e📚 Documentation\u003c/h2\u003e\n\n### Views\n- **getURL(request, key)**: Retrieves the original URL using the shortened key and renders a template for redirection.\n- **createLink(request)**: Checks if there a corresponding key in the database for the input URL, if so, it returns the key, otherwise, it creates, stores and returns a new key.\n\n\u003ch3 id=\"api\"\u003e📬 API Endpoints\u003c/h3\u003e\n\n#### GET `/`\nHome page to shorten URLs.\n\n#### GET `/create/`\nEndpoint to handle URL shortening.\n\n#### GET `/{key}`\nEndpoint to handle redirection to the original URL.\n\n### Jupyter Notebook\nYou can use this Jupyter Notebook to interact with the database using Django. For more info click [HERE](https://github.com/mmedoo/django-in-jupyter)\n\n\n\u003ch2 id=\"troubleshooting\"\u003e❗️ Troubleshooting\u003c/h2\u003e\n\n### Common Issues\n- **Server not starting**: Ensure all dependencies are installed and the database migrations have been applied.\n- **Invalid URL**: Make sure the URL entered is valid and follows the correct format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmedoo%2Fdjango-url-shortener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmedoo%2Fdjango-url-shortener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmedoo%2Fdjango-url-shortener/lists"}