{"id":14972834,"url":"https://github.com/buildwithlal/django-baseurl","last_synced_at":"2026-02-27T20:41:52.142Z","repository":{"id":57419063,"uuid":"80745252","full_name":"BuildWithLal/django-baseurl","owner":"BuildWithLal","description":"Return a BASE_URL template context for the current request inside Django application.","archived":false,"fork":false,"pushed_at":"2017-11-23T15:43:51.000Z","size":19,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T21:48:31.981Z","etag":null,"topics":["django","django-framework","python-library","template"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BuildWithLal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-02T16:42:06.000Z","updated_at":"2019-08-26T19:54:03.000Z","dependencies_parsed_at":"2022-09-17T11:00:13.314Z","dependency_job_id":null,"html_url":"https://github.com/BuildWithLal/django-baseurl","commit_stats":null,"previous_names":["lalzada/django-baseurl","buildwithlal/django-baseurl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildWithLal%2Fdjango-baseurl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildWithLal%2Fdjango-baseurl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildWithLal%2Fdjango-baseurl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BuildWithLal%2Fdjango-baseurl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BuildWithLal","download_url":"https://codeload.github.com/BuildWithLal/django-baseurl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240486451,"owners_count":19809185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["django","django-framework","python-library","template"],"created_at":"2024-09-24T13:47:36.720Z","updated_at":"2026-02-27T20:41:52.112Z","avatar_url":"https://github.com/BuildWithLal.png","language":"Python","readme":"#### Site Base URL in Template Context\nA simple Django application which add Site base URL (with port if used any) to template context processor with each reqeust. You can get Site URL in your template files using `{{ BASE_URL }}`\n\n\u003cbr/\u003e\n\n#### Tested Environment\n```\nUbuntu 14.04\nPython 3.4\nPython 2.7\nDjango 1.10\n```\n\n\u003cbr/\u003e\n\n#### Installation\n\u003cbr/\u003e\nUsing PIP\n\n```\npip install django-baseurl\n```\n\n\u003cbr/\u003e\nUsing Source Code (Github)\n\n```\ngit clone https://github.com/lalzada/django-baseurl.git\n```\n\nSwitch to `django-baseurl` directory and run command\n\n```\npython setup.py install\n```\n\n\u003cbr/\u003e\n\nAdd `django_baseurl` to `INSTALLED_APPS` in `settings.py`. \n\n\u003cbr/\u003e\n\n```\nINSTALLED_APPS = [\n  ...\n  \n  'django_baseurl'\n]\n```\n\n\u003cbr/\u003e\n\nAdd `context processor` to `TEMPLATES` in `settings.py`\n\n\u003cbr/\u003e\n\n```\nTEMPLATES = [\n    {\n        ...\n        \n        'OPTIONS': {\n            'context_processors': [\n                ...\n                \n                'django_baseurl.context_processors.baseurl'\n            ],\n        },\n    },\n]\n\n```\n\n\u003cbr/\u003e\n\n#### Usage\nUse below template variable inside your template file to get Site base url (with port if used any)\n\n```\n{{ BASE_URL }}\n```\n\n\u003cbr/\u003e\n\nThis package can be found on PyPi [here](https://pypi.python.org/pypi/django_baseurl)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildwithlal%2Fdjango-baseurl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildwithlal%2Fdjango-baseurl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildwithlal%2Fdjango-baseurl/lists"}