django-short-url
Django Short URL
Installation
pip install django-short-url
Usage
from django_short_url.views import get_surl
def xxx(request):
surl = get_surl(lurl)
Urls.py
urlpatterns = [
url(r'^s/', include('django_short_url.urls', namespace='django_short_url')),
]
or
from django.urls import re_path
from django_short_url import views as surl_views
urlpatterns = [
re_path(r'^(?P<surl>\w+)', surl_views.short_url_redirect, name='short_url_redirect'),
]
Settings.py
INSTALLED_APPS = (
...
'django_short_url',
...
)
# Redirect url when short url not exists
DJANGO_SHORT_URL_REDIRECT_URL = ''
Metadata
Release files for django-short-url 1.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-short-url-1.1.8.tar.gz | 5.1 kB | Without provenance | Details for django-short-url-1.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_short_url-1.1.8-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_short_url-1.1.8-py2.py3-none-any.whl |
Total release size: 12.2 kB
Release files / django-short-url-1.1.8.tar.gz
| Download URL | django-short-url-1.1.8.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99e365b14676786682b1c4631b5dccfc333d7481074c598a366326a3942711bb
|
|
BLAKE2b-256 checksum How to use checksums |
76cff14f70a42792684b6b1d75b4f812a22d74a61a577c99617129ec0e9c49de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / django_short_url-1.1.8-py2.py3-none-any.whl
| Download URL | django_short_url-1.1.8-py2.py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1edb1397dfabe23f9ec391a857211c461c365f6b472d712bb90f55dbf3aa8aa2
|
|
BLAKE2b-256 checksum How to use checksums |
3a4579bd30ff09b651b6a246abd9c6497e803a6b968f6b12015411c734f388b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for django-short-url 1.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.