Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pennlabs/django-shortener
URL Shortener in Django
https://github.com/pennlabs/django-shortener
Last synced: about 6 hours ago
JSON representation
URL Shortener in Django
- Host: GitHub
- URL: https://github.com/pennlabs/django-shortener
- Owner: pennlabs
- License: mit
- Created: 2018-10-28T16:03:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-27T22:20:45.000Z (over 4 years ago)
- Last Synced: 2024-11-04T01:04:37.360Z (12 days ago)
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 4
- Watchers: 15
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Django Shortener
[![CircleCI](https://circleci.com/gh/pennlabs/django-shortener.svg?style=shield)](https://circleci.com/gh/pennlabs/django-shortener)
[![Coverage Status](https://codecov.io/gh/pennlabs/django-shortener/branch/master/graph/badge.svg)](https://codecov.io/gh/pennlabs/django-shortener)
[![PyPi Package](https://img.shields.io/pypi/v/shortener.svg)](https://pypi.org/project/shortener/)Basic URL shortener as a Django app.
## Requirements
* Python 3.6+
* Django 2.2+## Installation
Install with pip `pip install shortener`
Add `shortener` to `INSTALLED_APPS`
```python
INSTALLED_APPS = (
...
'shortener.apps.ShortenerConfig',
...
)
```Add the following to `urls.py`
```python
urlpatterns = [
...
path('s/', include('shortener.urls', namespace='shortener')),
...
]
```This will shorten URLs to `example.com/s/`
Run migrations `./manage.py migrate`
## Documentation
Shortened URLs can be created using the django admin site or by calling `shortener.models.Url.get_or_create()` with the URL you want to shorten.
## Changelog
See [CHANGELOG.md](https://github.com/pennlabs/django-runtime-options/blob/master/CHANGELOG.md)
## License
See [LICENSE](https://github.com/pennlabs/django-runtime-options/blob/master/LICENSE)